TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ScriptMgr Class Reference

#include <ScriptMgr.h>

Public Types

typedef void(* ScriptLoaderCallbackType )()
 

Public Member Functions

void Initialize ()
 
void LoadDatabase ()
 
void FillSpellSummary ()
 
const char * ScriptsVersion () const
 
void IncrementScriptCount ()
 
uint32 GetScriptCount () const
 
void SetScriptLoader (ScriptLoaderCallbackType script_loader_callback)
 
void Unload ()
 
void CreateSpellScripts (uint32 spellId, std::list< SpellScript * > &scriptVector)
 
void CreateAuraScripts (uint32 spellId, std::list< AuraScript * > &scriptVector)
 
void CreateSpellScriptLoaders (uint32 spellId, std::vector< std::pair< SpellScriptLoader *, std::multimap< uint32, uint32 >::iterator > > &scriptVector)
 
void OnNetworkStart ()
 
void OnNetworkStop ()
 
void OnSocketOpen (std::shared_ptr< WorldSocket > socket)
 
void OnSocketClose (std::shared_ptr< WorldSocket > socket)
 
void OnPacketReceive (WorldSession *session, WorldPacket const &packet)
 
void OnPacketSend (WorldSession *session, WorldPacket const &packet)
 
void OnOpenStateChange (bool open)
 
void OnConfigLoad (bool reload)
 
void OnMotdChange (std::string &newMotd)
 
void OnShutdownInitiate (ShutdownExitCode code, ShutdownMask mask)
 
void OnShutdownCancel ()
 
void OnWorldUpdate (uint32 diff)
 
void OnStartup ()
 
void OnShutdown ()
 
void OnHonorCalculation (float &honor, uint8 level, float multiplier)
 
void OnGrayLevelCalculation (uint8 &grayLevel, uint8 playerLevel)
 
void OnColorCodeCalculation (XPColorChar &color, uint8 playerLevel, uint8 mobLevel)
 
void OnZeroDifferenceCalculation (uint8 &diff, uint8 playerLevel)
 
void OnBaseGainCalculation (uint32 &gain, uint8 playerLevel, uint8 mobLevel)
 
void OnGainCalculation (uint32 &gain, Player *player, Unit *unit)
 
void OnGroupRateCalculation (float &rate, uint32 count, bool isRaid)
 
void OnCreateMap (Map *map)
 
void OnDestroyMap (Map *map)
 
void OnLoadGridMap (Map *map, GridMap *gmap, uint32 gx, uint32 gy)
 
void OnUnloadGridMap (Map *map, GridMap *gmap, uint32 gx, uint32 gy)
 
void OnPlayerEnterMap (Map *map, Player *player)
 
void OnPlayerLeaveMap (Map *map, Player *player)
 
void OnMapUpdate (Map *map, uint32 diff)
 
InstanceScriptCreateInstanceData (InstanceMap *map)
 
bool OnDummyEffect (Unit *caster, uint32 spellId, SpellEffIndex effIndex, Item *target)
 
bool OnQuestAccept (Player *player, Item *item, Quest const *quest)
 
bool OnItemUse (Player *player, Item *item, SpellCastTargets const &targets)
 
bool OnItemExpire (Player *player, ItemTemplate const *proto)
 
bool OnItemRemove (Player *player, Item *item)
 
bool OnDummyEffect (Unit *caster, uint32 spellId, SpellEffIndex effIndex, Creature *target)
 
bool OnGossipHello (Player *player, Creature *creature)
 
bool OnGossipSelect (Player *player, Creature *creature, uint32 sender, uint32 action)
 
bool OnGossipSelectCode (Player *player, Creature *creature, uint32 sender, uint32 action, const char *code)
 
bool OnQuestAccept (Player *player, Creature *creature, Quest const *quest)
 
bool OnQuestSelect (Player *player, Creature *creature, Quest const *quest)
 
bool OnQuestReward (Player *player, Creature *creature, Quest const *quest, uint32 opt)
 
uint32 GetDialogStatus (Player *player, Creature *creature)
 
CreatureAIGetCreatureAI (Creature *creature)
 
void OnCreatureUpdate (Creature *creature, uint32 diff)
 
bool OnDummyEffect (Unit *caster, uint32 spellId, SpellEffIndex effIndex, GameObject *target)
 
bool OnGossipHello (Player *player, GameObject *go)
 
bool OnGossipSelect (Player *player, GameObject *go, uint32 sender, uint32 action)
 
bool OnGossipSelectCode (Player *player, GameObject *go, uint32 sender, uint32 action, const char *code)
 
bool OnQuestAccept (Player *player, GameObject *go, Quest const *quest)
 
bool OnQuestReward (Player *player, GameObject *go, Quest const *quest, uint32 opt)
 
uint32 GetDialogStatus (Player *player, GameObject *go)
 
void OnGameObjectDestroyed (GameObject *go, Player *player)
 
void OnGameObjectDamaged (GameObject *go, Player *player)
 
void OnGameObjectLootStateChanged (GameObject *go, uint32 state, Unit *unit)
 
void OnGameObjectStateChanged (GameObject *go, uint32 state)
 
void OnGameObjectUpdate (GameObject *go, uint32 diff)
 
GameObjectAIGetGameObjectAI (GameObject *go)
 
bool OnAreaTrigger (Player *player, AreaTriggerEntry const *trigger, bool entered)
 
BattlegroundCreateBattleground (BattlegroundTypeId typeId)
 
OutdoorPvPCreateOutdoorPvP (OutdoorPvPData const *data)
 
std::vector< ChatCommandGetChatCommands ()
 
void OnWeatherChange (Weather *weather, WeatherState state, float grade)
 
void OnWeatherUpdate (Weather *weather, uint32 diff)
 
void OnAuctionAdd (AuctionHouseObject *ah, AuctionEntry *entry)
 
void OnAuctionRemove (AuctionHouseObject *ah, AuctionEntry *entry)
 
void OnAuctionSuccessful (AuctionHouseObject *ah, AuctionEntry *entry)
 
void OnAuctionExpire (AuctionHouseObject *ah, AuctionEntry *entry)
 
bool OnConditionCheck (Condition const *condition, ConditionSourceInfo &sourceInfo)
 
void OnInstall (Vehicle *veh)
 
void OnUninstall (Vehicle *veh)
 
void OnReset (Vehicle *veh)
 
void OnInstallAccessory (Vehicle *veh, Creature *accessory)
 
void OnAddPassenger (Vehicle *veh, Unit *passenger, int8 seatId)
 
void OnRemovePassenger (Vehicle *veh, Unit *passenger)
 
void OnDynamicObjectUpdate (DynamicObject *dynobj, uint32 diff)
 
void OnAddPassenger (Transport *transport, Player *player)
 
void OnAddCreaturePassenger (Transport *transport, Creature *creature)
 
void OnRemovePassenger (Transport *transport, Player *player)
 
void OnTransportUpdate (Transport *transport, uint32 diff)
 
void OnRelocate (Transport *transport, uint32 waypointId, uint32 mapId, float x, float y, float z)
 
bool OnCriteriaCheck (uint32 scriptId, Player *source, Unit *target)
 
void OnPVPKill (Player *killer, Player *killed)
 
void OnCreatureKill (Player *killer, Creature *killed)
 
void OnPlayerKilledByCreature (Creature *killer, Player *killed)
 
void OnPlayerLevelChanged (Player *player, uint8 oldLevel)
 
void OnPlayerFreeTalentPointsChanged (Player *player, uint32 newPoints)
 
void OnPlayerTalentsReset (Player *player, bool noCost)
 
void OnPlayerMoneyChanged (Player *player, int64 &amount)
 
void OnPlayerMoneyLimit (Player *player, int64 amount)
 
void OnGivePlayerXP (Player *player, uint32 &amount, Unit *victim)
 
void OnPlayerReputationChange (Player *player, uint32 factionID, int32 &standing, bool incremental)
 
void OnPlayerDuelRequest (Player *target, Player *challenger)
 
void OnPlayerDuelStart (Player *player1, Player *player2)
 
void OnPlayerDuelEnd (Player *winner, Player *loser, DuelCompleteType type)
 
void OnPlayerChat (Player *player, uint32 type, uint32 lang, std::string &msg)
 
void OnPlayerChat (Player *player, uint32 type, uint32 lang, std::string &msg, Player *receiver)
 
void OnPlayerChat (Player *player, uint32 type, uint32 lang, std::string &msg, Group *group)
 
void OnPlayerChat (Player *player, uint32 type, uint32 lang, std::string &msg, Guild *guild)
 
void OnPlayerChat (Player *player, uint32 type, uint32 lang, std::string &msg, Channel *channel)
 
void OnPlayerClearEmote (Player *player)
 
void OnPlayerTextEmote (Player *player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid)
 
void OnPlayerSpellCast (Player *player, Spell *spell, bool skipCheck)
 
void OnPlayerLogin (Player *player, bool firstLogin)
 
void OnPlayerLogout (Player *player)
 
void OnPlayerCreate (Player *player)
 
void OnPlayerDelete (ObjectGuid guid, uint32 accountId)
 
void OnPlayerFailedDelete (ObjectGuid guid, uint32 accountId)
 
void OnPlayerSave (Player *player)
 
void OnPlayerBindToInstance (Player *player, Difficulty difficulty, uint32 mapid, bool permanent, uint8 extendState)
 
void OnPlayerUpdateZone (Player *player, uint32 newZone, uint32 newArea)
 
void OnQuestStatusChange (Player *player, uint32 questId, QuestStatus status)
 
void OnAccountLogin (uint32 accountId)
 
void OnFailedAccountLogin (uint32 accountId)
 
void OnEmailChange (uint32 accountId)
 
void OnFailedEmailChange (uint32 accountId)
 
void OnPasswordChange (uint32 accountId)
 
void OnFailedPasswordChange (uint32 accountId)
 
void OnGuildAddMember (Guild *guild, Player *player, uint8 &plRank)
 
void OnGuildRemoveMember (Guild *guild, ObjectGuid guid, bool isDisbanding, bool isKicked)
 
void OnGuildMOTDChanged (Guild *guild, const std::string &newMotd)
 
void OnGuildInfoChanged (Guild *guild, const std::string &newInfo)
 
void OnGuildCreate (Guild *guild, Player *leader, const std::string &name)
 
void OnGuildDisband (Guild *guild)
 
void OnGuildMemberWitdrawMoney (Guild *guild, Player *player, uint64 &amount, bool isRepair)
 
void OnGuildMemberDepositMoney (Guild *guild, Player *player, uint64 &amount)
 
void OnGuildItemMove (Guild *guild, Player *player, Item *pItem, bool isSrcBank, uint8 srcContainer, uint8 srcSlotId, bool isDestBank, uint8 destContainer, uint8 destSlotId)
 
void OnGuildEvent (Guild *guild, uint8 eventType, ObjectGuid::LowType playerGuid1, ObjectGuid::LowType playerGuid2, uint8 newRank)
 
void OnGuildBankEvent (Guild *guild, uint8 eventType, uint8 tabId, ObjectGuid::LowType playerGuid, uint64 itemOrMoney, uint16 itemStackCount, uint8 destTabId)
 
void OnGroupAddMember (Group *group, ObjectGuid guid)
 
void OnGroupInviteMember (Group *group, ObjectGuid guid)
 
void OnGroupRemoveMember (Group *group, ObjectGuid guid, RemoveMethod method, ObjectGuid kicker, const char *reason)
 
void OnGroupChangeLeader (Group *group, ObjectGuid newLeaderGuid, ObjectGuid oldLeaderGuid)
 
void OnGroupDisband (Group *group)
 
void OnHeal (Unit *healer, Unit *reciever, uint32 &gain)
 
void OnDamage (Unit *attacker, Unit *victim, uint32 &damage)
 
void ModifyPeriodicDamageAurasTick (Unit *target, Unit *attacker, uint32 &damage)
 
void ModifyMeleeDamage (Unit *target, Unit *attacker, uint32 &damage)
 
void ModifySpellDamageTaken (Unit *target, Unit *attacker, int32 &damage)
 
uint64 IncreaseScheduledScriptsCount ()
 
uint64 DecreaseScheduledScriptCount ()
 
uint64 DecreaseScheduledScriptCount (uint64 count)
 
bool IsScriptScheduled () const
 

Static Public Member Functions

static ScriptMgrinstance ()
 

Private Member Functions

 ScriptMgr ()
 
virtual ~ScriptMgr ()
 

Private Attributes

uint32 _scriptCount
 
std::atomic< uint64_scheduledScripts
 
ScriptLoaderCallbackType _script_loader_callback
 

Friends

class ScriptObject
 

Member Typedef Documentation

typedef void(* ScriptMgr::ScriptLoaderCallbackType)()

Constructor & Destructor Documentation

ScriptMgr::ScriptMgr ( )
private
245 {
246 }
ScriptLoaderCallbackType _script_loader_callback
Definition: ScriptMgr.h:1110
uint32 _scriptCount
Definition: ScriptMgr.h:1105
std::atomic< uint64 > _scheduledScripts
Definition: ScriptMgr.h:1108
ScriptMgr::~ScriptMgr ( )
privatevirtual
248 { }

Member Function Documentation

void ScriptMgr::CreateAuraScripts ( uint32  spellId,
std::list< AuraScript * > &  scriptVector 
)
441 {
442  SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
443 
444  for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
445  {
447  if (!tmpscript)
448  continue;
449 
450  AuraScript* script = tmpscript->GetAuraScript();
451 
452  if (!script)
453  continue;
454 
455  script->_Init(&tmpscript->GetName(), spellId);
456 
457  scriptVector.push_back(script);
458  }
459 }
std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
Definition: ObjectMgr.h:378
virtual AuraScript * GetAuraScript() const
Definition: ScriptMgr.h:200
virtual void _Init(std::string const *scriptname, uint32 spellId)
Definition: SpellScript.cpp:48
#define sObjectMgr
Definition: ObjectMgr.h:1567
static TScript * GetScriptById(uint32 id)
Definition: ScriptMgr.cpp:134
const std::string & GetName() const
Definition: ScriptMgr.h:155
Definition: ScriptMgr.h:188
Definition: SpellScript.h:475

+ Here is the call graph for this function:

Battleground * ScriptMgr::CreateBattleground ( BattlegroundTypeId  typeId)
Todo:
Implement script-side battlegrounds.
1013 {
1015  ABORT();
1016  return NULL;
1017 }
arena_t NULL
Definition: jemalloc_internal.h:624
#define ABORT
Definition: Errors.h:56
InstanceScript * ScriptMgr::CreateInstanceData ( InstanceMap map)
734 {
735  ASSERT(map);
736 
737  GET_SCRIPT_RET(InstanceMapScript, map->GetScriptId(), tmpscript, NULL);
738  return tmpscript->GetInstanceScript(map);
739 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:340
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 GetScriptId() const
Definition: Map.h:768
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

OutdoorPvP * ScriptMgr::CreateOutdoorPvP ( OutdoorPvPData const data)
1020 {
1021  ASSERT(data);
1022 
1023  GET_SCRIPT_RET(OutdoorPvPScript, data->ScriptId, tmpscript, NULL);
1024  return tmpscript->GetOutdoorPvP();
1025 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:511
arena_t NULL
Definition: jemalloc_internal.h:624
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::CreateSpellScriptLoaders ( uint32  spellId,
std::vector< std::pair< SpellScriptLoader *, std::multimap< uint32, uint32 >::iterator > > &  scriptVector 
)
462 {
463  SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
464  scriptVector.reserve(std::distance(bounds.first, bounds.second));
465 
466  for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
467  {
469  if (!tmpscript)
470  continue;
471 
472  scriptVector.push_back(std::make_pair(tmpscript, itr));
473  }
474 }
std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
Definition: ObjectMgr.h:378
#define sObjectMgr
Definition: ObjectMgr.h:1567
double distance(double x, double y)
Definition: g3dmath.h:731
static TScript * GetScriptById(uint32 id)
Definition: ScriptMgr.cpp:134
Definition: ScriptMgr.h:188

+ Here is the call graph for this function:

void ScriptMgr::CreateSpellScripts ( uint32  spellId,
std::list< SpellScript * > &  scriptVector 
)
420 {
421  SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
422 
423  for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
424  {
426  if (!tmpscript)
427  continue;
428 
429  SpellScript* script = tmpscript->GetSpellScript();
430 
431  if (!script)
432  continue;
433 
434  script->_Init(&tmpscript->GetName(), spellId);
435 
436  scriptVector.push_back(script);
437  }
438 }
std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
Definition: ObjectMgr.h:378
Definition: SpellScript.h:152
virtual void _Init(std::string const *scriptname, uint32 spellId)
Definition: SpellScript.cpp:48
#define sObjectMgr
Definition: ObjectMgr.h:1567
virtual SpellScript * GetSpellScript() const
Definition: ScriptMgr.h:197
static TScript * GetScriptById(uint32 id)
Definition: ScriptMgr.cpp:134
const std::string & GetName() const
Definition: ScriptMgr.h:155
Definition: ScriptMgr.h:188

+ Here is the call graph for this function:

uint64 ScriptMgr::DecreaseScheduledScriptCount ( )
inline
1099 { return --_scheduledScripts; }
std::atomic< uint64 > _scheduledScripts
Definition: ScriptMgr.h:1108
uint64 ScriptMgr::DecreaseScheduledScriptCount ( uint64  count)
inline
1100 { return _scheduledScripts -= count; }
std::atomic< uint64 > _scheduledScripts
Definition: ScriptMgr.h:1108
void ScriptMgr::FillSpellSummary ( )
330 {
332 
333  SpellSummary = new TSpellSummary[sSpellMgr->GetSpellInfoStoreSize()];
334 
335  SpellInfo const* pTempSpell;
336 
337  for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i)
338  {
339  SpellSummary[i].Effects = 0;
340  SpellSummary[i].Targets = 0;
341 
342  pTempSpell = sSpellMgr->GetSpellInfo(i);
343  // This spell doesn't exist.
344  if (!pTempSpell)
345  continue;
346 
347  for (SpellEffectInfo const* effect : pTempSpell->GetEffectsForDifficulty(DIFFICULTY_NONE))
348  {
349  if (!effect)
350  continue;
351 
352  // Spell targets self.
353  if (effect->TargetA.GetTarget() == TARGET_UNIT_CASTER)
354  SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF-1);
355 
356  // Spell targets a single enemy.
357  if (effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
358  effect->TargetA.GetTarget() == TARGET_DEST_TARGET_ENEMY)
360 
361  // Spell targets AoE at enemy.
362  if (effect->TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY ||
363  effect->TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY ||
364  effect->TargetA.GetTarget() == TARGET_SRC_CASTER ||
365  effect->TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY)
367 
368  // Spell targets an enemy.
369  if (effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
370  effect->TargetA.GetTarget() == TARGET_DEST_TARGET_ENEMY ||
371  effect->TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY ||
372  effect->TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY ||
373  effect->TargetA.GetTarget() == TARGET_SRC_CASTER ||
374  effect->TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY)
376 
377  // Spell targets a single friend (or self).
378  if (effect->TargetA.GetTarget() == TARGET_UNIT_CASTER ||
379  effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_ALLY ||
380  effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_PARTY)
382 
383  // Spell targets AoE friends.
384  if (effect->TargetA.GetTarget() == TARGET_UNIT_CASTER_AREA_PARTY ||
385  effect->TargetA.GetTarget() == TARGET_UNIT_LASTTARGET_AREA_PARTY ||
386  effect->TargetA.GetTarget() == TARGET_SRC_CASTER)
388 
389  // Spell targets any friend (or self).
390  if (effect->TargetA.GetTarget() == TARGET_UNIT_CASTER ||
391  effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_ALLY ||
392  effect->TargetA.GetTarget() == TARGET_UNIT_TARGET_PARTY ||
393  effect->TargetA.GetTarget() == TARGET_UNIT_CASTER_AREA_PARTY ||
394  effect->TargetA.GetTarget() == TARGET_UNIT_LASTTARGET_AREA_PARTY ||
395  effect->TargetA.GetTarget() == TARGET_SRC_CASTER)
397 
398  // Make sure that this spell includes a damage effect.
399  if (effect->Effect == SPELL_EFFECT_SCHOOL_DAMAGE ||
400  effect->Effect == SPELL_EFFECT_INSTAKILL ||
401  effect->Effect == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE ||
402  effect->Effect == SPELL_EFFECT_HEALTH_LEECH)
404 
405  // Make sure that this spell includes a healing effect (or an apply aura with a periodic heal).
406  if (effect->Effect == SPELL_EFFECT_HEAL ||
407  effect->Effect == SPELL_EFFECT_HEAL_MAX_HEALTH ||
408  effect->Effect == SPELL_EFFECT_HEAL_MECHANICAL ||
409  (effect->Effect == SPELL_EFFECT_APPLY_AURA && effect->ApplyAuraName == 8))
410  SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING-1);
411 
412  // Make sure that this spell applies an aura.
413  if (effect->Effect == SPELL_EFFECT_APPLY_AURA)
414  SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA-1);
415  }
416  }
417 }
Targets
Definition: SharedDefines.h:1873
Definition: DBCEnums.h:404
Definition: SpellInfo.h:326
Definition: SharedDefines.h:1019
Definition: SharedDefines.h:1889
Definition: CreatureAI.h:48
Definition: CreatureAI.h:56
Definition: SharedDefines.h:1897
Definition: SharedDefines.h:1016
Definition: ScriptedCreature.cpp:29
Definition: CreatureAI.h:47
Definition: SharedDefines.h:1017
Definition: SharedDefines.h:1885
Definition: CreatureAI.h:45
Definition: SharedDefines.h:1085
Definition: SharedDefines.h:1011
Definition: SharedDefines.h:1906
Definition: CreatureAI.h:44
Definition: CreatureAI.h:57
Definition: CreatureAI.h:49
Definition: SharedDefines.h:1077
#define sSpellMgr
Definition: SpellMgr.h:756
Definition: SpellInfo.h:238
Definition: SharedDefines.h:1886
uint8 Effects
Definition: ScriptedCreature.cpp:32
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:1020
Definition: CreatureAI.h:43
Definition: SharedDefines.h:1890
static void FillAISpellInfo()
Definition: UnitAI.cpp:177
Definition: CreatureAI.h:41
Definition: SharedDefines.h:1891
Definition: SharedDefines.h:1922
uint8 Targets
Definition: ScriptedCreature.cpp:31
Definition: CreatureAI.h:58
SpellEffectInfoVector GetEffectsForDifficulty(uint32 difficulty) const
Definition: SpellInfo.cpp:3311
Definition: SharedDefines.h:1880
Definition: SharedDefines.h:1904
Definition: SharedDefines.h:1875
Definition: SharedDefines.h:1012
struct TSpellSummary * SpellSummary

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< ChatCommand > ScriptMgr::GetChatCommands ( )
1028 {
1029  std::vector<ChatCommand> table;
1030 
1031  FOR_SCRIPTS_RET(CommandScript, itr, end, table)
1032  {
1033  std::vector<ChatCommand> cmds = itr->second->GetCommands();
1034  table.insert(table.end(), cmds.begin(), cmds.end());
1035  }
1036 
1037  // Sort commands in alphabetical order
1038  std::sort(table.begin(), table.end(), [](const ChatCommand& a, const ChatCommand&b)
1039  {
1040  return strcmp(a.Name, b.Name) < 0;
1041  });
1042 
1043  return table;
1044 }
#define FOR_SCRIPTS_RET(T, C, E, R)
Definition: ScriptMgr.cpp:218
Definition: ScriptMgr.h:523
char const * Name
Definition: Chat.h:48
Definition: Chat.h:40
CreatureAI * ScriptMgr::GetCreatureAI ( Creature creature)
870 {
871  ASSERT(creature);
872 
873  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, NULL);
874  return tmpscript->GetAI(creature);
875 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

uint32 ScriptMgr::GetDialogStatus ( Player player,
Creature creature 
)
860 {
861  ASSERT(player);
862  ASSERT(creature);
863 
865  player->PlayerTalkClass->ClearMenus();
866  return tmpscript->GetDialogStatus(player, creature);
867 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: QuestDef.h:136
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

uint32 ScriptMgr::GetDialogStatus ( Player player,
GameObject go 
)
945 {
946  ASSERT(player);
947  ASSERT(go);
948 
950  player->PlayerTalkClass->ClearMenus();
951  return tmpscript->GetDialogStatus(player, go);
952 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: QuestDef.h:136
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

GameObjectAI * ScriptMgr::GetGameObjectAI ( GameObject go)
878 {
879  ASSERT(gameobject);
880 
881  GET_SCRIPT_RET(GameObjectScript, gameobject->GetScriptId(), tmpscript, NULL);
882  return tmpscript->GetAI(gameobject);
883 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

uint32 ScriptMgr::GetScriptCount ( ) const
inline
864 { return _scriptCount; }
uint32 _scriptCount
Definition: ScriptMgr.h:1105

+ Here is the caller graph for this function:

uint64 ScriptMgr::IncreaseScheduledScriptsCount ( )
inline
1098 { return ++_scheduledScripts; }
std::atomic< uint64 > _scheduledScripts
Definition: ScriptMgr.h:1108
void ScriptMgr::IncrementScriptCount ( )
inline
863 { ++_scriptCount; }
uint32 _scriptCount
Definition: ScriptMgr.h:1105
void ScriptMgr::Initialize ( void  )
257 {
258  uint32 oldMSTime = getMSTime();
259 
260  LoadDatabase();
261 
262  TC_LOG_INFO("server.loading", "Loading C++ scripts");
263 
265 
267 
269  "Script loader callback wasn't registered!");
270 
272 
273 #ifdef SCRIPTS
274  for (std::string const& scriptName : UnusedScriptNames)
275  {
276  TC_LOG_ERROR("sql.sql", "ScriptName '%s' exists in database, but no core script found!", scriptName.c_str());
277  }
278 #endif
279 
280  TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
281 }
ScriptLoaderCallbackType _script_loader_callback
Definition: ScriptMgr.h:1110
uint32 getMSTime()
Definition: Timer.h:24
uint32_t uint32
Definition: Define.h:150
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
uint32 GetScriptCount() const
Definition: ScriptMgr.h:864
#define ASSERT
Definition: Errors.h:55
void FillSpellSummary()
Definition: ScriptMgr.cpp:329
void LoadDatabase()
Definition: ScriptMgr.cpp:324
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
void AddSC_SmartScripts()
Registers scripts required by the SAI scripting system.
Definition: SmartAI.cpp:926
UnusedScriptNamesContainer UnusedScriptNames
Definition: ScriptMgr.cpp:40

+ Here is the call graph for this function:

ScriptMgr * ScriptMgr::instance ( )
static
251 {
252  static ScriptMgr instance;
253  return &instance;
254 }
Definition: ScriptMgr.h:846
static ScriptMgr * instance()
Definition: ScriptMgr.cpp:250
bool ScriptMgr::IsScriptScheduled ( ) const
inline
1101 { return _scheduledScripts > 0; }
std::atomic< uint64 > _scheduledScripts
Definition: ScriptMgr.h:1108
void ScriptMgr::LoadDatabase ( )
325 {
326  sScriptSystemMgr->LoadScriptWaypoints();
327 }
#define sScriptSystemMgr
Definition: ScriptSystem.h:93

+ Here is the caller graph for this function:

void ScriptMgr::ModifyMeleeDamage ( Unit target,
Unit attacker,
uint32 damage 
)
1514 {
1515  FOREACH_SCRIPT(UnitScript)->ModifyMeleeDamage(target, attacker, damage);
1516 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:383
void ScriptMgr::ModifyPeriodicDamageAurasTick ( Unit target,
Unit attacker,
uint32 damage 
)
1509 {
1510  FOREACH_SCRIPT(UnitScript)->ModifyPeriodicDamageAurasTick(target, attacker, damage);
1511 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:383
void ScriptMgr::ModifySpellDamageTaken ( Unit target,
Unit attacker,
int32 damage 
)
1519 {
1520  FOREACH_SCRIPT(UnitScript)->ModifySpellDamageTaken(target, attacker, damage);
1521 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:383
void ScriptMgr::OnAccountLogin ( uint32  accountId)
1380 {
1381  FOREACH_SCRIPT(AccountScript)->OnAccountLogin(accountId);
1382 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnAddCreaturePassenger ( Transport transport,
Creature creature 
)
1177 {
1178  ASSERT(transport);
1179  ASSERT(creature);
1180 
1181  GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
1182  tmpscript->OnAddCreaturePassenger(transport, creature);
1183 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:614
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnAddPassenger ( Vehicle veh,
Unit passenger,
int8  seatId 
)
1140 {
1141  ASSERT(veh);
1142  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1143  ASSERT(passenger);
1144 
1145  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1146  tmpscript->OnAddPassenger(veh, passenger, seatId);
1147 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

void ScriptMgr::OnAddPassenger ( Transport transport,
Player player 
)
1168 {
1169  ASSERT(transport);
1170  ASSERT(player);
1171 
1172  GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
1173  tmpscript->OnAddPassenger(transport, player);
1174 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:614
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

bool ScriptMgr::OnAreaTrigger ( Player player,
AreaTriggerEntry const trigger,
bool  entered 
)
1004 {
1005  ASSERT(player);
1006  ASSERT(trigger);
1007 
1008  GET_SCRIPT_RET(AreaTriggerScript, sObjectMgr->GetAreaTriggerScriptId(trigger->ID), tmpscript, false);
1009  return tmpscript->OnTrigger(player, trigger, entered);
1010 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
#define sObjectMgr
Definition: ObjectMgr.h:1567
Definition: ScriptMgr.h:487
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnAuctionAdd ( AuctionHouseObject ah,
AuctionEntry entry 
)
1063 {
1064  ASSERT(ah);
1065  ASSERT(entry);
1066 
1067  FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionAdd(ah, entry);
1068 }
Definition: ScriptMgr.h:547
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnAuctionExpire ( AuctionHouseObject ah,
AuctionEntry entry 
)
1087 {
1088  ASSERT(ah);
1089  ASSERT(entry);
1090 
1091  FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionExpire(ah, entry);
1092 }
Definition: ScriptMgr.h:547
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnAuctionRemove ( AuctionHouseObject ah,
AuctionEntry entry 
)
1071 {
1072  ASSERT(ah);
1073  ASSERT(entry);
1074 
1075  FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionRemove(ah, entry);
1076 }
Definition: ScriptMgr.h:547
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnAuctionSuccessful ( AuctionHouseObject ah,
AuctionEntry entry 
)
1079 {
1080  ASSERT(ah);
1081  ASSERT(entry);
1082 
1083  FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionSuccessful(ah, entry);
1084 }
Definition: ScriptMgr.h:547
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnBaseGainCalculation ( uint32 gain,
uint8  playerLevel,
uint8  mobLevel 
)
571 {
572  FOREACH_SCRIPT(FormulaScript)->OnBaseGainCalculation(gain, playerLevel, mobLevel);
573 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnColorCodeCalculation ( XPColorChar color,
uint8  playerLevel,
uint8  mobLevel 
)
561 {
562  FOREACH_SCRIPT(FormulaScript)->OnColorCodeCalculation(color, playerLevel, mobLevel);
563 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
bool ScriptMgr::OnConditionCheck ( Condition const condition,
ConditionSourceInfo sourceInfo 
)
1095 {
1096  ASSERT(condition);
1097 
1098  GET_SCRIPT_RET(ConditionScript, condition->ScriptId, tmpscript, true);
1099  return tmpscript->OnConditionCheck(condition, sourceInfo);
1100 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:568
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnConfigLoad ( bool  reload)
526 {
527  FOREACH_SCRIPT(WorldScript)->OnConfigLoad(reload);
528 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnCreateMap ( Map map)
606 {
607  ASSERT(map);
608 
609  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
610  itr->second->OnCreate(map);
611  SCR_MAP_END;
612 
613  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
614  itr->second->OnCreate((InstanceMap*)map);
615  SCR_MAP_END;
616 
617  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
618  itr->second->OnCreate((BattlegroundMap*)map);
619  SCR_MAP_END;
620 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnCreatureKill ( Player killer,
Creature killed 
)
1234 {
1235  FOREACH_SCRIPT(PlayerScript)->OnCreatureKill(killer, killed);
1236 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnCreatureUpdate ( Creature creature,
uint32  diff 
)
886 {
887  ASSERT(creature);
888 
889  GET_SCRIPT(CreatureScript, creature->GetScriptId(), tmpscript);
890  tmpscript->OnUpdate(creature, diff);
891 }
Definition: ScriptMgr.h:406
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnCriteriaCheck ( uint32  scriptId,
Player source,
Unit target 
)
1219 {
1220  ASSERT(source);
1221  // target can be NULL.
1222 
1223  GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false);
1224  return tmpscript->OnCheck(source, target);
1225 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:635
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnDamage ( Unit attacker,
Unit victim,
uint32 damage 
)
1504 {
1505  FOREACH_SCRIPT(UnitScript)->OnDamage(attacker, victim, damage);
1506 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:383
void ScriptMgr::OnDestroyMap ( Map map)
623 {
624  ASSERT(map);
625 
626  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
627  itr->second->OnDestroy(map);
628  SCR_MAP_END;
629 
630  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
631  itr->second->OnDestroy((InstanceMap*)map);
632  SCR_MAP_END;
633 
634  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
635  itr->second->OnDestroy((BattlegroundMap*)map);
636  SCR_MAP_END;
637 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
bool ScriptMgr::OnDummyEffect ( Unit caster,
uint32  spellId,
SpellEffIndex  effIndex,
Item target 
)
742 {
743  ASSERT(caster);
744  ASSERT(target);
745 
746  GET_SCRIPT_RET(ItemScript, target->GetScriptId(), tmpscript, false);
747  return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
748 }
Definition: ScriptMgr.h:359
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Item.h:425
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnDummyEffect ( Unit caster,
uint32  spellId,
SpellEffIndex  effIndex,
Creature target 
)
789 {
790  ASSERT(caster);
791  ASSERT(target);
792 
793  GET_SCRIPT_RET(CreatureScript, target->GetScriptId(), tmpscript, false);
794  return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
795 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnDummyEffect ( Unit caster,
uint32  spellId,
SpellEffIndex  effIndex,
GameObject target 
)
995 {
996  ASSERT(caster);
997  ASSERT(target);
998 
999  GET_SCRIPT_RET(GameObjectScript, target->GetScriptId(), tmpscript, false);
1000  return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
1001 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnDynamicObjectUpdate ( DynamicObject dynobj,
uint32  diff 
)
1160 {
1161  ASSERT(dynobj);
1162 
1163  FOR_SCRIPTS(DynamicObjectScript, itr, end)
1164  itr->second->OnUpdate(dynobj, diff);
1165 }
#define FOR_SCRIPTS(T, C, E)
Definition: ScriptMgr.cpp:213
Definition: ScriptMgr.h:607
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnEmailChange ( uint32  accountId)
1390 {
1391  FOREACH_SCRIPT(AccountScript)->OnEmailChange(accountId);
1392 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnFailedAccountLogin ( uint32  accountId)
1385 {
1386  FOREACH_SCRIPT(AccountScript)->OnFailedAccountLogin(accountId);
1387 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnFailedEmailChange ( uint32  accountId)
1395 {
1396  FOREACH_SCRIPT(AccountScript)->OnFailedEmailChange(accountId);
1397 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnFailedPasswordChange ( uint32  accountId)
1405 {
1406  FOREACH_SCRIPT(AccountScript)->OnFailedPasswordChange(accountId);
1407 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnGainCalculation ( uint32 gain,
Player player,
Unit unit 
)
576 {
577  ASSERT(player);
578  ASSERT(unit);
579 
580  FOREACH_SCRIPT(FormulaScript)->OnGainCalculation(gain, player, unit);
581 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGameObjectDamaged ( GameObject go,
Player player 
)
963 {
964  ASSERT(go);
965 
966  GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
967  tmpscript->OnDamaged(go, player);
968 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGameObjectDestroyed ( GameObject go,
Player player 
)
955 {
956  ASSERT(go);
957 
958  GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
959  tmpscript->OnDestroyed(go, player);
960 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGameObjectLootStateChanged ( GameObject go,
uint32  state,
Unit unit 
)
971 {
972  ASSERT(go);
973 
974  GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
975  tmpscript->OnLootStateChanged(go, state, unit);
976 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGameObjectStateChanged ( GameObject go,
uint32  state 
)
979 {
980  ASSERT(go);
981 
982  GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
983  tmpscript->OnGameObjectStateChanged(go, state);
984 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGameObjectUpdate ( GameObject go,
uint32  diff 
)
987 {
988  ASSERT(go);
989 
990  GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
991  tmpscript->OnUpdate(go, diff);
992 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGivePlayerXP ( Player player,
uint32 amount,
Unit victim 
)
1269 {
1270  FOREACH_SCRIPT(PlayerScript)->OnGiveXP(player, amount, victim);
1271 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
bool ScriptMgr::OnGossipHello ( Player player,
Creature creature 
)
798 {
799  ASSERT(player);
800  ASSERT(creature);
801 
802  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
803  player->PlayerTalkClass->ClearMenus();
804  return tmpscript->OnGossipHello(player, creature);
805 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnGossipHello ( Player player,
GameObject go 
)
894 {
895  ASSERT(player);
896  ASSERT(go);
897 
898  GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
899  player->PlayerTalkClass->ClearMenus();
900  return tmpscript->OnGossipHello(player, go);
901 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

bool ScriptMgr::OnGossipSelect ( Player player,
Creature creature,
uint32  sender,
uint32  action 
)
808 {
809  ASSERT(player);
810  ASSERT(creature);
811 
812  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
813  return tmpscript->OnGossipSelect(player, creature, sender, action);
814 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnGossipSelect ( Player player,
GameObject go,
uint32  sender,
uint32  action 
)
904 {
905  ASSERT(player);
906  ASSERT(go);
907 
908  GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
909  return tmpscript->OnGossipSelect(player, go, sender, action);
910 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

bool ScriptMgr::OnGossipSelectCode ( Player player,
Creature creature,
uint32  sender,
uint32  action,
const char *  code 
)
817 {
818  ASSERT(player);
819  ASSERT(creature);
820  ASSERT(code);
821 
822  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
823  return tmpscript->OnGossipSelectCode(player, creature, sender, action, code);
824 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
Definition: inftrees.h:24
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnGossipSelectCode ( Player player,
GameObject go,
uint32  sender,
uint32  action,
const char *  code 
)
913 {
914  ASSERT(player);
915  ASSERT(go);
916  ASSERT(code);
917 
918  GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
919  return tmpscript->OnGossipSelectCode(player, go, sender, action, code);
920 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: inftrees.h:24
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnGrayLevelCalculation ( uint8 grayLevel,
uint8  playerLevel 
)
556 {
557  FOREACH_SCRIPT(FormulaScript)->OnGrayLevelCalculation(grayLevel, playerLevel);
558 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGroupAddMember ( Group group,
ObjectGuid  guid 
)
1468 {
1469  ASSERT(group);
1470  FOREACH_SCRIPT(GroupScript)->OnAddMember(group, guid);
1471 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:812
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGroupChangeLeader ( Group group,
ObjectGuid  newLeaderGuid,
ObjectGuid  oldLeaderGuid 
)
1486 {
1487  ASSERT(group);
1488  FOREACH_SCRIPT(GroupScript)->OnChangeLeader(group, newLeaderGuid, oldLeaderGuid);
1489 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:812
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGroupDisband ( Group group)
1492 {
1493  ASSERT(group);
1494  FOREACH_SCRIPT(GroupScript)->OnDisband(group);
1495 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:812
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGroupInviteMember ( Group group,
ObjectGuid  guid 
)
1474 {
1475  ASSERT(group);
1476  FOREACH_SCRIPT(GroupScript)->OnInviteMember(group, guid);
1477 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:812
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGroupRateCalculation ( float &  rate,
uint32  count,
bool  isRaid 
)
584 {
585  FOREACH_SCRIPT(FormulaScript)->OnGroupRateCalculation(rate, count, isRaid);
586 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGroupRemoveMember ( Group group,
ObjectGuid  guid,
RemoveMethod  method,
ObjectGuid  kicker,
const char *  reason 
)
1480 {
1481  ASSERT(group);
1482  FOREACH_SCRIPT(GroupScript)->OnRemoveMember(group, guid, method, kicker, reason);
1483 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:812
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnGuildAddMember ( Guild guild,
Player player,
uint8 plRank 
)
1411 {
1412  FOREACH_SCRIPT(GuildScript)->OnAddMember(guild, player, plRank);
1413 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildBankEvent ( Guild guild,
uint8  eventType,
uint8  tabId,
ObjectGuid::LowType  playerGuid,
uint64  itemOrMoney,
uint16  itemStackCount,
uint8  destTabId 
)
1462 {
1463  FOREACH_SCRIPT(GuildScript)->OnBankEvent(guild, eventType, tabId, playerGuid, itemOrMoney, itemStackCount, destTabId);
1464 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildCreate ( Guild guild,
Player leader,
const std::string &  name 
)
1431 {
1432  FOREACH_SCRIPT(GuildScript)->OnCreate(guild, leader, name);
1433 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildDisband ( Guild guild)
1436 {
1437  FOREACH_SCRIPT(GuildScript)->OnDisband(guild);
1438 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildEvent ( Guild guild,
uint8  eventType,
ObjectGuid::LowType  playerGuid1,
ObjectGuid::LowType  playerGuid2,
uint8  newRank 
)
1457 {
1458  FOREACH_SCRIPT(GuildScript)->OnEvent(guild, eventType, playerGuid1, playerGuid2, newRank);
1459 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildInfoChanged ( Guild guild,
const std::string &  newInfo 
)
1426 {
1427  FOREACH_SCRIPT(GuildScript)->OnInfoChanged(guild, newInfo);
1428 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildItemMove ( Guild guild,
Player player,
Item pItem,
bool  isSrcBank,
uint8  srcContainer,
uint8  srcSlotId,
bool  isDestBank,
uint8  destContainer,
uint8  destSlotId 
)
1452 {
1453  FOREACH_SCRIPT(GuildScript)->OnItemMove(guild, player, pItem, isSrcBank, srcContainer, srcSlotId, isDestBank, destContainer, destSlotId);
1454 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildMemberDepositMoney ( Guild guild,
Player player,
uint64 amount 
)
1446 {
1447  FOREACH_SCRIPT(GuildScript)->OnMemberDepositMoney(guild, player, amount);
1448 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildMemberWitdrawMoney ( Guild guild,
Player player,
uint64 amount,
bool  isRepair 
)
1441 {
1442  FOREACH_SCRIPT(GuildScript)->OnMemberWitdrawMoney(guild, player, amount, isRepair);
1443 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildMOTDChanged ( Guild guild,
const std::string &  newMotd 
)
1421 {
1422  FOREACH_SCRIPT(GuildScript)->OnMOTDChanged(guild, newMotd);
1423 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnGuildRemoveMember ( Guild guild,
ObjectGuid  guid,
bool  isDisbanding,
bool  isKicked 
)
1416 {
1417  FOREACH_SCRIPT(GuildScript)->OnRemoveMember(guild, guid, isDisbanding, isKicked);
1418 }
Definition: ScriptMgr.h:771
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnHeal ( Unit healer,
Unit reciever,
uint32 gain 
)
1499 {
1500  FOREACH_SCRIPT(UnitScript)->OnHeal(healer, reciever, gain);
1501 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:383
void ScriptMgr::OnHonorCalculation ( float &  honor,
uint8  level,
float  multiplier 
)
551 {
552  FOREACH_SCRIPT(FormulaScript)->OnHonorCalculation(honor, level, multiplier);
553 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnInstall ( Vehicle veh)
1103 {
1104  ASSERT(veh);
1105  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1106 
1107  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1108  tmpscript->OnInstall(veh);
1109 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

void ScriptMgr::OnInstallAccessory ( Vehicle veh,
Creature accessory 
)
1130 {
1131  ASSERT(veh);
1132  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1133  ASSERT(accessory);
1134 
1135  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1136  tmpscript->OnInstallAccessory(veh, accessory);
1137 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

bool ScriptMgr::OnItemExpire ( Player player,
ItemTemplate const proto 
)
771 {
772  ASSERT(player);
773  ASSERT(proto);
774 
775  GET_SCRIPT_RET(ItemScript, proto->ScriptId, tmpscript, false);
776  return tmpscript->OnExpire(player, proto);
777 }
Definition: ScriptMgr.h:359
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
#define ASSERT
Definition: Errors.h:55
bool ScriptMgr::OnItemRemove ( Player player,
Item item 
)
780 {
781  ASSERT(player);
782  ASSERT(item);
783 
784  GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false);
785  return tmpscript->OnRemove(player, item);
786 }
Definition: ScriptMgr.h:359
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Item.h:425
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnItemUse ( Player player,
Item item,
SpellCastTargets const targets 
)
762 {
763  ASSERT(player);
764  ASSERT(item);
765 
766  GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false);
767  return tmpscript->OnUse(player, item, targets);
768 }
Definition: ScriptMgr.h:359
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Item.h:425
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

void ScriptMgr::OnLoadGridMap ( Map map,
GridMap gmap,
uint32  gx,
uint32  gy 
)
640 {
641  ASSERT(map);
642  ASSERT(gmap);
643 
644  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
645  itr->second->OnLoadGridMap(map, gmap, gx, gy);
646  SCR_MAP_END;
647 
648  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
649  itr->second->OnLoadGridMap((InstanceMap*)map, gmap, gx, gy);
650  SCR_MAP_END;
651 
652  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
653  itr->second->OnLoadGridMap((BattlegroundMap*)map, gmap, gx, gy);
654  SCR_MAP_END;
655 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnMapUpdate ( Map map,
uint32  diff 
)
714 {
715  ASSERT(map);
716 
717  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
718  itr->second->OnUpdate(map, diff);
719  SCR_MAP_END;
720 
721  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
722  itr->second->OnUpdate((InstanceMap*)map, diff);
723  SCR_MAP_END;
724 
725  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
726  itr->second->OnUpdate((BattlegroundMap*)map, diff);
727  SCR_MAP_END;
728 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnMotdChange ( std::string &  newMotd)
531 {
532  FOREACH_SCRIPT(WorldScript)->OnMotdChange(newMotd);
533 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnNetworkStart ( )
477 {
478  FOREACH_SCRIPT(ServerScript)->OnNetworkStart();
479 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
void ScriptMgr::OnNetworkStop ( )
482 {
483  FOREACH_SCRIPT(ServerScript)->OnNetworkStop();
484 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
void ScriptMgr::OnOpenStateChange ( bool  open)
521 {
522  FOREACH_SCRIPT(WorldScript)->OnOpenStateChange(open);
523 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnPacketReceive ( WorldSession session,
WorldPacket const packet 
)
501 {
502  if (SCR_REG_LST(ServerScript).empty())
503  return;
504 
505  WorldPacket copy(packet);
506  FOREACH_SCRIPT(ServerScript)->OnPacketReceive(session, copy);
507 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
#define SCR_REG_LST(T)
Definition: ScriptMgr.cpp:209
Definition: WorldPacket.h:26
void ScriptMgr::OnPacketSend ( WorldSession session,
WorldPacket const packet 
)
510 {
511  ASSERT(session);
512 
513  if (SCR_REG_LST(ServerScript).empty())
514  return;
515 
516  WorldPacket copy(packet);
517  FOREACH_SCRIPT(ServerScript)->OnPacketSend(session, copy);
518 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
#define SCR_REG_LST(T)
Definition: ScriptMgr.cpp:209
#define ASSERT
Definition: Errors.h:55
Definition: WorldPacket.h:26
void ScriptMgr::OnPasswordChange ( uint32  accountId)
1400 {
1401  FOREACH_SCRIPT(AccountScript)->OnPasswordChange(accountId);
1402 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:744
void ScriptMgr::OnPlayerBindToInstance ( Player player,
Difficulty  difficulty,
uint32  mapid,
bool  permanent,
uint8  extendState 
)
1364 {
1365  FOREACH_SCRIPT(PlayerScript)->OnBindToInstance(player, difficulty, mapid, permanent, extendState);
1366 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg 
)
1294 {
1295  FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg);
1296 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Player receiver 
)
1299 {
1300  FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, receiver);
1301 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Group group 
)
1304 {
1305  FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, group);
1306 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Guild guild 
)
1309 {
1310  FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, guild);
1311 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Channel channel 
)
1314 {
1315  FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, channel);
1316 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerClearEmote ( Player player)
1319 {
1320  FOREACH_SCRIPT(PlayerScript)->OnClearEmote(player);
1321 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerCreate ( Player player)
1344 {
1345  FOREACH_SCRIPT(PlayerScript)->OnCreate(player);
1346 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerDelete ( ObjectGuid  guid,
uint32  accountId 
)
1349 {
1350  FOREACH_SCRIPT(PlayerScript)->OnDelete(guid, accountId);
1351 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerDuelEnd ( Player winner,
Player loser,
DuelCompleteType  type 
)
1289 {
1290  FOREACH_SCRIPT(PlayerScript)->OnDuelEnd(winner, loser, type);
1291 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerDuelRequest ( Player target,
Player challenger 
)
1279 {
1280  FOREACH_SCRIPT(PlayerScript)->OnDuelRequest(target, challenger);
1281 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerDuelStart ( Player player1,
Player player2 
)
1284 {
1285  FOREACH_SCRIPT(PlayerScript)->OnDuelStart(player1, player2);
1286 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerEnterMap ( Map map,
Player player 
)
676 {
677  ASSERT(map);
678  ASSERT(player);
679 
680  FOREACH_SCRIPT(PlayerScript)->OnMapChanged(player);
681 
682  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
683  itr->second->OnPlayerEnter(map, player);
684  SCR_MAP_END;
685 
686  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
687  itr->second->OnPlayerEnter((InstanceMap*)map, player);
688  SCR_MAP_END;
689 
690  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
691  itr->second->OnPlayerEnter((BattlegroundMap*)map, player);
692  SCR_MAP_END;
693 }
Definition: ScriptMgr.h:340
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
Definition: ScriptMgr.h:647
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnPlayerFailedDelete ( ObjectGuid  guid,
uint32  accountId 
)
1354 {
1355  FOREACH_SCRIPT(PlayerScript)->OnFailedDelete(guid, accountId);
1356 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerFreeTalentPointsChanged ( Player player,
uint32  newPoints 
)
1249 {
1250  FOREACH_SCRIPT(PlayerScript)->OnFreeTalentPointsChanged(player, points);
1251 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerKilledByCreature ( Creature killer,
Player killed 
)
1239 {
1240  FOREACH_SCRIPT(PlayerScript)->OnPlayerKilledByCreature(killer, killed);
1241 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerLeaveMap ( Map map,
Player player 
)
696 {
697  ASSERT(map);
698  ASSERT(player);
699 
700  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
701  itr->second->OnPlayerLeave(map, player);
702  SCR_MAP_END;
703 
704  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
705  itr->second->OnPlayerLeave((InstanceMap*)map, player);
706  SCR_MAP_END;
707 
708  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
709  itr->second->OnPlayerLeave((BattlegroundMap*)map, player);
710  SCR_MAP_END;
711 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnPlayerLevelChanged ( Player player,
uint8  oldLevel 
)
1244 {
1245  FOREACH_SCRIPT(PlayerScript)->OnLevelChanged(player, oldLevel);
1246 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerLogin ( Player player,
bool  firstLogin 
)
1334 {
1335  FOREACH_SCRIPT(PlayerScript)->OnLogin(player, firstLogin);
1336 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerLogout ( Player player)
1339 {
1340  FOREACH_SCRIPT(PlayerScript)->OnLogout(player);
1341 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerMoneyChanged ( Player player,
int64 amount 
)
1259 {
1260  FOREACH_SCRIPT(PlayerScript)->OnMoneyChanged(player, amount);
1261 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerMoneyLimit ( Player player,
int64  amount 
)
1264 {
1265  FOREACH_SCRIPT(PlayerScript)->OnMoneyLimit(player, amount);
1266 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerReputationChange ( Player player,
uint32  factionID,
int32 standing,
bool  incremental 
)
1274 {
1275  FOREACH_SCRIPT(PlayerScript)->OnReputationChange(player, factionID, standing, incremental);
1276 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerSave ( Player player)
1359 {
1360  FOREACH_SCRIPT(PlayerScript)->OnSave(player);
1361 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerSpellCast ( Player player,
Spell spell,
bool  skipCheck 
)
1329 {
1330  FOREACH_SCRIPT(PlayerScript)->OnSpellCast(player, spell, skipCheck);
1331 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerTalentsReset ( Player player,
bool  noCost 
)
1254 {
1255  FOREACH_SCRIPT(PlayerScript)->OnTalentsReset(player, noCost);
1256 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerTextEmote ( Player player,
uint32  textEmote,
uint32  emoteNum,
ObjectGuid  guid 
)
1324 {
1325  FOREACH_SCRIPT(PlayerScript)->OnTextEmote(player, textEmote, emoteNum, guid);
1326 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPlayerUpdateZone ( Player player,
uint32  newZone,
uint32  newArea 
)
1369 {
1370  FOREACH_SCRIPT(PlayerScript)->OnUpdateZone(player, newZone, newArea);
1371 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnPVPKill ( Player killer,
Player killed 
)
1229 {
1230  FOREACH_SCRIPT(PlayerScript)->OnPVPKill(killer, killed);
1231 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
bool ScriptMgr::OnQuestAccept ( Player player,
Item item,
Quest const quest 
)
751 {
752  ASSERT(player);
753  ASSERT(item);
754  ASSERT(quest);
755 
756  GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false);
757  player->PlayerTalkClass->ClearMenus();
758  return tmpscript->OnQuestAccept(player, item, quest);
759 }
Definition: ScriptMgr.h:359
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Item.h:425
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnQuestAccept ( Player player,
Creature creature,
Quest const quest 
)
827 {
828  ASSERT(player);
829  ASSERT(creature);
830  ASSERT(quest);
831 
832  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
833  player->PlayerTalkClass->ClearMenus();
834  return tmpscript->OnQuestAccept(player, creature, quest);
835 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnQuestAccept ( Player player,
GameObject go,
Quest const quest 
)
923 {
924  ASSERT(player);
925  ASSERT(go);
926  ASSERT(quest);
927 
928  GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
929  player->PlayerTalkClass->ClearMenus();
930  return tmpscript->OnQuestAccept(player, go, quest);
931 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

bool ScriptMgr::OnQuestReward ( Player player,
Creature creature,
Quest const quest,
uint32  opt 
)
849 {
850  ASSERT(player);
851  ASSERT(creature);
852  ASSERT(quest);
853 
854  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
855  player->PlayerTalkClass->ClearMenus();
856  return tmpscript->OnQuestReward(player, creature, quest, opt);
857 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

bool ScriptMgr::OnQuestReward ( Player player,
GameObject go,
Quest const quest,
uint32  opt 
)
934 {
935  ASSERT(player);
936  ASSERT(go);
937  ASSERT(quest);
938 
939  GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, false);
940  player->PlayerTalkClass->ClearMenus();
941  return tmpscript->OnQuestReward(player, go, quest, opt);
942 }
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
Definition: ScriptMgr.h:442
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

bool ScriptMgr::OnQuestSelect ( Player player,
Creature creature,
Quest const quest 
)
838 {
839  ASSERT(player);
840  ASSERT(creature);
841  ASSERT(quest);
842 
843  GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
844  player->PlayerTalkClass->ClearMenus();
845  return tmpscript->OnQuestSelect(player, creature, quest);
846 }
Definition: ScriptMgr.h:406
#define GET_SCRIPT_RET(T, I, V, R)
Definition: ScriptMgr.cpp:232
uint32 GetScriptId() const
Definition: Creature.cpp:2427
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

void ScriptMgr::OnQuestStatusChange ( Player player,
uint32  questId,
QuestStatus  status 
)
1374 {
1375  FOREACH_SCRIPT(PlayerScript)->OnQuestStatusChange(player, questId, status);
1376 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:647
void ScriptMgr::OnRelocate ( Transport transport,
uint32  waypointId,
uint32  mapId,
float  x,
float  y,
float  z 
)
1203 {
1204  GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
1205  tmpscript->OnRelocate(transport, waypointId, mapId, x, y, z);
1206 }
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:614
G3D::int16 x
Definition: Vector2int16.h:37
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnRemovePassenger ( Vehicle veh,
Unit passenger 
)
1150 {
1151  ASSERT(veh);
1152  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1153  ASSERT(passenger);
1154 
1155  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1156  tmpscript->OnRemovePassenger(veh, passenger);
1157 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

void ScriptMgr::OnRemovePassenger ( Transport transport,
Player player 
)
1186 {
1187  ASSERT(transport);
1188  ASSERT(player);
1189 
1190  GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
1191  tmpscript->OnRemovePassenger(transport, player);
1192 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:614
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnReset ( Vehicle veh)
1121 {
1122  ASSERT(veh);
1123  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1124 
1125  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1126  tmpscript->OnReset(veh);
1127 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

void ScriptMgr::OnShutdown ( )
1214 {
1215  FOREACH_SCRIPT(WorldScript)->OnShutdown();
1216 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnShutdownCancel ( )
541 {
542  FOREACH_SCRIPT(WorldScript)->OnShutdownCancel();
543 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnShutdownInitiate ( ShutdownExitCode  code,
ShutdownMask  mask 
)
536 {
537  FOREACH_SCRIPT(WorldScript)->OnShutdownInitiate(code, mask);
538 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: inftrees.h:24
void ScriptMgr::OnSocketClose ( std::shared_ptr< WorldSocket socket)
494 {
495  ASSERT(socket);
496 
497  FOREACH_SCRIPT(ServerScript)->OnSocketClose(socket);
498 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnSocketOpen ( std::shared_ptr< WorldSocket socket)
487 {
488  ASSERT(socket);
489 
490  FOREACH_SCRIPT(ServerScript)->OnSocketOpen(socket);
491 }
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
Definition: ScriptMgr.h:203
#define ASSERT
Definition: Errors.h:55
void ScriptMgr::OnStartup ( )
1209 {
1210  FOREACH_SCRIPT(WorldScript)->OnStartup();
1211 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnTransportUpdate ( Transport transport,
uint32  diff 
)
1195 {
1196  ASSERT(transport);
1197 
1198  GET_SCRIPT(TransportScript, transport->GetScriptId(), tmpscript);
1199  tmpscript->OnUpdate(transport, diff);
1200 }
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:614
#define ASSERT
Definition: Errors.h:55
virtual uint32 GetScriptId() const
Definition: GameObject.h:1060

+ Here is the call graph for this function:

void ScriptMgr::OnUninstall ( Vehicle veh)
1112 {
1113  ASSERT(veh);
1114  ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
1115 
1116  GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
1117  tmpscript->OnUninstall(veh);
1118 }
Definition: ObjectGuid.h:32
uint32 GetScriptId() const
Definition: Creature.cpp:2427
TypeID GetTypeId() const
Definition: Object.h:113
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:580
Creature * ToCreature()
Definition: Object.h:194
#define ASSERT
Definition: Errors.h:55
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:49

+ Here is the call graph for this function:

void ScriptMgr::OnUnloadGridMap ( Map map,
GridMap gmap,
uint32  gx,
uint32  gy 
)
658 {
659  ASSERT(map);
660  ASSERT(gmap);
661 
662  SCR_MAP_BGN(WorldMapScript, map, itr, end, entry, IsWorldMap);
663  itr->second->OnUnloadGridMap(map, gmap, gx, gy);
664  SCR_MAP_END;
665 
666  SCR_MAP_BGN(InstanceMapScript, map, itr, end, entry, IsDungeon);
667  itr->second->OnUnloadGridMap((InstanceMap*)map, gmap, gx, gy);
668  SCR_MAP_END;
669 
670  SCR_MAP_BGN(BattlegroundMapScript, map, itr, end, entry, IsBattleground);
671  itr->second->OnUnloadGridMap((BattlegroundMap*)map, gmap, gx, gy);
672  SCR_MAP_END;
673 }
Definition: ScriptMgr.h:340
Definition: Map.h:758
#define SCR_MAP_BGN(M, V, I, E, C, T)
Definition: ScriptMgr.cpp:588
Definition: Map.h:790
Definition: ScriptMgr.h:333
#define SCR_MAP_END
Definition: ScriptMgr.cpp:599
#define ASSERT
Definition: Errors.h:55
Definition: ScriptMgr.h:352
void ScriptMgr::OnWeatherChange ( Weather weather,
WeatherState  state,
float  grade 
)
1047 {
1048  ASSERT(weather);
1049 
1050  GET_SCRIPT(WeatherScript, weather->GetScriptId(), tmpscript);
1051  tmpscript->OnChange(weather, state, grade);
1052 }
uint32 GetScriptId() const
Definition: Weather.h:81
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:535
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

void ScriptMgr::OnWeatherUpdate ( Weather weather,
uint32  diff 
)
1055 {
1056  ASSERT(weather);
1057 
1058  GET_SCRIPT(WeatherScript, weather->GetScriptId(), tmpscript);
1059  tmpscript->OnUpdate(weather, diff);
1060 }
uint32 GetScriptId() const
Definition: Weather.h:81
#define GET_SCRIPT(T, I, V)
Definition: ScriptMgr.cpp:228
Definition: ScriptMgr.h:535
#define ASSERT
Definition: Errors.h:55

+ Here is the call graph for this function:

void ScriptMgr::OnWorldUpdate ( uint32  diff)
546 {
547  FOREACH_SCRIPT(WorldScript)->OnUpdate(diff);
548 }
Definition: ScriptMgr.h:233
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
void ScriptMgr::OnZeroDifferenceCalculation ( uint8 diff,
uint8  playerLevel 
)
566 {
567  FOREACH_SCRIPT(FormulaScript)->OnZeroDifferenceCalculation(diff, playerLevel);
568 }
Definition: ScriptMgr.h:266
#define FOREACH_SCRIPT(T)
Definition: ScriptMgr.cpp:223
const char* ScriptMgr::ScriptsVersion ( ) const
inline
861 { return "Integrated Trinity Scripts"; }
void ScriptMgr::SetScriptLoader ( ScriptLoaderCallbackType  script_loader_callback)
inline

Sets the script loader callback which is invoked to load scripts (Workaround for circular dependency game <-> scripts)

871  {
872  _script_loader_callback = script_loader_callback;
873  }
ScriptLoaderCallbackType _script_loader_callback
Definition: ScriptMgr.h:1110
void ScriptMgr::Unload ( )
284 {
285  #define SCR_CLEAR(T) \
286  for (T* scr : SCR_REG_VEC(T)) \
287  delete scr; \
288  SCR_REG_VEC(T).clear();
289 
290  // Clear scripts for every script type.
317 
318  #undef SCR_CLEAR
319 
320  delete[] SpellSummary;
321  delete[] UnitAI::AISpellInfo;
322 }
static AISpellInfoType * AISpellInfo
Definition: UnitAI.h:250
Definition: ScriptMgr.h:359
Definition: ScriptMgr.h:406
Definition: ScriptMgr.h:340
Definition: ScriptMgr.h:233
Definition: ScriptMgr.h:547
Definition: ScriptMgr.h:771
Definition: ScriptMgr.h:266
Definition: ScriptMgr.h:635
Definition: ScriptMgr.h:568
Definition: ScriptMgr.h:511
Definition: ScriptMgr.h:203
Definition: ScriptMgr.h:523
#define SCR_CLEAR(T)
Definition: ScriptMgr.h:744
Definition: ScriptMgr.h:333
Definition: ScriptMgr.h:499
Definition: ScriptMgr.h:487
Definition: ScriptMgr.h:580
Definition: ScriptMgr.h:812
Definition: ScriptMgr.h:535
Definition: ScriptMgr.h:607
Definition: ScriptMgr.h:442
Definition: ScriptMgr.h:614
Definition: ScriptMgr.h:647
Definition: ScriptMgr.h:383
Definition: ScriptMgr.h:188
Definition: ScriptMgr.h:352
struct TSpellSummary * SpellSummary

Friends And Related Function Documentation

friend class ScriptObject
friend

Member Data Documentation

std::atomic<uint64> ScriptMgr::_scheduledScripts
private
ScriptLoaderCallbackType ScriptMgr::_script_loader_callback
private
uint32 ScriptMgr::_scriptCount
private

The documentation for this class was generated from the following files: