Totem* casts.
--HG-- branch : trunk
This commit is contained in:
@@ -6966,7 +6966,7 @@ void Spell::EffectDestroyAllTotems(uint32 /*i*/)
|
|||||||
mana += spellInfo->manaCost;
|
mana += spellInfo->manaCost;
|
||||||
mana += spellInfo->ManaCostPercentage * m_caster->GetCreateMana() / 100;
|
mana += spellInfo->ManaCostPercentage * m_caster->GetCreateMana() / 100;
|
||||||
}
|
}
|
||||||
((Totem*)totem)->UnSummon();
|
totem->ToTotem()->UnSummon();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mana = mana * damage / 100;
|
mana = mana * damage / 100;
|
||||||
@@ -7430,7 +7430,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (caster->isTotem())
|
if (caster->isTotem())
|
||||||
caster = ((Totem*)caster)->GetOwner();
|
caster = caster->ToTotem()->GetOwner();
|
||||||
|
|
||||||
// in another case summon new
|
// in another case summon new
|
||||||
uint8 level = caster->getLevel();
|
uint8 level = caster->getLevel();
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ void WorldSession::HandleTotemDestroyed( WorldPacket& recvPacket)
|
|||||||
Creature* totem = GetPlayer()->GetMap()->GetCreature(_player->m_SummonSlot[slotId]);
|
Creature* totem = GetPlayer()->GetMap()->GetCreature(_player->m_SummonSlot[slotId]);
|
||||||
// Don't unsummon sentry totem
|
// Don't unsummon sentry totem
|
||||||
if(totem && totem->isTotem() && totem->GetEntry() != SENTRY_TOTEM_ENTRY)
|
if(totem && totem->isTotem() && totem->GetEntry() != SENTRY_TOTEM_ENTRY)
|
||||||
((Totem*)totem)->UnSummon();
|
totem->ToTotem()->UnSummon();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
|
void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
|
||||||
|
|||||||
@@ -56,14 +56,14 @@ void TotemAI::EnterEvadeMode()
|
|||||||
void
|
void
|
||||||
TotemAI::UpdateAI(const uint32 /*diff*/)
|
TotemAI::UpdateAI(const uint32 /*diff*/)
|
||||||
{
|
{
|
||||||
if (((Totem*)m_creature)->GetTotemType() != TOTEM_ACTIVE)
|
if ( m_creature->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_creature->isAlive() || m_creature->IsNonMeleeSpellCasted(false))
|
if (!m_creature->isAlive() || m_creature->IsNonMeleeSpellCasted(false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Search spell
|
// Search spell
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(((Totem*)m_creature)->GetSpell());
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_creature->ToTotem()->GetSpell());
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ TotemAI::UpdateAI(const uint32 /*diff*/)
|
|||||||
|
|
||||||
// attack
|
// attack
|
||||||
m_creature->SetInFront(victim); // client change orientation by self
|
m_creature->SetInFront(victim); // client change orientation by self
|
||||||
m_creature->CastSpell(victim, ((Totem*)m_creature)->GetSpell(), false);
|
m_creature->CastSpell(victim, m_creature->ToTotem()->GetSpell(), false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
i_victimGuid = 0;
|
i_victimGuid = 0;
|
||||||
|
|||||||
+3
-3
@@ -3736,8 +3736,8 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
|
|||||||
// Remove totem at next update if totem looses its aura
|
// Remove totem at next update if totem looses its aura
|
||||||
if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && this->ToCreature()->isTotem()&& ((TempSummon*)this)->GetSummonerGUID() == aura->GetCasterGUID())
|
if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && this->ToCreature()->isTotem()&& ((TempSummon*)this)->GetSummonerGUID() == aura->GetCasterGUID())
|
||||||
{
|
{
|
||||||
if (((Totem*)this)->GetSpell() == aura->GetId() && ((Totem*)this)->GetTotemType() == TOTEM_PASSIVE)
|
if (this->ToTotem()->GetSpell() == aura->GetId() && this->ToTotem()->GetTotemType() == TOTEM_PASSIVE)
|
||||||
((Totem*)this)->setDeathState(JUST_DIED);
|
this->ToTotem()->setDeathState(JUST_DIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove aurastates only if were not found
|
// Remove aurastates only if were not found
|
||||||
@@ -9341,7 +9341,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
|||||||
else if (minion->isTotem())
|
else if (minion->isTotem())
|
||||||
{
|
{
|
||||||
// All summoned by totem minions must disappear when it is removed.
|
// All summoned by totem minions must disappear when it is removed.
|
||||||
if (const SpellEntry* spInfo = sSpellStore.LookupEntry(((Totem*)minion)->GetSpell()))
|
if (const SpellEntry* spInfo = sSpellStore.LookupEntry(minion->ToTotem()->GetSpell()))
|
||||||
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||||
{
|
{
|
||||||
if (spInfo->Effect[i] != SPELL_EFFECT_SUMMON)
|
if (spInfo->Effect[i] != SPELL_EFFECT_SUMMON)
|
||||||
|
|||||||
Reference in New Issue
Block a user