BF/Wintergrasp: Removed uneeded check , it has been performed on every tick update. It is already handled by the aura system.

Furthermore, the aura is correctly added to the spirits using creature_template_addon, the statements for this are already in Template_update.sql
This commit is contained in:
Manuel Carrasco
2012-02-28 22:07:35 -03:00
committed by Kandera
parent ecb5adef24
commit c580ec24a7
2 changed files with 0 additions and 39 deletions

View File

@@ -221,23 +221,6 @@ bool BattlefieldWG::Update(uint32 diff)
else
m_saveTimer -= diff;
for (GuidSet::const_iterator itr = m_PlayersIsSpellImu.begin(); itr != m_PlayersIsSpellImu.end(); ++itr)
if (Player* player = sObjectAccessor->FindPlayer(*itr))
{
if (player->HasAura(SPELL_SPIRITUAL_IMMUNITY))
{
const WorldSafeLocsEntry *graveyard = GetClosestGraveYard(player);
if (graveyard)
{
if (player->GetDistance2d(graveyard->x, graveyard->y) > 10.0f)
{
player->RemoveAurasDueToSpell(SPELL_SPIRITUAL_IMMUNITY);
m_PlayersIsSpellImu.erase(player->GetGUID());
}
}
}
}
if (m_BattlefieldActive)
{
for (uint8 team = 0; team < 2; ++team)
@@ -268,22 +251,6 @@ bool BattlefieldWG::Update(uint32 diff)
return m_return;
}
void BattlefieldWG::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid)
{
Battlefield::AddPlayerToResurrectQueue(npc_guid, player_guid);
if (IsWarTime())
{
if (Player* player = sObjectAccessor->FindPlayer(player_guid))
{
if (!player->HasAura(SPELL_SPIRITUAL_IMMUNITY))
{
player->CastSpell(player, SPELL_SPIRITUAL_IMMUNITY, true);
m_PlayersIsSpellImu.insert(player->GetGUID());
}
}
}
}
void BattlefieldWG::OnBattleStart()
{
// Spawn titan relic

View File

@@ -365,11 +365,6 @@ class BattlefieldWG : public Battlefield
void DoCompleteOrIncrementAchievement(uint32 achievement, Player *player, uint8 incrementNumber = 1);
/**
* \brief called when a player is die, for add him to resurrect queue
*/
void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid);
/**
* \brief Called when battlefield is setup, at server start
*/
@@ -425,7 +420,6 @@ class BattlefieldWG : public Battlefield
GameObjectSet DefenderPortalList;
GameObjectSet m_KeepGameObject[2];
GuidSet m_vehicles[2];
GuidSet m_PlayersIsSpellImu; // Player is dead
uint32 m_tenacityStack;
uint32 m_saveTimer;
};