mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7588] Remove redendent GO support and switch back to original suggested by Lightguard version with Unit only case
This commit is contained in:
parent
e090283840
commit
840d7d5e0a
4 changed files with 3 additions and 7 deletions
|
|
@ -120,7 +120,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
||||||
void SpellHit(Unit *, const SpellEntry*){}
|
void SpellHit(Unit *, const SpellEntry*){}
|
||||||
|
|
||||||
// Called when spell hits creature's target
|
// Called when spell hits creature's target
|
||||||
void SpellHitTarget(WorldObject*, const SpellEntry*) {}
|
void SpellHitTarget(Unit*, const SpellEntry*) {}
|
||||||
|
|
||||||
Creature* m_creature;
|
Creature* m_creature;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class MANGOS_DLL_SPEC CreatureAI
|
||||||
virtual void SpellHit(Unit*, const SpellEntry*) {}
|
virtual void SpellHit(Unit*, const SpellEntry*) {}
|
||||||
|
|
||||||
// Called when spell hits creature's target
|
// Called when spell hits creature's target
|
||||||
virtual void SpellHitTarget(WorldObject*, const SpellEntry*) {}
|
virtual void SpellHitTarget(Unit*, const SpellEntry*) {}
|
||||||
|
|
||||||
// Called when vitim entered water and creature can not enter water
|
// Called when vitim entered water and creature can not enter water
|
||||||
virtual bool canReachByRangeAttack(Unit*) { return false; }
|
virtual bool canReachByRangeAttack(Unit*) { return false; }
|
||||||
|
|
|
||||||
|
|
@ -1223,10 +1223,6 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
|
||||||
// ignore autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
// ignore autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||||
if( m_caster->GetTypeId() == TYPEID_PLAYER && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive() )
|
if( m_caster->GetTypeId() == TYPEID_PLAYER && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive() )
|
||||||
((Player*)m_caster)->CastedCreatureOrGO(go->GetEntry(),go->GetGUID(),m_spellInfo->Id);
|
((Player*)m_caster)->CastedCreatureOrGO(go->GetEntry(),go->GetGUID(),m_spellInfo->Id);
|
||||||
|
|
||||||
// Call scripted function for AI if this spell is casted by a creature
|
|
||||||
if(m_caster->GetTypeId()==TYPEID_UNIT && ((Creature*)m_caster)->AI())
|
|
||||||
((Creature*)m_caster)->AI()->SpellHitTarget(go,m_spellInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::DoAllEffectOnTarget(ItemTargetInfo *target)
|
void Spell::DoAllEffectOnTarget(ItemTargetInfo *target)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7587"
|
#define REVISION_NR "7588"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue