*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
This commit is contained in:
@@ -421,6 +421,8 @@ WintergraspCreType OPvPWintergrasp::GetCreatureType(uint32 entry) const
|
|||||||
case 28094: // Demolisher
|
case 28094: // Demolisher
|
||||||
case 28312: // Alliance Siege Engine
|
case 28312: // Alliance Siege Engine
|
||||||
case 32627: // Horde Siege Engine
|
case 32627: // Horde Siege Engine
|
||||||
|
case 28319: // Siege turret
|
||||||
|
case 32629: // Siege turret
|
||||||
return CREATURE_SIEGE_VEHICLE;
|
return CREATURE_SIEGE_VEHICLE;
|
||||||
case 28366: // Wintergrasp Tower cannon
|
case 28366: // Wintergrasp Tower cannon
|
||||||
return CREATURE_TURRET;
|
return CREATURE_TURRET;
|
||||||
@@ -717,10 +719,10 @@ bool OPvPWintergrasp::UpdateGameObjectInfo(GameObject *go) const
|
|||||||
switch(go->GetGOInfo()->displayId)
|
switch(go->GetGOInfo()->displayId)
|
||||||
{
|
{
|
||||||
case 8244: // Defender's Portal - Vehicle Teleporter
|
case 8244: // Defender's Portal - Vehicle Teleporter
|
||||||
go->SetUInt32Value(GAMEOBJECT_FACTION, defFaction);
|
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[getDefenderTeam()]);
|
||||||
return true;
|
return true;
|
||||||
case 7967: // Titan relic
|
case 7967: // Titan relic
|
||||||
go->SetUInt32Value(GAMEOBJECT_FACTION, attFaction);
|
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[getAttackerTeam()]);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 8165: // Wintergrasp Keep Door
|
case 8165: // Wintergrasp Keep Door
|
||||||
@@ -859,13 +861,13 @@ void OPvPWintergrasp::CastTenacity(Unit *unit, int32 newStack)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 spellId = unit->GetTypeId() == TYPEID_PLAYER ? SPELL_TENACITY : SPELL_TENACITY_VEHICLE;
|
uint32 spellId = unit->GetTypeId() == TYPEID_PLAYER ? SPELL_TENACITY : SPELL_TENACITY_VEHICLE;
|
||||||
|
float percent = ((float)unit->GetHealth()) / unit->GetMaxHealth();
|
||||||
if (newStack)
|
if (newStack)
|
||||||
unit->SetAuraStack(spellId, unit, newStack);
|
unit->SetAuraStack(spellId, unit, newStack);
|
||||||
else
|
else
|
||||||
unit->RemoveAura(spellId);
|
unit->RemoveAura(spellId);
|
||||||
if (unit->GetTypeId() != TYPEID_PLAYER || unit->isAlive())
|
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
|
// Recalculates Tenacity and applies it to Players / Vehicles
|
||||||
|
|||||||
Reference in New Issue
Block a user