Merge pull request #8174 from tibbi/sota

correcting SotA teleports + cleanup
This commit is contained in:
Subv committed 2012-10-25 05:56:01 -07:00
commit 69a81836ab
3 files changed
+24 -33

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;
}