mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7742] Fix my prev. commit
Use already defined method for getting charmer or owner player or player itself. Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
8e39ea0151
commit
8168b0f2eb
3 changed files with 4 additions and 15 deletions
|
|
@ -1093,7 +1093,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||
// ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
if( !((Creature*)unit)->isPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive() )
|
||||
{
|
||||
if ( Player* p = GetPlayerForCastQuestCond() )
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
p->CastedCreatureOrGO(unit->GetEntry(),unit->GetGUID(),m_spellInfo->Id);
|
||||
}
|
||||
|
||||
|
|
@ -1242,7 +1242,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
|
|||
// ignore autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
if( !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive() )
|
||||
{
|
||||
if ( Player* p = GetPlayerForCastQuestCond() )
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
p->CastedCreatureOrGO(go->GetEntry(),go->GetGUID(),m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
|
|
@ -2699,7 +2699,7 @@ void Spell::update(uint32 difftime)
|
|||
// ignore autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
if( !IsAutoRepeat() && !IsNextMeleeSwingSpell() )
|
||||
{
|
||||
if ( Player* p = GetPlayerForCastQuestCond() )
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
{
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue