mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 23:38:54 -04:00
Core/PhaseMgr: Fixed an updateleak that occured if the rewarded quest hadn't requirements
* Fixed the range for phase ids in the phase_definition table * solves http://www.trinitycore.org/f/topic/8737-condition-quest-rewarded-dosnt-work-instantly/
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `phase_definitions`
|
||||
CHANGE COLUMN `phaseId` `phaseId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `phasemask`;
|
||||
@@ -15396,6 +15396,10 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
m_RewardedQuests.insert(quest_id);
|
||||
m_RewardedQuestsSave[quest_id] = true;
|
||||
|
||||
PhaseUpdateData phaseUdateData;
|
||||
phaseUdateData.AddQuestUpdate(quest_id);
|
||||
phaseMgr.NotifyConditionChanged(phaseUdateData);
|
||||
|
||||
// StoreNewItem, mail reward, etc. save data directly to the database
|
||||
// to prevent exploitable data desynchronisation we save the quest status to the database too
|
||||
// (to prevent rewarding this quest another time while rewards were already given out)
|
||||
|
||||
Reference in New Issue
Block a user