Refactored db_scripts

The unity! - Based on the original work of H0zen for Zero.
This commit is contained in:
Antz 2017-01-20 00:10:08 +00:00 committed by Antz
parent a92011c6bf
commit 695651324c
15 changed files with 415 additions and 482 deletions

View file

@ -1116,7 +1116,7 @@ void GameObject::Use(Unit* user)
bool scriptReturnValue = user->GetTypeId() == TYPEID_PLAYER && sScriptMgr.OnGameObjectUse((Player*)user, this);
if (!scriptReturnValue)
{ GetMap()->ScriptsStart(sGameObjectTemplateScripts, GetEntry(), spellCaster, this); }
{ GetMap()->ScriptsStart(DBS_ON_GOT_USE, GetEntry(), spellCaster, this); }
switch (GetGoType())
{
@ -1127,7 +1127,7 @@ void GameObject::Use(Unit* user)
// activate script
if (!scriptReturnValue)
{ GetMap()->ScriptsStart(sGameObjectScripts, GetGUIDLow(), spellCaster, this); }
{ GetMap()->ScriptsStart(DBS_ON_GO_USE, GetGUIDLow(), spellCaster, this); }
return;
}
case GAMEOBJECT_TYPE_BUTTON: // 1
@ -1139,7 +1139,7 @@ void GameObject::Use(Unit* user)
// activate script
if (!scriptReturnValue)
{ GetMap()->ScriptsStart(sGameObjectScripts, GetGUIDLow(), spellCaster, this); }
{ GetMap()->ScriptsStart(DBS_ON_GO_USE, GetGUIDLow(), spellCaster, this); }
return;
}
@ -1353,7 +1353,7 @@ void GameObject::Use(Unit* user)
// activate script
if (!scriptReturnValue)
GetMap()->ScriptsStart(sGameObjectScripts, GetGUIDLow(), spellCaster, this);
{ GetMap()->ScriptsStart(DBS_ON_GO_USE, GetGUIDLow(), spellCaster, this); }
else
return;