Core/GameObjects: defined and implemented playerCast field for GAMEOBJECT_TYPE_SPELLCASTER
This commit is contained in:
1 parent
e4f49225d0
commit
68e5567583
2 files changed
+6
-1
No files matched your search
@@ -2236,7 +2236,11 @@ void GameObject::Use(Unit* user)
|
||||
sOutdoorPvPMgr->HandleCustomSpell(player, spellId, this);
|
||||
|
||||
// Only count successful spell casts as uses
|
||||
if (CastSpell(user, spellId) == SPELL_CAST_OK)
|
||||
WorldObject* caster = this;
|
||||
if (m_goInfo->spellcaster.playerCast != 0 && user->IsPlayer())
|
||||
caster = user;
|
||||
|
||||
if (caster->CastSpell(user, spellId) == SPELL_CAST_OK)
|
||||
AddUse();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user