mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7454] Support scripting for dummy spell effects.
Note: scripting calls specially added in end of function for allow calling only
if internal implementaion absent for dummy effect.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
bc57ab7c58
commit
f280c96770
6 changed files with 56 additions and 4 deletions
|
|
@ -274,6 +274,36 @@ InstanceData* CreateInstanceData(Map *map)
|
|||
return tmpscript->GetInstanceData(map);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool EffectDummyGameObj(Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget )
|
||||
{
|
||||
Script *tmpscript = m_scripts[gameObjTarget->GetGOInfo()->ScriptId];
|
||||
|
||||
if (!tmpscript || !tmpscript->pEffectDummyGameObj) return false;
|
||||
|
||||
return tmpscript->pEffectDummyGameObj(caster, spellId,effIndex,gameObjTarget);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool EffectDummyCreature(Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget )
|
||||
{
|
||||
Script *tmpscript = m_scripts[crTarget->GetScriptId()];
|
||||
|
||||
if (!tmpscript || !tmpscript->pEffectDummyCreature) return false;
|
||||
|
||||
return tmpscript->pEffectDummyCreature(caster, spellId,effIndex,crTarget);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool EffectDummyItem(Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget )
|
||||
{
|
||||
Script *tmpscript = m_scripts[itemTarget->GetProto()->ScriptId];
|
||||
|
||||
if (!tmpscript || !tmpscript->pEffectDummyItem) return false;
|
||||
|
||||
return tmpscript->pEffectDummyItem(caster, spellId,effIndex,itemTarget);
|
||||
}
|
||||
|
||||
void ScriptedAI::UpdateAI(const uint32)
|
||||
{
|
||||
//Check if we have a current target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue