*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:
Rat
2010-01-19 11:36:05 +01:00
parent f5dea61b66
commit 0cc053ea4d
601 changed files with 3908 additions and 7245 deletions

View File

@@ -44,6 +44,7 @@
#include "Util.h"
#include "ScriptCalls.h"
#include "SpellId.h"
#include "ScriptMgr.h"
class LoginQueryHolder : public SqlQueryHolder
{
@@ -817,8 +818,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
m_playerLoading = false;
//Hook for OnLogin Event
Script->OnLogin(pCurrChar);
sScriptMgr.OnLogin(pCurrChar);
delete holder;
}
@@ -1381,45 +1381,45 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
void WorldSession::HandleOnPVPKill(Player *killed)
{
Script->OnPVPKill(GetPlayer(), killed);
sScriptMgr.OnPVPKill(GetPlayer(), killed);
}
bool WorldSession::HandleOnPlayerChat(const char *text)
{
return Script->OnPlayerChat(GetPlayer(), text);
return sScriptMgr.OnPlayerChat(GetPlayer(), text);
}
uint32 WorldSession::HandleOnGetXP(uint32 amount)
{
return Script->OnGetXP(GetPlayer(), amount);
return sScriptMgr.OnGetXP(GetPlayer(), amount);
}
int32 WorldSession::HandleOnGetMoney(int32 amount)
{
return Script->OnGetMoney(GetPlayer(), amount);
return sScriptMgr.OnGetMoney(GetPlayer(), amount);
}
void WorldSession::HandleOnAreaChange(AreaTableEntry const *pArea)
{
Script->OnAreaChange(GetPlayer(), pArea);
sScriptMgr.OnAreaChange(GetPlayer(), pArea);
}
bool WorldSession::HandleOnItemClick(Item *pItem)
{
return Script->OnItemClick(GetPlayer(), pItem);
return sScriptMgr.OnItemClick(GetPlayer(), pItem);
}
bool WorldSession::HandleOnItemOpen(Item *pItem)
{
return Script->OnItemOpen(GetPlayer(), pItem);
return sScriptMgr.OnItemOpen(GetPlayer(), pItem);
}
bool WorldSession::HandleOnGoClick(GameObject *pGameObject)
{
return Script->OnGoClick(GetPlayer(), pGameObject);
return sScriptMgr.OnGoClick(GetPlayer(), pGameObject);
}
void WorldSession::HandleOnCreatureKill(Creature *pCreature)
{
Script->OnCreatureKill(GetPlayer(), pCreature);
sScriptMgr.OnCreatureKill(GetPlayer(), pCreature);
}