mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11944] Some whitespace cleanup in SpellAuras (around Shape-Shifting)
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
b828d003bc
commit
f09fa8d245
2 changed files with 20 additions and 18 deletions
|
|
@ -3225,15 +3225,11 @@ void Aura::HandleWaterBreathing(bool /*apply*/, bool /*Real*/)
|
|||
|
||||
void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||
{
|
||||
if(!Real)
|
||||
if (!Real)
|
||||
return;
|
||||
|
||||
uint32 modelid = 0;
|
||||
Powers PowerType = POWER_MANA;
|
||||
ShapeshiftForm form = ShapeshiftForm(m_modifier.m_miscvalue);
|
||||
|
||||
Unit *target = GetTarget();
|
||||
|
||||
SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form);
|
||||
if (!ssEntry)
|
||||
{
|
||||
|
|
@ -3241,6 +3237,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
return;
|
||||
}
|
||||
|
||||
uint32 modelid = 0;
|
||||
Powers PowerType = POWER_MANA;
|
||||
Unit* target = GetTarget();
|
||||
|
||||
if (ssEntry->modelID_A)
|
||||
{
|
||||
// i will asume that creatures will always take the defined model from the dbc
|
||||
|
|
@ -3374,10 +3374,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
target->CastCustomSpell(target, 17099, &furorChance, NULL, NULL, true, NULL, this);
|
||||
}
|
||||
}
|
||||
else if(furorChance) // only if talent known
|
||||
else if (furorChance) // only if talent known
|
||||
{
|
||||
target->SetPower(POWER_RAGE, 0);
|
||||
if(irand(1,100) <= furorChance)
|
||||
if (irand(1, 100) <= furorChance)
|
||||
target->CastSpell(target, 17057, true, NULL, this);
|
||||
}
|
||||
break;
|
||||
|
|
@ -3388,12 +3388,14 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
{
|
||||
uint32 Rage_val = 0;
|
||||
// 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)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
PlayerSpellMap const& sp_list = ((Player *)target)->GetSpellMap();
|
||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||
{
|
||||
if(itr->second.state == PLAYERSPELL_REMOVED) continue;
|
||||
if (itr->second.state == PLAYERSPELL_REMOVED)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139)
|
||||
Rage_val += target->CalculateSpellDamage(target, spellInfo, EFFECT_INDEX_0) * 10;
|
||||
|
|
@ -3417,28 +3419,29 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
for (uint32 i = 0; i < 8; ++i)
|
||||
if (ssEntry->spellId[i])
|
||||
((Player*)target)->addSpell(ssEntry->spellId[i], true, false, false, false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(modelid > 0)
|
||||
if (modelid > 0)
|
||||
target->SetDisplayId(target->GetNativeDisplayId());
|
||||
if(target->getClass() == CLASS_DRUID)
|
||||
|
||||
if (target->getClass() == CLASS_DRUID)
|
||||
target->setPowerType(POWER_MANA);
|
||||
|
||||
target->SetShapeshiftForm(FORM_NONE);
|
||||
|
||||
switch(form)
|
||||
switch (form)
|
||||
{
|
||||
// Nordrassil Harness - bonus
|
||||
case FORM_BEAR:
|
||||
case FORM_DIREBEAR:
|
||||
case FORM_CAT:
|
||||
if(Aura* dummy = target->GetDummyAura(37315) )
|
||||
if (Aura* dummy = target->GetDummyAura(37315))
|
||||
target->CastSpell(target, 37316, true, NULL, dummy);
|
||||
break;
|
||||
// Nordrassil Regalia - bonus
|
||||
case FORM_MOONKIN:
|
||||
if(Aura* dummy = target->GetDummyAura(37324) )
|
||||
if (Aura* dummy = target->GetDummyAura(37324))
|
||||
target->CastSpell(target, 37325, true, NULL, dummy);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -3450,14 +3453,13 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
for (uint32 i = 0; i < 8; ++i)
|
||||
if (ssEntry->spellId[i])
|
||||
((Player*)target)->removeSpell(ssEntry->spellId[i], false, false, false);
|
||||
|
||||
}
|
||||
|
||||
// adding/removing linked auras
|
||||
// add/remove the shapeshift aura's boosts
|
||||
HandleShapeshiftBoosts(apply);
|
||||
|
||||
if(target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)target)->InitDataForForm();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11943"
|
||||
#define REVISION_NR "11944"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue