diff options
| author | tartalo <none@none> | 2009-10-21 19:06:54 +0200 |
|---|---|---|
| committer | tartalo <none@none> | 2009-10-21 19:06:54 +0200 |
| commit | db9408cc53a1a73ab1bdb0409be9c9dffce94452 (patch) | |
| tree | e99728ae86a24873e273032457386f8a40f35694 /src | |
| parent | b18099e4b1b41f952ebec6547bbff3d3d593e124 (diff) | |
Wintergrasp: Quest Fix (Slay them all && No Mercy Mericiless), by Manuel
Player: Fix possible server crash in Player::RewardPlayerAndGroupAtEvent, by Spp
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Player.cpp | 2 | ||||
| -rw-r--r-- | src/game/Wintergrasp.cpp | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 3c11eca2b16..2c98f9279b6 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20289,7 +20289,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource) { - uint64 creature_guid = pRewardSource->GetTypeId()==TYPEID_UNIT ? pRewardSource->GetGUID() : uint64(0); + uint64 creature_guid = (pRewardSource && pRewardSource->GetTypeId()==TYPEID_UNIT) ? pRewardSource->GetGUID() : uint64(0); // prepare data for near group iteration if(Group *pGroup = GetGroup()) diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp index e1a3d02945c..1e88b63912b 100644 --- a/src/game/Wintergrasp.cpp +++ b/src/game/Wintergrasp.cpp @@ -26,21 +26,16 @@ typedef uint32 TeamPair[2]; enum WintergraspQuest { - SLAY_THEM_ALL_1 = 13180, //Horde Quest - SLAY_THEM_ALL_2 = 13178, //Horde Quest - - NO_MERCY_MERCILESS = 13177, //Alliance Quest - NO_MERCY_MERCILESS_1 = 13179, //Alliance Quest - A_VICTORY_IN_WG = 13181, H_VICTORY_IN_WG = 13183, + CRE_PVP_KILL = 31086, //Quest Objective + CRE_PVP_KILL_V = 31093, //Quest Objective }; enum CreatureEntry { CRE_ENG_A = 30499, CRE_ENG_H = 30400, - CRE_PVP_KILL = 31086, //Quest Objective SPIRIT_HEALER = 6491, }; @@ -380,7 +375,7 @@ void OPvPWintergrasp::ProcessEvent(GameObject *obj, uint32 eventId) if (m_timer < 600000) m_timer = 0; else - m_timer = m_timer - 600000; // - 10 mins + m_timer = m_timer - 600000; // - 10 mins } } } @@ -870,16 +865,20 @@ void OPvPWintergrasp::HandleKill(Player *killer, Unit *victim) { if (victim->getLevel() >= 70) ok = true; - - if (killer->GetQuestStatus(SLAY_THEM_ALL_1) == QUEST_STATUS_INCOMPLETE || killer->GetQuestStatus(SLAY_THEM_ALL_2) == QUEST_STATUS_INCOMPLETE || killer->GetQuestStatus(NO_MERCY_MERCILESS_1) == QUEST_STATUS_INCOMPLETE || killer->GetQuestStatus(NO_MERCY_MERCILESS) == QUEST_STATUS_INCOMPLETE) - killer->KilledMonsterCredit(CRE_PVP_KILL,0); + killer->RewardPlayerAndGroupAtEvent(CRE_PVP_KILL, 0); } else { switch(GetCreatureType(victim->GetEntry())) { case CREATURE_SIEGE_VEHICLE: + killer->RewardPlayerAndGroupAtEvent(CRE_PVP_KILL_V,0); + ok = true; + break; case CREATURE_GUARD: + killer->RewardPlayerAndGroupAtEvent(CRE_PVP_KILL, 0); + ok = true; + break; case CREATURE_TURRET: ok = true; break; |
