correcting SotA teleports + cleanup

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

No files matched your search

+2 -1
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;
}