aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortartalo <none@none>2009-10-18 17:39:10 +0200
committertartalo <none@none>2009-10-18 17:39:10 +0200
commit04815ec5312c9095e77481d37f14653488579954 (patch)
treea6ad823a3942bd364163508214981584bd63535d /src
parent696ac6271ce83c616e797c36983961843ea85a06 (diff)
*Wintergrasp: Tenacity wasn't keeping %hp. By Spp
*Wintergrasp: Teleporters were usable by attackers outside wartime. By Spp *Wintergrasp: Siege Towers were invisible to players. By Spp --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Wintergrasp.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index d6471f826c0..711d6bc5568 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -421,6 +421,8 @@ WintergraspCreType OPvPWintergrasp::GetCreatureType(uint32 entry) const
case 28094: // Demolisher
case 28312: // Alliance Siege Engine
case 32627: // Horde Siege Engine
+ case 28319: // Siege turret
+ case 32629: // Siege turret
return CREATURE_SIEGE_VEHICLE;
case 28366: // Wintergrasp Tower cannon
return CREATURE_TURRET;
@@ -717,10 +719,10 @@ bool OPvPWintergrasp::UpdateGameObjectInfo(GameObject *go) const
switch(go->GetGOInfo()->displayId)
{
case 8244: // Defender's Portal - Vehicle Teleporter
- go->SetUInt32Value(GAMEOBJECT_FACTION, defFaction);
+ go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[getDefenderTeam()]);
return true;
case 7967: // Titan relic
- go->SetUInt32Value(GAMEOBJECT_FACTION, attFaction);
+ go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[getAttackerTeam()]);
return true;
case 8165: // Wintergrasp Keep Door
@@ -859,13 +861,13 @@ void OPvPWintergrasp::CastTenacity(Unit *unit, int32 newStack)
return;
uint32 spellId = unit->GetTypeId() == TYPEID_PLAYER ? SPELL_TENACITY : SPELL_TENACITY_VEHICLE;
-
+ float percent = ((float)unit->GetHealth()) / unit->GetMaxHealth();
if (newStack)
unit->SetAuraStack(spellId, unit, newStack);
else
unit->RemoveAura(spellId);
if (unit->GetTypeId() != TYPEID_PLAYER || unit->isAlive())
- unit->SetHealth(uint32(unit->GetMaxHealth()*((float)unit->GetHealth()) / unit->GetMaxHealth()));
+ unit->SetHealth(uint32(unit->GetMaxHealth()*percent));
}
// Recalculates Tenacity and applies it to Players / Vehicles