diff options
| author | thenecromancer <none@none> | 2010-03-11 20:51:31 +0100 |
|---|---|---|
| committer | thenecromancer <none@none> | 2010-03-11 20:51:31 +0100 |
| commit | e1542df90ccde91e2f7fded2d5378d77b1f9ea84 (patch) | |
| tree | a2d4cfaa4ede97263b30ce11c8ff1450361de846 /src/game/SpellAuraEffects.cpp | |
| parent | 02a9cd6a43a18f2350801bd9473c2346b36b0575 (diff) | |
Convert some C style casts to new functions
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuraEffects.cpp')
| -rw-r--r-- | src/game/SpellAuraEffects.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 5ea6a776ea3..18377b86541 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -2385,20 +2385,20 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const if (spellId) { if(target->GetTypeId() == TYPEID_PLAYER) - ((Player *)target)->RemoveSpellCooldown(spellId); + target->ToPlayer()->RemoveSpellCooldown(spellId); target->CastSpell(target, spellId, true, NULL, this ); } if (spellId2) { if(target->GetTypeId() == TYPEID_PLAYER) - ((Player *)target)->RemoveSpellCooldown(spellId2); + target->ToPlayer()->RemoveSpellCooldown(spellId2); target->CastSpell(target, spellId2, true, NULL, this); } if(target->GetTypeId() == TYPEID_PLAYER) { - const PlayerSpellMap& sp_list = ((Player *)target)->GetSpellMap(); + const PlayerSpellMap& sp_list = target->ToPlayer()->GetSpellMap(); for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) { if(itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) continue; @@ -2886,7 +2886,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m // Stance mastery + Tactical mastery (both passive, and last have aura only in defense stance, but need apply at any stance switch) if(target->GetTypeId() == TYPEID_PLAYER) { - PlayerSpellMap const& sp_list = ((Player *)target)->GetSpellMap(); + PlayerSpellMap const& sp_list = target->ToPlayer()->GetSpellMap(); for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) { if(itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) continue; @@ -5834,7 +5834,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo { // Play part 1 if(apply) - target->PlayDirectSound(14970, (Player *)target); + target->PlayDirectSound(14970, target->ToPlayer()); // continue in 58205 else target->CastSpell(target, 58205, true); @@ -5846,10 +5846,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo { // Play part 2 if(apply) - target->PlayDirectSound(14971, (Player *)target); + target->PlayDirectSound(14971, target->ToPlayer()); // Play part 3 else - target->PlayDirectSound(14972, (Player *)target); + target->PlayDirectSound(14972, target->ToPlayer()); } break; } |
