[9891] Implement *_scripts for creature_movement

New field script_id in creature_movement can be filled for each waypoint point and run the corresponding script from creature_movement_scripts.
Script_id can be any value and several points/creatures can share the same script (with limits of course, such as script depending on location and other factors).

DB projects are advised to move current text, spells and emotes data in creature_movement fields as these fields are strictly no longer needed and may be fully removed in the future.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-05-14 12:15:50 +02:00
parent 5a72466935
commit 312a076491
12 changed files with 110 additions and 9 deletions

View file

@ -57,6 +57,7 @@ ScriptMapMap sSpellScripts;
ScriptMapMap sGameObjectScripts;
ScriptMapMap sEventScripts;
ScriptMapMap sGossipScripts;
ScriptMapMap sCreatureMovementScripts;
bool normalizePlayerName(std::string& name)
{
@ -4579,6 +4580,11 @@ void ObjectMgr::LoadGossipScripts()
// checks are done in LoadGossipMenuItems
}
void ObjectMgr::LoadCreatureMovementScripts()
{
LoadScripts(sCreatureMovementScripts, "creature_movement_scripts");
}
void ObjectMgr::LoadPageTexts()
{
sPageTextStore.Free(); // for reload case
@ -8477,6 +8483,7 @@ void ObjectMgr::LoadDbScriptStrings()
CheckScripts(sGameObjectScripts,ids);
CheckScripts(sEventScripts,ids);
CheckScripts(sGossipScripts,ids);
CheckScripts(sCreatureMovementScripts,ids);
sWaypointMgr.CheckTextsExistance(ids);