mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Refactored db_scripts
The unity! - Based on the original work of H0zen for Zero.
This commit is contained in:
parent
a92011c6bf
commit
695651324c
15 changed files with 415 additions and 482 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue