mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
[8252] Move DB scripting code from global World to Map. Author: Ambal
This one more step to pre-map events proccesing and parallel in future.
[8256] Restore DB script loading broken after [8252]. Author: VladimirMangos
Also propetly decrease scheduled DB script actions at map unloading.
Some code style restore.
--HG--
branch : trunk
This commit is contained in:
@@ -949,7 +949,7 @@ void GameObject::Use(Unit* user)
|
||||
UseDoorOrButton();
|
||||
|
||||
// activate script
|
||||
sWorld.ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this);
|
||||
GetMap()->ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this);
|
||||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: //2
|
||||
@@ -1045,7 +1045,7 @@ void GameObject::Use(Unit* user)
|
||||
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
|
||||
|
||||
if (info->goober.eventId)
|
||||
sWorld.ScriptsStart(sEventScripts, info->goober.eventId, player, this);
|
||||
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
|
||||
}
|
||||
|
||||
// cast this spell later if provided
|
||||
@@ -1068,7 +1068,7 @@ void GameObject::Use(Unit* user)
|
||||
player->SendCinematicStart(info->camera.cinematicId);
|
||||
|
||||
if (info->camera.eventID)
|
||||
sWorld.ScriptsStart(sEventScripts, info->camera.eventID, player, this);
|
||||
GetMap()->ScriptsStart(sEventScripts, info->camera.eventID, player, this);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user