[8252] Move DB scripting code from global World to Map.

This one more step to pre-map events proccesing and parallel in future.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ambal 2009-07-26 12:18:31 +04:00 committed by VladimirMangos
parent 7ac4dc6f13
commit 64f11bedf7
8 changed files with 757 additions and 741 deletions

View file

@ -865,7 +865,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
@ -961,7 +961,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
@ -984,7 +984,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;
}