aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Auras
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2017-01-01 19:51:14 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2017-01-01 19:51:14 +0100
commitc23dd79dfabdb310c3cd96d0955ab995b7c2e2f7 (patch)
tree59cb0b7d069ccebbb733bf7a984ae90edb82ce41 /src/server/game/Spells/Auras
parent86b98686a95e23247ecb774fb23ecd5b8d94b97b (diff)
Core/Entities: fixed array size
Core/Misc: fixed compile warning
Diffstat (limited to 'src/server/game/Spells/Auras')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp54
1 files changed, 4 insertions, 50 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 2eff3586d9c..96bf92a5cf8 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1737,57 +1737,13 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (!(mode & AURA_EFFECT_HANDLE_REAL))
return;
+ SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(GetMiscValue());
+ ASSERT(shapeInfo, "Spell %u uses unknown ShapeshiftForm (%u).", GetId(), GetMiscValue());
+
Unit* target = aurApp->GetTarget();
- uint32 modelid = 0;
- Powers PowerType = POWER_MANA;
ShapeshiftForm form = ShapeshiftForm(GetMiscValue());
-
- switch (form)
- {
- case FORM_CAT_FORM:
- case FORM_GHOUL:
- case FORM_TIGER_STANCE:
- case FORM_OX_STANCE:
- PowerType = POWER_ENERGY;
- break;
-
- case FORM_BEAR_FORM:
-
- case FORM_BATTLE_STANCE:
- case FORM_DEFENSIVE_STANCE:
- case FORM_BERSERKER_STANCE:
- PowerType = POWER_RAGE;
- break;
-
- case FORM_TREE_OF_LIFE:
- case FORM_TRAVEL_FORM:
- case FORM_AQUATIC_FORM:
- case FORM_AMBIENT:
-
- case FORM_THARONJA_SKELETON:
- case FORM_DARKMOON_TEST_OF_STRENGTH:
- case FORM_BLB_PLAYER:
- case FORM_SHADOW_DANCE:
- case FORM_CRANE_STANCE:
- case FORM_GHOST_WOLF:
-
- case FORM_SERPENT_STANCE:
- case FORM_ZOMBIE:
- case FORM_METAMORPHOSIS:
- case FORM_UNDEAD:
- case FORM_FLIGHT_FORM_EPIC:
- case FORM_SHADOWFORM:
- case FORM_FLIGHT_FORM:
- case FORM_STEALTH:
- case FORM_MOONKIN_FORM:
- case FORM_SPIRIT_OF_REDEMPTION:
- break;
- default:
- TC_LOG_ERROR("spells", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
- }
-
- modelid = target->GetModelForForm(form);
+ uint32 modelid = target->GetModelForForm(form);
if (apply)
{
@@ -1919,8 +1875,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (target->GetTypeId() == TYPEID_PLAYER)
{
- SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
- ASSERT(shapeInfo);
// Learn spells for shapeshift form - no need to send action bars or add spells to spellbook
for (uint8 i = 0; i < MAX_SHAPESHIFT_SPELLS; ++i)
{