[10935] Move script calls to ScriptMgr

- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
zergtmn 2010-12-29 21:48:06 +05:00
parent 918e646ca2
commit ec6089bbd8
32 changed files with 454 additions and 435 deletions

View file

@ -25,7 +25,7 @@
#include "Log.h"
#include "Opcodes.h"
#include "Spell.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
#include "Totem.h"
#include "SpellAuras.h"
@ -177,7 +177,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
}
//Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state.
if(!Script->ItemUse(pUser,pItem,targets))
if (!sScriptMgr.OnItemUse(pUser, pItem, targets))
{
// no script or script not process request by self
pUser->CastItemUseSpell(pItem,targets,cast_count,glyphIndex);