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;
|
||||
}
|
||||
|
||||
@@ -287,6 +287,7 @@ struct GameObjectTemplate
|
||||
uint32 allowMounted; //3 Is usable while on mount/vehicle. (0/1)
|
||||
uint32 GiganticAOI; //4
|
||||
uint32 conditionID1; //5
|
||||
uint32 playerCast; //6
|
||||
} spellcaster;
|
||||
//23 GAMEOBJECT_TYPE_MEETINGSTONE
|
||||
struct
|
||||
|
||||
Reference in new issue
Block a user