aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2011-12-10 15:40:55 +0100
committerkaelima <kaelima@live.se>2011-12-10 15:40:55 +0100
commita85ca687eb6c280f775cb90540fa18f87ea1a201 (patch)
treecd1564407dff854b1f50020ec53b5878f2f48320
parent11fb0beaf0cb877b14f24aa88f19832e0aa3dc88 (diff)
Core/Spell: Fixed compile broken in 11fb0beaf0cb877b14f24aa88f19832e0aa3dc88 and renamed _player to player.
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 72a7c79dc69..d8095456fca 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2093,10 +2093,10 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- Player* _player = unitTarget->ToPlayer();
+ Player* player = unitTarget->ToPlayer();
uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell;
- _player->removeSpell(spellToUnlearn);
+ player->removeSpell(spellToUnlearn);
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
}
@@ -5875,16 +5875,15 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
+ Player* player = m_caster->ToPlayer();
+ if (!player)
return;
- Player* _player = m_caster->ToPlayer();
-
Item* foodItem = itemTarget;
if (!foodItem)
return;
- Pet* pet = _player->GetPet();
+ Pet* pet = player->GetPet();
if (!pet)
return;
@@ -5898,7 +5897,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
ExecuteLogEffectDestroyItem(effIndex, foodItem->GetEntry());
uint32 count = 1;
- _player->DestroyItemCount(foodItem, count, true);
+ player->DestroyItemCount(foodItem, count, true);
// TODO: fix crash when a spell has two effects, both pointed at the same item target
m_caster->CastCustomSpell(pet, m_spellInfo->Effects[effIndex].TriggerSpell, &benefit, NULL, NULL, true);
@@ -6097,7 +6096,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- Player* _player = unitTarget->ToPlayer();
+ Player* player = unitTarget->ToPlayer();
int32 rep_change = damage;
@@ -6114,10 +6113,10 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
}
// Bonus from spells that increase reputation gain
- float bonus = rep_change * _player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10%
+ float bonus = rep_change * player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10%
rep_change += (int32)bonus;
- _player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
+ player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
}
void Spell::EffectQuestComplete(SpellEffIndex effIndex)
@@ -6432,12 +6431,11 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
- Player* _player = m_caster->ToPlayer()
-
- if (!_player)
+ Player* player = m_caster->ToPlayer();
+ if (!player)
return;
- Pet* pet = _player->GetPet();
+ Pet* pet = player->GetPet();
if (!pet || pet->isAlive())
return;
@@ -6445,8 +6443,8 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
return;
float x, y, z;
- _player->GetPosition(x, y, z);
- _player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation());
+ player->GetPosition(x, y, z);
+ player->GetMap()->CreatureRelocation(pet, x, y, z, player->GetOrientation());
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
@@ -6455,7 +6453,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
pet->SetHealth(pet->CountPctFromMaxHealth(damage));
//pet->AIM_Initialize();
- //_player->PetSpellInitialize();
+ //player->PetSpellInitialize();
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
}