aboutsummaryrefslogtreecommitdiff
path: root/src/game/Wintergrasp.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-13 16:16:45 -0700
committermaximius <none@none>2009-10-13 16:16:45 -0700
commit8a5ac3834d120c4dc0efbb4369b859e318635fce (patch)
treed6a5314b565de2ab45bd64a35b71b05a3c3b1c42 /src/game/Wintergrasp.cpp
parentf413a988621d36742cf5894460639f64edb4adf3 (diff)
*Wintersgrasp - prevents team from using vehicles to damage their own buildings, by Spp
*Wintersgrasp - restore proper faction of units in Unit::RestoreFaction(), don't just always use faction_A, by Spp --HG-- branch : trunk
Diffstat (limited to 'src/game/Wintergrasp.cpp')
-rw-r--r--src/game/Wintergrasp.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index 8305d76ec47..4ebd7c3c6a6 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -630,6 +630,7 @@ bool OPvPWintergrasp::UpdateCreatureInfo(Creature *creature) const
bool OPvPWintergrasp::UpdateGameObjectInfo(GameObject *go) const
{
+/*
switch(go->GetEntry())
{
// Defender's Portal
@@ -641,6 +642,27 @@ bool OPvPWintergrasp::UpdateGameObjectInfo(GameObject *go) const
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[OTHER_TEAM(m_defender)]);
return true;
}
+*/
+ const GameObjectInfo *gInfo = objmgr.GetGameObjectInfo(go->GetEntry());
+ if (!gInfo)
+ return false;
+
+ switch(gInfo->displayId)
+ {
+ case 8165: // Wintergrasp Keep Door
+ case 7877: // Wintergrasp Fortress Wall
+ case 7878: // Wintergrasp Keep Tower
+ case 7906: // Wintergrasp Fortress Gate
+ case 7909: // Wintergrasp Wall
+ case 8244: // Defender's Portal - Vehicle Teleporter
+ go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_defender]);
+ return true;
+ case 7900: // Flamewatch Tower - Shadowsight Tower - Winter's Edge Tower
+ case 7967: // Titan relic
+ go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[OTHER_TEAM(m_defender)]);
+ return true;
+// case 8208: // Goblin Workshop
+ }
// Note: this is only for test, still need db support
TeamPairMap::const_iterator itr = m_goDisplayPair.find(go->GetGOInfo()->displayId);