comparison Main.lua @ 446:c8b5277f5e2e

Fixed a nil error that occurred in certain cases when completing quests.
author MMOSimca <MMOSimca@gmail.com>
date Thu, 12 Mar 2015 03:10:39 -0400
parents 929d7657e23b
children bf1fbf1c9cb2
comparison
equal deleted inserted replaced
445:20dd5a4d74ab 446:c8b5277f5e2e
2588 end 2588 end
2589 2589
2590 2590
2591 function WDP:QUEST_COMPLETE(event_name) 2591 function WDP:QUEST_COMPLETE(event_name)
2592 local quest = UpdateQuestJuncture("end") 2592 local quest = UpdateQuestJuncture("end")
2593
2594 if not quest then
2595 return
2596 end
2593 2597
2594 if ALLOWED_LOCALES[CLIENT_LOCALE] then 2598 if ALLOWED_LOCALES[CLIENT_LOCALE] then
2595 quest.reward_text = ReplaceKeywords(_G.GetRewardText()) 2599 quest.reward_text = ReplaceKeywords(_G.GetRewardText())
2596 end 2600 end
2597 -- Make sure the quest NPC isn't erroneously recorded as giving reputation for quests which award it. 2601 -- Make sure the quest NPC isn't erroneously recorded as giving reputation for quests which award it.