diff options
author | megamage <none@none> | 2009-05-23 01:44:16 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-23 01:44:16 -0500 |
commit | 322769ee550a709994d9076d502e145ce6da3e2c (patch) | |
tree | b251008eab9cae5d5d56102f2a7d7a49f4ae0de9 /src/game/Wintergrasp.cpp | |
parent | ec24442af402d7ace4e74bb9ce5e36db89656f79 (diff) |
*Display building location on map for wintergrasp.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Wintergrasp.cpp')
-rw-r--r-- | src/game/Wintergrasp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp index a2cbb3d7cf5..b5e808e1251 100644 --- a/src/game/Wintergrasp.cpp +++ b/src/game/Wintergrasp.cpp @@ -23,6 +23,17 @@ bool OPvPWintergrasp::SetupOutdoorPvP() { RegisterZone(ZONE_WINTERGRASP); + + for(uint32 i = 0; i < sAreaPOIStore.GetNumRows(); ++i) + { + const AreaPOIEntry * poiInfo = sAreaPOIStore.LookupEntry(i); + if(poiInfo && poiInfo->zoneId == ZONE_WINTERGRASP) + areaPOIs.push_back(poiInfo); + } + + m_defender = TeamId(rand()%2); + m_attacker = (m_defender == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE); + return true; } @@ -31,6 +42,13 @@ void OPvPWintergrasp::HandlePlayerEnterZone(Player * plr, uint32 zone) if(!plr->HasAura(SPELL_RECRUIT) && !plr->HasAura(SPELL_CORPORAL) && !plr->HasAura(SPELL_LIEUTENANT)) plr->CastSpell(plr, SPELL_RECRUIT, true); + + for(AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end(); ++itr) + { + TeamId team = ((*itr)->x > POS_X_CENTER ? m_defender : m_attacker); + plr->SendUpdateWorldState((*itr)->worldState, AreaPOIIconId[team][DAMAGE_INTACT]); + } + OutdoorPvP::HandlePlayerEnterZone(plr, zone); } |