Yet more cleanup, mostly in the script system. This should conclude the script integration into core.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-02-05 13:01:32 +01:00
parent a5d1bc77ab
commit f8d1920fa5
34 changed files with 18 additions and 335 deletions
+1 -14
View File
@@ -40,25 +40,12 @@
#endif //TRINITY_ENDIAN
#if PLATFORM == PLATFORM_WINDOWS
# define TRINITY_IMPORT __cdecl
# define TRINITY_PATH_MAX MAX_PATH
#else //PLATFORM != PLATFORM_WINDOWS
# if defined(__APPLE_CC__) && defined(BIG_ENDIAN)
# define TRINITY_IMPORT __attribute__ ((longcall))
# elif defined(__x86_64__)
# define TRINITY_IMPORT
# else
# define TRINITY_IMPORT __attribute__ ((cdecl))
# endif //__APPLE_CC__ && BIG_ENDIAN
# define TRINITY_PATH_MAX PATH_MAX
#endif //PLATFORM
#if PLATFORM == PLATFORM_WINDOWS
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
# endif //DECLSPEC_NORETURN
#else //PLATFORM != PLATFORM_WINDOWS
# define TRINITY_PATH_MAX PATH_MAX
# define DECLSPEC_NORETURN
#endif //PLATFORM
-2
View File
@@ -225,8 +225,6 @@ SET(game_STAT_SRCS
ReactorAI.h
ReputationMgr.cpp
ReputationMgr.h
ScriptCalls.cpp
ScriptCalls.h
ScriptedSmartAI.cpp
ScriptedSmartAI.h
ScriptLoader.cpp
-1
View File
@@ -42,7 +42,6 @@
#include "SocialMgr.h"
#include "UpdateMask.h"
#include "Util.h"
#include "ScriptCalls.h"
#include "SpellId.h"
#include "ScriptMgr.h"
-1
View File
@@ -35,7 +35,6 @@
#include "Player.h"
#include "UpdateMask.h"
#include "SpellMgr.h"
#include "ScriptCalls.h"
// Supported shift-links (client generated and server side)
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
-1
View File
@@ -36,7 +36,6 @@
#include "Log.h"
#include "Opcodes.h"
#include "Player.h"
#include "ScriptCalls.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "Util.h"
-1
View File
@@ -23,7 +23,6 @@
#include "PassiveAI.h"
#include "Policies/SingletonImp.h"
#include "MovementGenerator.h"
#include "ScriptCalls.h"
#include "Pet.h"
#include "TemporarySummon.h"
#include "CreatureAIFactory.h"
-1
View File
@@ -37,7 +37,6 @@
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "SpellMgr.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
bool ChatHandler::HandleDebugSendSpellFailCommand(const char* args)
-1
View File
@@ -25,7 +25,6 @@
#include "Database/DatabaseEnv.h"
#include "ItemEnchantmentMgr.h"
#include "SpellMgr.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
void AddItemsSetItem(Player*player,Item *item)
-1
View File
@@ -109,7 +109,6 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/)
// full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_ID);
//SendSysMessage(full);
//PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion());
//PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion());
//PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion());
PSendSysMessage(LANG_CONNECTED_PLAYERS, PlayersNum, MaxPlayersNum);
-1
View File
@@ -36,7 +36,6 @@
#include "Guild.h"
#include "ObjectAccessor.h"
#include "MapManager.h"
#include "ScriptCalls.h"
#include "Language.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
-1
View File
@@ -33,7 +33,6 @@
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "World.h"
#include "ScriptCalls.h"
#include "Group.h"
#include "MapRefManager.h"
#include "Vehicle.h"
-1
View File
@@ -35,7 +35,6 @@
#include "UpdateData.h"
#include "LootMgr.h"
#include "Chat.h"
#include "ScriptCalls.h"
#include <zlib/zlib.h>
#include "ObjectAccessor.h"
#include "Object.h"
-1
View File
@@ -30,7 +30,6 @@
#include "Player.h"
#include "GossipDef.h"
#include "UpdateMask.h"
#include "ScriptCalls.h"
#include "ObjectAccessor.h"
#include "Creature.h"
#include "Pet.h"
-1
View File
@@ -29,7 +29,6 @@
#include "GossipDef.h"
#include "QuestDef.h"
#include "ObjectAccessor.h"
#include "ScriptCalls.h"
#include "Group.h"
#include "BattleGround.h"
#include "BattleGroundAV.h"
-37
View File
@@ -1,37 +0,0 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef WIN32
#include <dlfcn.h>
#endif
#include "Common.h"
#include "Platform/Define.h"
#include "ScriptCalls.h"
#include "World.h"
#include "Config/ConfigEnv.h"
#include "ScriptMgr.h"
void LoadScriptingModule()
{
sScriptMgr.ScriptsInit();
sWorld.SetScriptsVersion(sScriptMgr.ScriptsVersion());
}
-122
View File
@@ -1,122 +0,0 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __SCRIPT_CALLS_H
#define __SCRIPT_CALLS_H
#include "Common.h"
#include "ObjectMgr.h"
class Creature;
class CreatureAI;
class GameObject;
class Item;
class Player;
class Quest;
class SpellCastTargets;
class Map;
class InstanceData;
void LoadScriptingModule();
//On Event Handlers
typedef void(TRINITY_IMPORT * scriptCallOnLogin) (Player *pPlayer);
typedef void(TRINITY_IMPORT * scriptCallOnLogout) (Player *pPlayer);
typedef void(TRINITY_IMPORT * scriptCallOnPVPKill) (Player *killer, Player *killed);
typedef bool(TRINITY_IMPORT * scriptCallOnSpellCast)(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGoTarget, uint32 i, SpellEntry const *spell);
typedef uint32(TRINITY_IMPORT * scriptCallOnGetXP) (Player *pPlayer, uint32 amount);
typedef int32(TRINITY_IMPORT * scriptCallOnGetMoney) (Player *pPlayer, int32 amount);
typedef bool(TRINITY_IMPORT * scriptCallOnPlayerChat) (Player *pPlayer, const char *text);
typedef void(TRINITY_IMPORT * scriptCallOnServerStartup) ();
typedef void(TRINITY_IMPORT * scriptCallOnServerShutdown) ();
typedef void(TRINITY_IMPORT * scriptCallOnAreaChange) (Player *pPlayer, AreaTableEntry const *pArea);
typedef bool(TRINITY_IMPORT * scriptCallOnItemClick) (Player *pPlayer, Item *pItem);
typedef bool(TRINITY_IMPORT * scriptCallOnItemOpen) (Player *pPlayer, Item *pItem);
typedef bool(TRINITY_IMPORT * scriptCallOnGoClick) (Player *pPlayer, GameObject *pGameObject);
typedef void(TRINITY_IMPORT * scriptCallOnCreatureKill) (Player *pPlayer, Creature *pCreature);
typedef bool(TRINITY_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
typedef bool(TRINITY_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *);
typedef bool(TRINITY_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
typedef bool(TRINITY_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode );
typedef bool(TRINITY_IMPORT * scriptCallGOSelect)(Player *player, GameObject *_GO, uint32 sender, uint32 action);
typedef bool(TRINITY_IMPORT * scriptCallGOSelectWithCode)( Player *player, GameObject *_GO, uint32 sender, uint32 action, const char* sCode );
typedef bool(TRINITY_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest const* );
typedef bool(TRINITY_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest const*);
typedef uint32(TRINITY_IMPORT * scriptCallNPCDialogStatus)( Player *player, Creature *_Creature);
typedef uint32(TRINITY_IMPORT * scriptCallGODialogStatus)( Player *player, GameObject * _GO);
typedef bool(TRINITY_IMPORT * scriptCallChooseReward)( Player *player, Creature *_Creature, Quest const*, uint32 opt );
typedef bool(TRINITY_IMPORT * scriptCallItemHello)( Player *player, Item *, Quest const*);
typedef bool(TRINITY_IMPORT * scriptCallGOHello)( Player *player, GameObject * );
typedef bool(TRINITY_IMPORT * scriptCallAreaTrigger)( Player *player, AreaTriggerEntry const* );
typedef bool(TRINITY_IMPORT * scriptCallItemQuestAccept)(Player *player, Item *, Quest const*);
typedef bool(TRINITY_IMPORT * scriptCallGOQuestAccept)(Player *player, GameObject *, Quest const*);
typedef bool(TRINITY_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest const*, uint32 opt );
typedef bool(TRINITY_IMPORT * scriptCallItemUse) (Player *player, Item *_Item, SpellCastTargets const& targets);
typedef bool(TRINITY_IMPORT * scriptCallItemExpire) (Player *player, ItemPrototype const *_ItemProto);
typedef bool(TRINITY_IMPORT * scriptCallEffectDummyGameObj) (Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget);
typedef bool(TRINITY_IMPORT * scriptCallEffectDummyCreature) (Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget);
typedef bool(TRINITY_IMPORT * scriptCallEffectDummyItem) (Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget);
typedef CreatureAI* (TRINITY_IMPORT * scriptCallGetAI) ( Creature *_Creature );
typedef InstanceData* (TRINITY_IMPORT * scriptCallCreateInstanceData) (Map *map);
typedef struct
{
scriptCallOnLogin OnLogin;
scriptCallOnLogout OnLogout;
scriptCallOnPVPKill OnPVPKill;
scriptCallOnSpellCast OnSpellCast;
scriptCallOnGetXP OnGetXP;
scriptCallOnGetMoney OnGetMoney;
scriptCallOnPlayerChat OnPlayerChat;
scriptCallOnServerStartup OnServerStartup;
scriptCallOnServerShutdown OnServerShutdown;
scriptCallOnAreaChange OnAreaChange;
scriptCallOnItemClick OnItemClick;
scriptCallOnItemOpen OnItemOpen;
scriptCallOnGoClick OnGoClick;
scriptCallOnCreatureKill OnCreatureKill;
scriptCallGossipHello GossipHello;
scriptCallGOChooseReward GOChooseReward;
scriptCallQuestAccept QuestAccept;
scriptCallGossipSelect GossipSelect;
scriptCallGossipSelectWithCode GossipSelectWithCode;
scriptCallGOSelect GOSelect;
scriptCallGOSelectWithCode GOSelectWithCode;
scriptCallQuestSelect QuestSelect;
scriptCallQuestComplete QuestComplete;
scriptCallNPCDialogStatus NPCDialogStatus;
scriptCallGODialogStatus GODialogStatus;
scriptCallChooseReward ChooseReward;
scriptCallItemHello ItemHello;
scriptCallGOHello GOHello;
scriptCallAreaTrigger scriptAreaTrigger;
scriptCallItemQuestAccept ItemQuestAccept;
scriptCallGOQuestAccept GOQuestAccept;
scriptCallItemUse ItemUse;
scriptCallItemExpire ItemExpire;
scriptCallEffectDummyGameObj EffectDummyGameObj;
scriptCallEffectDummyCreature EffectDummyCreature;
scriptCallEffectDummyItem EffectDummyItem;
scriptCallGetAI GetAI;
scriptCallCreateInstanceData CreateInstanceData;
}_ScriptSet,*ScriptsSet;
#endif
+5 -70
View File
@@ -12,48 +12,20 @@
#include "ScriptSystem.h"
#include "Policies/SingletonImp.h"
#define _FULLVERSION "TrinityScript"
INSTANTIATE_SINGLETON_1(ScriptMgr);
int num_sc_scripts;
Script *m_scripts[MAX_SCRIPTS];
Config TScriptConfig;
void FillSpellSummary();
void LoadOverridenSQLData();
void ScriptMgr::LoadDatabase()
{
//Get db string from file
std::string dbstring = TScriptConfig.GetStringDefault("WorldDatabaseInfo", "");
if (dbstring.empty())
{
error_log("TSCR: Missing world database info from configuration file. Load database aborted.");
return;
}
//Initialize connection to DB
if (!dbstring.empty() && TScriptDB.Initialize(dbstring.c_str()))
{
outstring_log("TSCR: TrinityScript database initialized successfully.");
outstring_log("");
pSystemMgr.LoadVersion();
pSystemMgr.LoadScriptTexts();
pSystemMgr.LoadScriptTextsCustom();
pSystemMgr.LoadScriptWaypoints();
}
else
{
error_log("TSCR: Unable to connect to database at %s. Load database aborted.", dbstring.c_str());
return;
}
TScriptDB.HaltDelayThread();
pSystemMgr.LoadVersion();
pSystemMgr.LoadScriptTexts();
pSystemMgr.LoadScriptTextsCustom();
pSystemMgr.LoadScriptWaypoints();
}
struct TSpellSummary {
@@ -70,7 +42,7 @@ ScriptMgr::~ScriptMgr()
}
void ScriptMgr::ScriptsInit(char const* cfg_file)
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
outstring_log(" _____ _ _ _ ____ _ _");
@@ -79,15 +51,7 @@ void ScriptMgr::ScriptsInit(char const* cfg_file)
outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
outstring_log(" |___/ |_| ");
outstring_log("Trinity Script initializing %s", _FULLVERSION);
outstring_log("");
//Get configuration file
if (!TScriptConfig.SetSource(cfg_file))
error_log("TSCR: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
else
outstring_log("TSCR: Using configuration file %s",cfg_file);
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
@@ -114,35 +78,6 @@ void ScriptMgr::ScriptsInit(char const* cfg_file)
//*********************************
//*** Functions used globally ***
std::string ScriptMgr:: GetConfigValueStr(char const* option)
{
//Get db string from file
std::string dbstring = TScriptConfig.GetStringDefault(option, "");
if (dbstring.empty())
{
error_log("TSCR: %s is not a valid option.", option);
return "error";
}
return dbstring;
}
int32 ScriptMgr::GetConfigValueInt32(char const* option)
{
//Get db int from file
int32 dbint = TScriptConfig.GetIntDefault(option, 0);
return dbint;
}
float ScriptMgr::GetConfigValueFloat(char const* option)
{
//Get db int from file
float dbfloat = TScriptConfig.GetFloatDefault(option, 0);
return dbfloat;
}
void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
{
if (!pSource)
+1 -9
View File
@@ -13,10 +13,6 @@
#include "DBCStructure.h"
#include "Config/ConfigEnv.h"
#ifndef _TRINITY_SCRIPT_CONFIG
# define _TRINITY_SCRIPT_CONFIG sConfig.GetFilename().c_str()
#endif _TRINITY_SCRIPT_CONFIG
class Player;
class Creature;
class CreatureAI;
@@ -101,14 +97,10 @@ class ScriptMgr
ScriptMgr();
~ScriptMgr();
void ScriptsInit(char const* cfg_file = _TRINITY_SCRIPT_CONFIG);
void ScriptsInit();
void LoadDatabase();
char const* ScriptsVersion();
std::string GetConfigValueStr(char const* option);
int32 GetConfigValueInt32(char const* option);
float GetConfigValueFloat(char const* option);
//event handlers
void OnLogin(Player *pPlayer);
void OnLogout(Player *pPlayer);
+7 -9
View File
@@ -24,8 +24,6 @@
#include "ObjectMgr.h"
#include "Database/DatabaseEnv.h"
DatabaseType TScriptDB;
SystemMgr::SystemMgr()
{
}
@@ -39,7 +37,7 @@ SystemMgr& SystemMgr::Instance()
void SystemMgr::LoadVersion()
{
//Get Version information
QueryResult_AutoPtr Result = TScriptDB.PQuery("SELECT script_version FROM version LIMIT 1");
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT script_version FROM version LIMIT 1");
if (Result)
{
@@ -58,9 +56,9 @@ void SystemMgr::LoadVersion()
void SystemMgr::LoadScriptTexts()
{
outstring_log("TSCR: Loading Script Texts...");
LoadTrinityStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2));
LoadTrinityStrings(WorldDatabase,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2));
QueryResult_AutoPtr Result = TScriptDB.PQuery("SELECT entry, sound, type, language, emote FROM script_texts");
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM script_texts");
outstring_log("TSCR: Loading Script Texts additional data...");
@@ -124,9 +122,9 @@ void SystemMgr::LoadScriptTexts()
void SystemMgr::LoadScriptTextsCustom()
{
outstring_log("TSCR: Loading Custom Texts...");
LoadTrinityStrings(TScriptDB,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3));
LoadTrinityStrings(WorldDatabase,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3));
QueryResult_AutoPtr Result = TScriptDB.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts");
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts");
outstring_log("TSCR: Loading Custom Texts additional data...");
@@ -195,13 +193,13 @@ void SystemMgr::LoadScriptWaypoints()
uint64 uiCreatureCount = 0;
// Load Waypoints
QueryResult_AutoPtr Result = TScriptDB.PQuery("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry");
QueryResult_AutoPtr Result = WorldDatabase.PQuery("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry");
if (Result)
uiCreatureCount = Result->GetRowCount();
outstring_log("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
Result = TScriptDB.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
Result = WorldDatabase.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
if (Result)
{
-2
View File
@@ -5,8 +5,6 @@
#ifndef SC_SYSTEM_H
#define SC_SYSTEM_H
extern DatabaseType TScriptDB;
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
//TODO: find better namings and definitions.
-1
View File
@@ -49,7 +49,6 @@
#include "Util.h"
#include "TemporarySummon.h"
#include "Vehicle.h"
#include "ScriptCalls.h"
#include "SpellAuraEffects.h"
#include "SpellId.h"
#include "ScriptMgr.h"
-1
View File
@@ -34,7 +34,6 @@
#include "BattleGround.h"
#include "OutdoorPvPMgr.h"
#include "Formulas.h"
#include "ScriptCalls.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
-32
View File
@@ -206,38 +206,6 @@ void AuraApplication::ClientUpdate(bool remove)
m_target->SendMessageToSet(&data, true);
}
void AuraApplication::ConstructAuraInfo(ByteBuffer &data)
{
m_needClientUpdate = false;
data << uint8(m_slot);
if(!m_target->GetVisibleAura(m_slot))
{
data << uint32(0);
sLog.outDebug("Aura %u removed slot %u",GetBase()->GetId(), m_slot);
return;
}
Aura const * aura = GetBase();
data << uint32(aura->GetId());
uint32 flags = m_flags;
if (aura->GetMaxDuration() > 0)
flags |= AFLAG_DURATION;
data << uint8(flags);
data << uint8(aura->GetCasterLevel());
data << uint8(aura->GetStackAmount() > 1 ? aura->GetStackAmount() : (aura->GetCharges()) ? aura->GetCharges() : 1);
if(!(flags & AFLAG_CASTER))
data.appendPackGUID(aura->GetCasterGUID());
if(flags & AFLAG_DURATION)
{
data << uint32(aura->GetMaxDuration());
data << uint32(aura->GetDuration());
}
}
Aura * Aura::TryCreate(SpellEntry const* spellproto, uint8 tryEffMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
{
assert(spellproto);
-1
View File
@@ -75,7 +75,6 @@ class AuraApplication
void SetNeedClientUpdate() { m_needClientUpdate = true;}
bool IsNeedClientUpdate() const { return m_needClientUpdate;}
void ClientUpdate(bool remove = false);
void ConstructAuraInfo(ByteBuffer &);
};
class Aura
-1
View File
@@ -56,7 +56,6 @@
#include "SocialMgr.h"
#include "Util.h"
#include "TemporarySummon.h"
#include "ScriptCalls.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
-1
View File
@@ -27,7 +27,6 @@
#include "Log.h"
#include "Opcodes.h"
#include "Spell.h"
#include "ScriptCalls.h"
#include "Totem.h"
#include "TemporarySummon.h"
#include "SpellAuras.h"
-1
View File
@@ -54,7 +54,6 @@
#include "TemporarySummon.h"
#include "Vehicle.h"
#include "Transports.h"
#include "ScriptCalls.h"
#include "SpellId.h"
#include <math.h>
+1 -2
View File
@@ -47,7 +47,6 @@
#include "LootMgr.h"
#include "ItemEnchantmentMgr.h"
#include "MapManager.h"
#include "ScriptCalls.h"
#include "CreatureAIRegistry.h"
#include "Policies/SingletonImp.h"
#include "BattleGroundMgr.h"
@@ -1584,7 +1583,7 @@ void World::SetInitialWorldSettings()
CreatureEAI_Mgr.LoadCreatureEventAI_Scripts();
sLog.outString("Initializing Scripts...");
LoadScriptingModule();
sScriptMgr.ScriptsInit();
///- Initialize game time and timers
sLog.outDebug("DEBUG:: Initialize game time and timers");
-5
View File
@@ -630,10 +630,6 @@ class World
char const* GetDBVersion() { return m_DBVersion.c_str(); }
char const* GetCreatureEventAIVersion() { return m_CreatureEventAIVersion.c_str(); }
//used Script version
void SetScriptsVersion(char const* version) { m_ScriptsVersion = version ? version : "unknown scripting library"; }
char const* GetScriptsVersion() { return m_ScriptsVersion.c_str(); }
void RecordTimeDiff(const char * text, ...);
void LoadAutobroadcasts();
@@ -729,7 +725,6 @@ class World
//used versions
std::string m_DBVersion;
std::string m_CreatureEventAIVersion;
std::string m_ScriptsVersion;
std::list<std::string> m_Autobroadcasts;
};
-1
View File
@@ -41,7 +41,6 @@
#include "MapManager.h"
#include "SocialMgr.h"
#include "zlib/zlib.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
/// WorldSession constructor
+3 -2
View File
@@ -43,6 +43,7 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "World.h"
/*########
# npc_air_force_bots
@@ -1220,7 +1221,7 @@ bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature)
if (pCreature->isCanTrainingAndResetTalentsOf(pPlayer))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE1, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS);
if (!(pPlayer->GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sScriptMgr.GetConfigValueInt32("MinDualSpecLevel"))))
if (!(pPlayer->GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sWorld.getConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE3, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_LEARNDUALSPEC);
if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681))
@@ -1249,7 +1250,7 @@ bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32
pPlayer->SendTalentWipeConfirm(pCreature->GetGUID());
break;
case GOSSIP_OPTION_LEARNDUALSPEC:
if(pPlayer->GetSpecsCount() == 1 && !(pPlayer->getLevel() < sScriptMgr.GetConfigValueInt32("MinDualSpecLevel")))
if(pPlayer->GetSpecsCount() == 1 && !(pPlayer->getLevel() < sWorld.getConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
{
if (pPlayer->GetMoney() < 10000000)
{
-1
View File
@@ -35,7 +35,6 @@
#include "Log.h"
#include "MapManager.h"
#include "Player.h"
#include "ScriptCalls.h"
#include "Util.h"
#if PLATFORM != WINDOWS
-1
View File
@@ -38,7 +38,6 @@
#include "Log.h"
#include "Master.h"
#include "RASocket.h"
#include "ScriptCalls.h"
#include "Timer.h"
#include "Util.h"
-8
View File
@@ -758,14 +758,6 @@
RelativePath="..\..\src\game\QuestHandler.cpp"
>
</File>
<File
RelativePath="..\..\src\game\ScriptCalls.cpp"
>
</File>
<File
RelativePath="..\..\src\game\ScriptCalls.h"
>
</File>
<File
RelativePath="..\..\src\game\SkillDiscovery.cpp"
>