mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Integrate Script system to Core
-added ScriptMgr for loading scripts -removed bindings -moved script system to src/game -moved scripts to src/scripts -VC project files updated -cmakes updated (not 100% done yet) NOTE to Devs: -file locations changed -precompiled renamed to ScriptedPch -ecsort_ai renamed to ScriptedEscortAI -follower_ai renamed to ScriptedFollowerAI -guard_ai renamed to ScriptedGuardAI -simple_ai renamed to ScriptedSimpleAI -sc_creature renamed to ScriptedCreature -sc_gossip renamed to ScriptedGossip -sc_instance renamed to ScriptedInstance *use the new headers in scripts, thank you NOTE to ALL: cmake not fully tested, please report any errors with it could make creashes, incompability USE AT YOUR OWN RISK before further tests!! --HG-- branch : trunk
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
@@ -146,7 +147,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.ItemUse(pUser,pItem,targets))
|
||||
{
|
||||
// no script or script not process request by self
|
||||
pUser->CastItemUseSpell(pItem,targets,cast_count,glyphIndex);
|
||||
@@ -257,7 +258,7 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
||||
if(!obj)
|
||||
return;
|
||||
|
||||
if (Script->GOHello(_player, obj))
|
||||
if (sScriptMgr.GOHello(_player, obj))
|
||||
return;
|
||||
|
||||
obj->Use(_player);
|
||||
|
||||
Reference in New Issue
Block a user