correcting SotA teleports + cleanup

This commit is contained in:
tibbi
2012-10-24 14:51:42 +01:00
parent ca85c3b475
commit f8ce00acca
3 changed files with 22 additions and 31 deletions

View File

@@ -559,7 +559,8 @@ public:
{
if (Battlefield* wg = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
if (Player* target = GetExplTargetUnit()->ToPlayer())
if (target->GetTeamId() != wg->GetDefenderTeam() || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER))
// check if we are in Wintergrasp at all, SotA uses same teleport spells
if ((target->GetZoneId() == 4197) && target->GetTeamId() != wg->GetDefenderTeam() || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER))
return SPELL_FAILED_BAD_TARGETS;
return SPELL_CAST_OK;
}