aboutsummaryrefslogtreecommitdiff
path: root/src/game/Wintergrasp.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-01 00:17:39 -0500
committermegamage <none@none>2009-09-01 00:17:39 -0500
commit33a0155281ca0ffb01cf47cddd690249c134ad89 (patch)
treebb016d3c03b5aa07a5e212e7e6590685559dc1c6 /src/game/Wintergrasp.cpp
parent83ea85f9e46bbda023fb5d540c08faa10fc980ed (diff)
*Allow pet to have combo points.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Wintergrasp.cpp')
-rw-r--r--src/game/Wintergrasp.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index fa387f8d926..1fdeaae5f00 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -140,7 +140,9 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
TeamId teamId = x > POS_X_CENTER ? m_defender : OTHER_TEAM(m_defender);
m_buildingStates[guid] = new BuildingState((*poi)->worldState, teamId, m_defender != TEAM_ALLIANCE);
if((*poi)->id == 2246)
+ {
m_gate = m_buildingStates[guid];
+ }
areaPOIs.erase(poi);
//disable for now
@@ -229,6 +231,12 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
}while(result->NextRow());
delete result;
+ if(!m_gate)
+ {
+ sLog.outError("Cannot find wintergrasp fortress gate!");
+ return false;
+ }
+
// Load Graveyard
GraveYardMap::const_iterator graveLow = objmgr.mGraveYardMap.lower_bound(ZONE_WINTERGRASP);
GraveYardMap::const_iterator graveUp = objmgr.mGraveYardMap.upper_bound(ZONE_WINTERGRASP);
@@ -286,7 +294,7 @@ void OPvPWintergrasp::ProcessEvent(GameObject *obj, uint32 eventId)
{
if(eventId == 19982)
{
- if(m_wartime && m_gate->damageState == DAMAGE_DESTROYED)
+ if(m_wartime && m_gate && m_gate->damageState == DAMAGE_DESTROYED)
{
m_changeDefender = true;
m_timer = 0;