mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11989] Add support to call spell_scripts in more cases
* Support to script Dummy spells with spell_scripts * Support to script TriggerSpell spells which have no existing triggered spell Note that the order which spell-effect actually triggers the DB script is well-defined (SCRIPT_EFFECT before DUMMY before other) Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
dd1d913ff2
commit
83d7d86255
9 changed files with 86 additions and 22 deletions
|
|
@ -1606,12 +1606,12 @@ void BattleGroundMap::UnloadAll(bool pForce)
|
|||
}
|
||||
|
||||
/// Put scripts in the execution queue
|
||||
void Map::ScriptsStart(ScriptMapMapName const& scripts, uint32 id, Object* source, Object* target)
|
||||
bool Map::ScriptsStart(ScriptMapMapName const& scripts, uint32 id, Object* source, Object* target)
|
||||
{
|
||||
///- Find the script map
|
||||
ScriptMapMap::const_iterator s = scripts.second.find(id);
|
||||
if (s == scripts.second.end())
|
||||
return;
|
||||
return false;
|
||||
|
||||
// prepare static data
|
||||
ObjectGuid sourceGuid = source->GetObjectGuid();
|
||||
|
|
@ -1634,6 +1634,8 @@ void Map::ScriptsStart(ScriptMapMapName const& scripts, uint32 id, Object* sourc
|
|||
///- If one of the effects should be immediate, launch the script execution
|
||||
if (immedScript)
|
||||
ScriptsProcess();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue