TrinityCore
Loading...
Searching...
No Matches
ScriptMgr Class Reference

#include <ScriptMgr.h>

Public Types

typedef void(* ScriptLoaderCallbackType) ()
 

Public Member Functions

void Initialize ()
 
uint32 GetScriptCount () const
 
void SetScriptLoader (ScriptLoaderCallbackType script_loader_callback)
 
void NotifyScriptIDUpdate ()
 Inform the ScriptMgr that an entity has a changed script id.
 
void SyncScripts ()
 Synchronize all scripts with their current ids.
 
void SetScriptContext (std::string const &context)
 
std::string const & GetCurrentScriptContext () const
 Returns the current script context.
 
void ReleaseScriptContext (std::string const &context)
 
void SwapScriptContext (bool initialize=false)
 
std::shared_ptr< ModuleReference > AcquireModuleReferenceOfScriptName (std::string const &scriptname) const
 
void Unload ()
 
void CreateSpellScripts (uint32 spellId, std::vector< SpellScript * > &scriptVector, Spell *invoker) const
 
void CreateAuraScripts (uint32 spellId, std::vector< AuraScript * > &scriptVector, Aura *invoker) const
 
SpellScriptLoader * GetSpellScriptLoader (uint32 scriptId)
 
void OnNetworkStart ()
 
void OnNetworkStop ()
 
void OnSocketOpen (std::shared_ptr< WorldSocket > const &socket)
 
void OnSocketClose (std::shared_ptr< WorldSocket > const &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 OnPlayerEnterMap (Map *map, Player *player)
 
void OnPlayerLeaveMap (Map *map, Player *player)
 
void OnMapUpdate (Map *map, uint32 diff)
 
InstanceScript * CreateInstanceData (InstanceMap *map)
 
bool OnQuestAccept (Player *player, Item *item, Quest const *quest)
 
bool OnItemUse (Player *player, Item *item, SpellCastTargets const &targets, ObjectGuid castId)
 
bool OnItemExpire (Player *player, ItemTemplate const *proto)
 
bool OnItemRemove (Player *player, Item *item)
 
bool OnCastItemCombatSpell (Player *player, Unit *victim, SpellInfo const *spellInfo, Item *item)
 
bool CanCreateCreatureAI (uint32 scriptId) const
 
CreatureAI * GetCreatureAI (Creature *creature)
 
bool CanCreateGameObjectAI (uint32 scriptId) const
 
GameObjectAI * GetGameObjectAI (GameObject *go)
 
bool OnAreaTrigger (Player *player, AreaTriggerEntry const *trigger, bool entered)
 
Battlefield * CreateBattlefield (uint32 scriptId, Map *map)
 
BattlegroundScript * CreateBattlegroundData (BattlegroundMap *map)
 
OutdoorPvP * CreateOutdoorPvP (uint32 scriptId, Map *map)
 
std::vector< Trinity::ChatCommands::ChatCommandBuilder > GetChatCommands ()
 
void OnWeatherChange (Weather *weather, WeatherState state, float grade)
 
void OnWeatherUpdate (Weather *weather, uint32 diff)
 
void OnAuctionAdd (AuctionHouseObject *ah, AuctionPosting *auction)
 
void OnAuctionRemove (AuctionHouseObject *ah, AuctionPosting *auction)
 
void OnAuctionSuccessful (AuctionHouseObject *ah, AuctionPosting *auction)
 
void OnAuctionExpire (AuctionHouseObject *ah, AuctionPosting *auction)
 
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 mapId, float x, float y, float z)
 
void OnAchievementCompleted (Player *player, AchievementEntry const *achievement)
 
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 involuntarily)
 
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)
 
void OnPlayerRepop (Player *player)
 
void OnMovieComplete (Player *player, uint32 movieId)
 
void OnPlayerChoiceResponse (WorldObject *object, Player *player, PlayerChoice const *choice, PlayerChoiceResponse const *response, uint16 clientIdentifier)
 
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, char const *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, SpellInfo const *spellInfo)
 
bool CanCreateAreaTriggerAI (uint32 scriptId) const
 
AreaTriggerAI * GetAreaTriggerAI (AreaTrigger *areaTrigger)
 
bool CanCreateConversationAI (uint32 scriptId) const
 
ConversationAI * GetConversationAI (Conversation *conversation)
 
void OnSceneStart (Player *player, uint32 sceneInstanceID, SceneTemplate const *sceneTemplate)
 
void OnSceneTrigger (Player *player, uint32 sceneInstanceID, SceneTemplate const *sceneTemplate, std::string const &triggerName)
 
void OnSceneCancel (Player *player, uint32 sceneInstanceID, SceneTemplate const *sceneTemplate)
 
void OnSceneComplete (Player *player, uint32 sceneInstanceID, SceneTemplate const *sceneTemplate)
 
void OnQuestStatusChange (Player *player, Quest const *quest, QuestStatus oldStatus, QuestStatus newStatus)
 
void OnQuestAcknowledgeAutoAccept (Player *player, Quest const *quest)
 
void OnQuestObjectiveChange (Player *player, Quest const *quest, QuestObjective const &objective, int32 oldAmount, int32 newAmount)
 
void OnWorldStateValueChange (WorldStateTemplate const *worldStateTemplate, int32 oldValue, int32 newValue, Map const *map)
 
void OnEventTrigger (WorldObject *object, WorldObject *invoker, uint32 eventId)
 

Static Public Member Functions

static ScriptMgr * instance ()
 
static std::string const & GetNameOfStaticContext ()
 Returns the context name of the static context provided by the worldserver.
 

Private Member Functions

 ScriptMgr ()
 
 ~ScriptMgr ()
 
 ScriptMgr (ScriptMgr const &right)=delete
 
 ScriptMgr (ScriptMgr &&right)=delete
 
ScriptMgr & operator= (ScriptMgr const &right)=delete
 
ScriptMgr & operator= (ScriptMgr &&right)=delete
 
void FillSpellSummary ()
 
void LoadDatabase ()
 
void IncreaseScriptCount ()
 
void DecreaseScriptCount ()
 

Private Attributes

uint32 _scriptCount
 
bool _scriptIdUpdated
 
ScriptLoaderCallbackType _script_loader_callback
 
std::string _currentContext
 

Friends

class ScriptObject
 

Detailed Description

Definition at line 1014 of file ScriptMgr.h.

Member Typedef Documentation

◆ ScriptLoaderCallbackType

typedef void(* ScriptMgr::ScriptLoaderCallbackType) ()

Definition at line 1040 of file ScriptMgr.h.

Constructor & Destructor Documentation

◆ ScriptMgr() [1/3]

ScriptMgr::ScriptMgr ( )
private

Definition at line 1289 of file ScriptMgr.cpp.

◆ ~ScriptMgr()

ScriptMgr::~ScriptMgr ( )
privatedefault

◆ ScriptMgr() [2/3]

ScriptMgr::ScriptMgr ( ScriptMgr const &  right)
privatedelete

◆ ScriptMgr() [3/3]

ScriptMgr::ScriptMgr ( ScriptMgr &&  right)
privatedelete

Member Function Documentation

◆ AcquireModuleReferenceOfScriptName()

std::shared_ptr< ModuleReference > ScriptMgr::AcquireModuleReferenceOfScriptName ( std::string const &  scriptname) const

Acquires a strong module reference to the module containing the given script name, which prevents the shared library which contains the script from unloading. The shared library is lazy unloaded as soon as all references to it are released.

Definition at line 1394 of file ScriptMgr.cpp.

References ScriptReloadMgr::AcquireModuleReferenceOfContext(), sScriptRegistryCompositum, and WPAbort.

◆ CanCreateAreaTriggerAI()

bool ScriptMgr::CanCreateAreaTriggerAI ( uint32  scriptId) const

Definition at line 1743 of file ScriptMgr.cpp.

References ScriptRegistry< ScriptType >::Instance().

◆ CanCreateConversationAI()

bool ScriptMgr::CanCreateConversationAI ( uint32  scriptId) const

Definition at line 1765 of file ScriptMgr.cpp.

References ScriptRegistry< ScriptType >::Instance().

◆ CanCreateCreatureAI()

bool ScriptMgr::CanCreateCreatureAI ( uint32  scriptId) const

Definition at line 1717 of file ScriptMgr.cpp.

References ScriptRegistry< ScriptType >::Instance().

◆ CanCreateGameObjectAI()

bool ScriptMgr::CanCreateGameObjectAI ( uint32  scriptId) const

Definition at line 1730 of file ScriptMgr.cpp.

References ScriptRegistry< ScriptType >::Instance().

◆ CreateAuraScripts()

void ScriptMgr::CreateAuraScripts ( uint32  spellId,
std::vector< AuraScript * > &  scriptVector,
Aura *  invoker 
) const

◆ CreateBattlefield()

Battlefield * ScriptMgr::CreateBattlefield ( uint32  scriptId,
Map *  map 
)

Definition at line 1778 of file ScriptMgr.cpp.

References GET_SCRIPT_RET.

◆ CreateBattlegroundData()

BattlegroundScript * ScriptMgr::CreateBattlegroundData ( BattlegroundMap *  map)

Definition at line 1660 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and BattlegroundMap::GetScriptId().

◆ CreateInstanceData()

InstanceScript * ScriptMgr::CreateInstanceData ( InstanceMap *  map)

Definition at line 1652 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and InstanceMap::GetScriptId().

◆ CreateOutdoorPvP()

OutdoorPvP * ScriptMgr::CreateOutdoorPvP ( uint32  scriptId,
Map *  map 
)

Definition at line 1784 of file ScriptMgr.cpp.

References GET_SCRIPT_RET.

◆ CreateSpellScripts()

void ScriptMgr::CreateSpellScripts ( uint32  spellId,
std::vector< SpellScript * > &  scriptVector,
Spell *  invoker 
) const

◆ DecreaseScriptCount()

void ScriptMgr::DecreaseScriptCount ( )
inlineprivate

Definition at line 1031 of file ScriptMgr.h.

◆ FillSpellSummary()

void ScriptMgr::FillSpellSummary ( )
private

Definition at line 1420 of file ScriptMgr.cpp.

References UnitAI::FillAISpellInfo().

Referenced by Initialize().

◆ GetAreaTriggerAI()

AreaTriggerAI * ScriptMgr::GetAreaTriggerAI ( AreaTrigger *  areaTrigger)

Definition at line 1748 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and AreaTrigger::GetScriptId().

◆ GetChatCommands()

std::vector< Trinity::ChatCommands::ChatCommandBuilder > ScriptMgr::GetChatCommands ( )

Definition at line 1790 of file ScriptMgr.cpp.

References FOR_SCRIPTS.

◆ GetConversationAI()

ConversationAI * ScriptMgr::GetConversationAI ( Conversation *  conversation)

Definition at line 1770 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Conversation::GetScriptId().

◆ GetCreatureAI()

CreatureAI * ScriptMgr::GetCreatureAI ( Creature *  creature)

Definition at line 1722 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Creature::GetScriptId().

◆ GetCurrentScriptContext()

std::string const & ScriptMgr::GetCurrentScriptContext ( ) const
inline

Returns the current script context.

Definition at line 1061 of file ScriptMgr.h.

◆ GetGameObjectAI()

GameObjectAI * ScriptMgr::GetGameObjectAI ( GameObject *  go)

Definition at line 1735 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and GameObject::GetScriptId().

◆ GetNameOfStaticContext()

std::string const & ScriptMgr::GetNameOfStaticContext ( )
static

Returns the context name of the static context provided by the worldserver.

Definition at line 1382 of file ScriptMgr.cpp.

Referenced by Initialize().

◆ GetScriptCount()

uint32 ScriptMgr::GetScriptCount ( ) const
inline

Definition at line 1038 of file ScriptMgr.h.

Referenced by Initialize().

◆ GetSpellScriptLoader()

SpellScriptLoader * ScriptMgr::GetSpellScriptLoader ( uint32  scriptId)

Definition at line 1464 of file ScriptMgr.cpp.

References ScriptRegistry< ScriptType >::Instance().

◆ IncreaseScriptCount()

void ScriptMgr::IncreaseScriptCount ( )
inlineprivate

Definition at line 1030 of file ScriptMgr.h.

◆ Initialize()

◆ instance()

ScriptMgr * ScriptMgr::instance ( )
static

Definition at line 1296 of file ScriptMgr.cpp.

References instance().

Referenced by instance().

◆ LoadDatabase()

void ScriptMgr::LoadDatabase ( )
private

Definition at line 1415 of file ScriptMgr.cpp.

References sScriptSystemMgr.

Referenced by Initialize().

◆ ModifyMeleeDamage()

void ScriptMgr::ModifyMeleeDamage ( Unit *  target,
Unit *  attacker,
uint32 &  damage 
)

Definition at line 2299 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ ModifyPeriodicDamageAurasTick()

void ScriptMgr::ModifyPeriodicDamageAurasTick ( Unit *  target,
Unit *  attacker,
uint32 &  damage 
)

Definition at line 2294 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ ModifySpellDamageTaken()

void ScriptMgr::ModifySpellDamageTaken ( Unit *  target,
Unit *  attacker,
int32 &  damage,
SpellInfo const *  spellInfo 
)

Definition at line 2304 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ NotifyScriptIDUpdate()

void ScriptMgr::NotifyScriptIDUpdate ( )

Inform the ScriptMgr that an entity has a changed script id.

Definition at line 1357 of file ScriptMgr.cpp.

References _scriptIdUpdated.

◆ OnAccountLogin()

void ScriptMgr::OnAccountLogin ( uint32  accountId)

Definition at line 2165 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnAchievementCompleted()

void ScriptMgr::OnAchievementCompleted ( Player *  player,
AchievementEntry const *  achievement 
)

Definition at line 1976 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, AchievementEntry::ID, and sAchievementMgr.

◆ OnAddCreaturePassenger()

void ScriptMgr::OnAddCreaturePassenger ( Transport *  transport,
Creature *  creature 
)

Definition at line 1933 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and GameObject::GetScriptId().

◆ OnAddPassenger() [1/2]

void ScriptMgr::OnAddPassenger ( Transport *  transport,
Player *  player 
)

Definition at line 1924 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and GameObject::GetScriptId().

◆ OnAddPassenger() [2/2]

void ScriptMgr::OnAddPassenger ( Vehicle *  veh,
Unit *  passenger,
int8  seatId 
)

◆ OnAreaTrigger()

bool ScriptMgr::OnAreaTrigger ( Player *  player,
AreaTriggerEntry const *  trigger,
bool  entered 
)

Definition at line 1756 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, AreaTriggerEntry::ID, and sObjectMgr.

◆ OnAuctionAdd()

void ScriptMgr::OnAuctionAdd ( AuctionHouseObject *  ah,
AuctionPosting *  auction 
)

Definition at line 1819 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnAuctionExpire()

void ScriptMgr::OnAuctionExpire ( AuctionHouseObject *  ah,
AuctionPosting *  auction 
)

Definition at line 1843 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnAuctionRemove()

void ScriptMgr::OnAuctionRemove ( AuctionHouseObject *  ah,
AuctionPosting *  auction 
)

Definition at line 1827 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnAuctionSuccessful()

void ScriptMgr::OnAuctionSuccessful ( AuctionHouseObject *  ah,
AuctionPosting *  auction 
)

Definition at line 1835 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnBaseGainCalculation()

void ScriptMgr::OnBaseGainCalculation ( uint32 &  gain,
uint8  playerLevel,
uint8  mobLevel 
)

Definition at line 1563 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnCastItemCombatSpell()

bool ScriptMgr::OnCastItemCombatSpell ( Player *  player,
Unit *  victim,
SpellInfo const *  spellInfo,
Item *  item 
)

Definition at line 1706 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Item::GetScriptId().

◆ OnColorCodeCalculation()

void ScriptMgr::OnColorCodeCalculation ( XPColorChar &  color,
uint8  playerLevel,
uint8  mobLevel 
)

Definition at line 1553 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnConditionCheck()

bool ScriptMgr::OnConditionCheck ( Condition const *  condition,
ConditionSourceInfo &  sourceInfo 
)

Definition at line 1851 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Condition::ScriptId.

◆ OnConfigLoad()

void ScriptMgr::OnConfigLoad ( bool  reload)

Definition at line 1518 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnCreateMap()

void ScriptMgr::OnCreateMap ( Map *  map)

Definition at line 1613 of file ScriptMgr.cpp.

References ASSERT, and ForEachMapScript().

◆ OnCreatureKill()

void ScriptMgr::OnCreatureKill ( Player *  killer,
Creature *  killed 
)

Definition at line 2000 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnCriteriaCheck()

bool ScriptMgr::OnCriteriaCheck ( uint32  scriptId,
Player *  source,
Unit *  target 
)

Definition at line 1985 of file ScriptMgr.cpp.

References ASSERT, and GET_SCRIPT_RET.

◆ OnDamage()

void ScriptMgr::OnDamage ( Unit *  attacker,
Unit *  victim,
uint32 &  damage 
)

Definition at line 2289 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnDestroyMap()

void ScriptMgr::OnDestroyMap ( Map *  map)

Definition at line 1620 of file ScriptMgr.cpp.

References ASSERT, and ForEachMapScript().

◆ OnDynamicObjectUpdate()

void ScriptMgr::OnDynamicObjectUpdate ( DynamicObject *  dynobj,
uint32  diff 
)

Definition at line 1916 of file ScriptMgr.cpp.

References ASSERT, and FOR_SCRIPTS.

◆ OnEmailChange()

void ScriptMgr::OnEmailChange ( uint32  accountId)

Definition at line 2175 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnEventTrigger()

void ScriptMgr::OnEventTrigger ( WorldObject *  object,
WorldObject *  invoker,
uint32  eventId 
)

Definition at line 2384 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and sObjectMgr.

◆ OnFailedAccountLogin()

void ScriptMgr::OnFailedAccountLogin ( uint32  accountId)

Definition at line 2170 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnFailedEmailChange()

void ScriptMgr::OnFailedEmailChange ( uint32  accountId)

Definition at line 2180 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnFailedPasswordChange()

void ScriptMgr::OnFailedPasswordChange ( uint32  accountId)

Definition at line 2190 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGainCalculation()

void ScriptMgr::OnGainCalculation ( uint32 &  gain,
Player *  player,
Unit *  unit 
)

Definition at line 1568 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGivePlayerXP()

void ScriptMgr::OnGivePlayerXP ( Player *  player,
uint32 &  amount,
Unit *  victim 
)

Definition at line 2035 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGrayLevelCalculation()

void ScriptMgr::OnGrayLevelCalculation ( uint8 &  grayLevel,
uint8  playerLevel 
)

Definition at line 1548 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGroupAddMember()

void ScriptMgr::OnGroupAddMember ( Group *  group,
ObjectGuid  guid 
)

Definition at line 2253 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGroupChangeLeader()

void ScriptMgr::OnGroupChangeLeader ( Group *  group,
ObjectGuid  newLeaderGuid,
ObjectGuid  oldLeaderGuid 
)

Definition at line 2271 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGroupDisband()

void ScriptMgr::OnGroupDisband ( Group *  group)

Definition at line 2277 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGroupInviteMember()

void ScriptMgr::OnGroupInviteMember ( Group *  group,
ObjectGuid  guid 
)

Definition at line 2259 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGroupRateCalculation()

void ScriptMgr::OnGroupRateCalculation ( float &  rate,
uint32  count,
bool  isRaid 
)

Definition at line 1576 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGroupRemoveMember()

void ScriptMgr::OnGroupRemoveMember ( Group *  group,
ObjectGuid  guid,
RemoveMethod  method,
ObjectGuid  kicker,
char const *  reason 
)

Definition at line 2265 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnGuildAddMember()

void ScriptMgr::OnGuildAddMember ( Guild *  guild,
Player *  player,
uint8  plRank 
)

Definition at line 2196 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildBankEvent()

void ScriptMgr::OnGuildBankEvent ( Guild *  guild,
uint8  eventType,
uint8  tabId,
ObjectGuid::LowType  playerGuid,
uint64  itemOrMoney,
uint16  itemStackCount,
uint8  destTabId 
)

Definition at line 2247 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildCreate()

void ScriptMgr::OnGuildCreate ( Guild *  guild,
Player *  leader,
const std::string &  name 
)

Definition at line 2216 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildDisband()

void ScriptMgr::OnGuildDisband ( Guild *  guild)

Definition at line 2221 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildEvent()

void ScriptMgr::OnGuildEvent ( Guild *  guild,
uint8  eventType,
ObjectGuid::LowType  playerGuid1,
ObjectGuid::LowType  playerGuid2,
uint8  newRank 
)

Definition at line 2242 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildInfoChanged()

void ScriptMgr::OnGuildInfoChanged ( Guild *  guild,
const std::string &  newInfo 
)

Definition at line 2211 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildItemMove()

void ScriptMgr::OnGuildItemMove ( Guild *  guild,
Player *  player,
Item *  pItem,
bool  isSrcBank,
uint8  srcContainer,
uint8  srcSlotId,
bool  isDestBank,
uint8  destContainer,
uint8  destSlotId 
)

Definition at line 2236 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildMemberDepositMoney()

void ScriptMgr::OnGuildMemberDepositMoney ( Guild *  guild,
Player *  player,
uint64 &  amount 
)

Definition at line 2231 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildMemberWitdrawMoney()

void ScriptMgr::OnGuildMemberWitdrawMoney ( Guild *  guild,
Player *  player,
uint64 &  amount,
bool  isRepair 
)

Definition at line 2226 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildMOTDChanged()

void ScriptMgr::OnGuildMOTDChanged ( Guild *  guild,
const std::string &  newMotd 
)

Definition at line 2206 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnGuildRemoveMember()

void ScriptMgr::OnGuildRemoveMember ( Guild *  guild,
ObjectGuid  guid,
bool  isDisbanding,
bool  isKicked 
)

Definition at line 2201 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnHeal()

void ScriptMgr::OnHeal ( Unit *  healer,
Unit *  reciever,
uint32 &  gain 
)

Definition at line 2284 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnHonorCalculation()

void ScriptMgr::OnHonorCalculation ( float &  honor,
uint8  level,
float  multiplier 
)

Definition at line 1543 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnInstall()

void ScriptMgr::OnInstall ( Vehicle *  veh)

◆ OnInstallAccessory()

void ScriptMgr::OnInstallAccessory ( Vehicle *  veh,
Creature *  accessory 
)

◆ OnItemExpire()

bool ScriptMgr::OnItemExpire ( Player *  player,
ItemTemplate const *  proto 
)

Definition at line 1688 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and ItemTemplate::ScriptId.

◆ OnItemRemove()

bool ScriptMgr::OnItemRemove ( Player *  player,
Item *  item 
)

Definition at line 1697 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Item::GetScriptId().

◆ OnItemUse()

bool ScriptMgr::OnItemUse ( Player *  player,
Item *  item,
SpellCastTargets const &  targets,
ObjectGuid  castId 
)

Definition at line 1679 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, and Item::GetScriptId().

◆ OnMapUpdate()

void ScriptMgr::OnMapUpdate ( Map *  map,
uint32  diff 
)

Definition at line 1645 of file ScriptMgr.cpp.

References ASSERT, and ForEachMapScript().

◆ OnMotdChange()

void ScriptMgr::OnMotdChange ( std::string &  newMotd)

Definition at line 1523 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnMovieComplete()

void ScriptMgr::OnMovieComplete ( Player *  player,
uint32  movieId 
)

Definition at line 2150 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnNetworkStart()

void ScriptMgr::OnNetworkStart ( )

Definition at line 1469 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnNetworkStop()

void ScriptMgr::OnNetworkStop ( )

Definition at line 1474 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnOpenStateChange()

void ScriptMgr::OnOpenStateChange ( bool  open)

Definition at line 1513 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPacketReceive()

void ScriptMgr::OnPacketReceive ( WorldSession *  session,
WorldPacket const &  packet 
)

Definition at line 1493 of file ScriptMgr.cpp.

References FOREACH_SCRIPT, and SCR_REG_LST.

◆ OnPacketSend()

void ScriptMgr::OnPacketSend ( WorldSession *  session,
WorldPacket const &  packet 
)

Definition at line 1502 of file ScriptMgr.cpp.

References ASSERT, FOREACH_SCRIPT, and SCR_REG_LST.

◆ OnPasswordChange()

void ScriptMgr::OnPasswordChange ( uint32  accountId)

Definition at line 2185 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerBindToInstance()

void ScriptMgr::OnPlayerBindToInstance ( Player *  player,
Difficulty  difficulty,
uint32  mapid,
bool  permanent,
uint8  extendState 
)

Definition at line 2130 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChat() [1/5]

void ScriptMgr::OnPlayerChat ( Player *  player,
uint32  type,
uint32  lang,
std::string &  msg 
)

Definition at line 2060 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChat() [2/5]

void ScriptMgr::OnPlayerChat ( Player *  player,
uint32  type,
uint32  lang,
std::string &  msg,
Channel *  channel 
)

Definition at line 2080 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChat() [3/5]

void ScriptMgr::OnPlayerChat ( Player *  player,
uint32  type,
uint32  lang,
std::string &  msg,
Group *  group 
)

Definition at line 2070 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChat() [4/5]

void ScriptMgr::OnPlayerChat ( Player *  player,
uint32  type,
uint32  lang,
std::string &  msg,
Guild *  guild 
)

Definition at line 2075 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChat() [5/5]

void ScriptMgr::OnPlayerChat ( Player *  player,
uint32  type,
uint32  lang,
std::string &  msg,
Player *  receiver 
)

Definition at line 2065 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerChoiceResponse()

void ScriptMgr::OnPlayerChoiceResponse ( WorldObject *  object,
Player *  player,
PlayerChoice const *  choice,
PlayerChoiceResponse const *  response,
uint16  clientIdentifier 
)

Definition at line 2155 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and PlayerChoice::ScriptId.

◆ OnPlayerClearEmote()

void ScriptMgr::OnPlayerClearEmote ( Player *  player)

Definition at line 2085 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerCreate()

void ScriptMgr::OnPlayerCreate ( Player *  player)

Definition at line 2110 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerDelete()

void ScriptMgr::OnPlayerDelete ( ObjectGuid  guid,
uint32  accountId 
)

Definition at line 2115 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerDuelEnd()

void ScriptMgr::OnPlayerDuelEnd ( Player *  winner,
Player *  loser,
DuelCompleteType  type 
)

Definition at line 2055 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerDuelRequest()

void ScriptMgr::OnPlayerDuelRequest ( Player *  target,
Player *  challenger 
)

Definition at line 2045 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerDuelStart()

void ScriptMgr::OnPlayerDuelStart ( Player *  player1,
Player *  player2 
)

Definition at line 2050 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerEnterMap()

void ScriptMgr::OnPlayerEnterMap ( Map *  map,
Player *  player 
)

Definition at line 1627 of file ScriptMgr.cpp.

References ASSERT, FOREACH_SCRIPT, and ForEachMapScript().

◆ OnPlayerFailedDelete()

void ScriptMgr::OnPlayerFailedDelete ( ObjectGuid  guid,
uint32  accountId 
)

Definition at line 2120 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerFreeTalentPointsChanged()

void ScriptMgr::OnPlayerFreeTalentPointsChanged ( Player *  player,
uint32  newPoints 
)

Definition at line 2015 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerKilledByCreature()

void ScriptMgr::OnPlayerKilledByCreature ( Creature *  killer,
Player *  killed 
)

Definition at line 2005 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerLeaveMap()

void ScriptMgr::OnPlayerLeaveMap ( Map *  map,
Player *  player 
)

Definition at line 1637 of file ScriptMgr.cpp.

References ASSERT, and ForEachMapScript().

◆ OnPlayerLevelChanged()

void ScriptMgr::OnPlayerLevelChanged ( Player *  player,
uint8  oldLevel 
)

Definition at line 2010 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerLogin()

void ScriptMgr::OnPlayerLogin ( Player *  player,
bool  firstLogin 
)

Definition at line 2100 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerLogout()

void ScriptMgr::OnPlayerLogout ( Player *  player)

Definition at line 2105 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerMoneyChanged()

void ScriptMgr::OnPlayerMoneyChanged ( Player *  player,
int64 &  amount 
)

Definition at line 2025 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerMoneyLimit()

void ScriptMgr::OnPlayerMoneyLimit ( Player *  player,
int64  amount 
)

Definition at line 2030 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerRepop()

void ScriptMgr::OnPlayerRepop ( Player *  player)

Definition at line 2145 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerReputationChange()

void ScriptMgr::OnPlayerReputationChange ( Player *  player,
uint32  factionID,
int32 &  standing,
bool  incremental 
)

Definition at line 2040 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerSave()

void ScriptMgr::OnPlayerSave ( Player *  player)

Definition at line 2125 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerSpellCast()

void ScriptMgr::OnPlayerSpellCast ( Player *  player,
Spell *  spell,
bool  skipCheck 
)

Definition at line 2095 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerTalentsReset()

void ScriptMgr::OnPlayerTalentsReset ( Player *  player,
bool  involuntarily 
)

Definition at line 2020 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerTextEmote()

void ScriptMgr::OnPlayerTextEmote ( Player *  player,
uint32  textEmote,
uint32  emoteNum,
ObjectGuid  guid 
)

Definition at line 2090 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPlayerUpdateZone()

void ScriptMgr::OnPlayerUpdateZone ( Player *  player,
uint32  newZone,
uint32  newArea 
)

Definition at line 2135 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnPVPKill()

void ScriptMgr::OnPVPKill ( Player *  killer,
Player *  killed 
)

Definition at line 1995 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnQuestAccept()

bool ScriptMgr::OnQuestAccept ( Player *  player,
Item *  item,
Quest const *  quest 
)

Definition at line 1668 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT_RET, Item::GetScriptId(), and Player::PlayerTalkClass.

◆ OnQuestAcknowledgeAutoAccept()

void ScriptMgr::OnQuestAcknowledgeAutoAccept ( Player *  player,
Quest const *  quest 
)

Definition at line 2356 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and Quest::GetScriptId().

◆ OnQuestObjectiveChange()

void ScriptMgr::OnQuestObjectiveChange ( Player *  player,
Quest const *  quest,
QuestObjective const &  objective,
int32  oldAmount,
int32  newAmount 
)

Definition at line 2365 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and Quest::GetScriptId().

◆ OnQuestStatusChange() [1/2]

void ScriptMgr::OnQuestStatusChange ( Player *  player,
Quest const *  quest,
QuestStatus  oldStatus,
QuestStatus  newStatus 
)

Definition at line 2347 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and Quest::GetScriptId().

◆ OnQuestStatusChange() [2/2]

void ScriptMgr::OnQuestStatusChange ( Player *  player,
uint32  questId 
)

Definition at line 2140 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnRelocate()

void ScriptMgr::OnRelocate ( Transport *  transport,
uint32  mapId,
float  x,
float  y,
float  z 
)

Definition at line 1959 of file ScriptMgr.cpp.

References GET_SCRIPT, and GameObject::GetScriptId().

◆ OnRemovePassenger() [1/2]

void ScriptMgr::OnRemovePassenger ( Transport *  transport,
Player *  player 
)

Definition at line 1942 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and GameObject::GetScriptId().

◆ OnRemovePassenger() [2/2]

void ScriptMgr::OnRemovePassenger ( Vehicle *  veh,
Unit *  passenger 
)

◆ OnReset()

void ScriptMgr::OnReset ( Vehicle *  veh)

◆ OnSceneCancel()

void ScriptMgr::OnSceneCancel ( Player *  player,
uint32  sceneInstanceID,
SceneTemplate const *  sceneTemplate 
)

Definition at line 2328 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and SceneTemplate::ScriptId.

◆ OnSceneComplete()

void ScriptMgr::OnSceneComplete ( Player *  player,
uint32  sceneInstanceID,
SceneTemplate const *  sceneTemplate 
)

Definition at line 2337 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and SceneTemplate::ScriptId.

◆ OnSceneStart()

void ScriptMgr::OnSceneStart ( Player *  player,
uint32  sceneInstanceID,
SceneTemplate const *  sceneTemplate 
)

Definition at line 2310 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and SceneTemplate::ScriptId.

◆ OnSceneTrigger()

void ScriptMgr::OnSceneTrigger ( Player *  player,
uint32  sceneInstanceID,
SceneTemplate const *  sceneTemplate,
std::string const &  triggerName 
)

Definition at line 2319 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and SceneTemplate::ScriptId.

◆ OnShutdown()

void ScriptMgr::OnShutdown ( )

Definition at line 1970 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnShutdownCancel()

void ScriptMgr::OnShutdownCancel ( )

Definition at line 1533 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnShutdownInitiate()

void ScriptMgr::OnShutdownInitiate ( ShutdownExitCode  code,
ShutdownMask  mask 
)

Definition at line 1528 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnSocketClose()

void ScriptMgr::OnSocketClose ( std::shared_ptr< WorldSocket > const &  socket)

Definition at line 1486 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnSocketOpen()

void ScriptMgr::OnSocketOpen ( std::shared_ptr< WorldSocket > const &  socket)

Definition at line 1479 of file ScriptMgr.cpp.

References ASSERT, and FOREACH_SCRIPT.

◆ OnStartup()

void ScriptMgr::OnStartup ( )

Definition at line 1965 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnTransportUpdate()

void ScriptMgr::OnTransportUpdate ( Transport *  transport,
uint32  diff 
)

Definition at line 1951 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and GameObject::GetScriptId().

◆ OnUninstall()

void ScriptMgr::OnUninstall ( Vehicle *  veh)

◆ OnWeatherChange()

void ScriptMgr::OnWeatherChange ( Weather *  weather,
WeatherState  state,
float  grade 
)

Definition at line 1803 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and Weather::GetScriptId().

◆ OnWeatherUpdate()

void ScriptMgr::OnWeatherUpdate ( Weather *  weather,
uint32  diff 
)

Definition at line 1811 of file ScriptMgr.cpp.

References ASSERT, GET_SCRIPT, and Weather::GetScriptId().

◆ OnWorldStateValueChange()

void ScriptMgr::OnWorldStateValueChange ( WorldStateTemplate const *  worldStateTemplate,
int32  oldValue,
int32  newValue,
Map const *  map 
)

◆ OnWorldUpdate()

void ScriptMgr::OnWorldUpdate ( uint32  diff)

Definition at line 1538 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ OnZeroDifferenceCalculation()

void ScriptMgr::OnZeroDifferenceCalculation ( uint8 &  diff,
uint8  playerLevel 
)

Definition at line 1558 of file ScriptMgr.cpp.

References FOREACH_SCRIPT.

◆ operator=() [1/2]

ScriptMgr & ScriptMgr::operator= ( ScriptMgr &&  right)
privatedelete

◆ operator=() [2/2]

ScriptMgr & ScriptMgr::operator= ( ScriptMgr const &  right)
privatedelete

◆ ReleaseScriptContext()

void ScriptMgr::ReleaseScriptContext ( std::string const &  context)

Releases all scripts associated with the given script context immediately. Requires a SwapScriptContext() call afterwards to finish the unloading.

Definition at line 1388 of file ScriptMgr.cpp.

References sScriptRegistryCompositum.

◆ SetScriptContext()

void ScriptMgr::SetScriptContext ( std::string const &  context)

Set the current script context, which allows the ScriptMgr to accept new scripts in this context. Requires a SwapScriptContext() call afterwards to load the new scripts.

Definition at line 1371 of file ScriptMgr.cpp.

References _currentContext.

Referenced by Initialize().

◆ SetScriptLoader()

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)

Definition at line 1044 of file ScriptMgr.h.

◆ SwapScriptContext()

void ScriptMgr::SwapScriptContext ( bool  initialize = false)

Executes all changed introduced by SetScriptContext and ReleaseScriptContext. It is possible to combine multiple SetScriptContext and ReleaseScriptContext calls for better performance (bulk changes).

Definition at line 1376 of file ScriptMgr.cpp.

References _currentContext, and sScriptRegistryCompositum.

◆ SyncScripts()

void ScriptMgr::SyncScripts ( )

Synchronize all scripts with their current ids.

Definition at line 1362 of file ScriptMgr.cpp.

References _scriptIdUpdated, and sScriptRegistryCompositum.

◆ Unload()

void ScriptMgr::Unload ( )

Definition at line 1408 of file ScriptMgr.cpp.

References UnitAI::AISpellInfo, and sScriptRegistryCompositum.

Friends And Related Symbol Documentation

◆ ScriptObject

friend class ScriptObject
friend

Definition at line 1016 of file ScriptMgr.h.

Member Data Documentation

◆ _currentContext

std::string ScriptMgr::_currentContext
private

Definition at line 1327 of file ScriptMgr.h.

Referenced by SetScriptContext(), and SwapScriptContext().

◆ _script_loader_callback

ScriptLoaderCallbackType ScriptMgr::_script_loader_callback
private

Definition at line 1325 of file ScriptMgr.h.

Referenced by Initialize().

◆ _scriptCount

uint32 ScriptMgr::_scriptCount
private

Definition at line 1322 of file ScriptMgr.h.

◆ _scriptIdUpdated

bool ScriptMgr::_scriptIdUpdated
private

Definition at line 1323 of file ScriptMgr.h.

Referenced by NotifyScriptIDUpdate(), and SyncScripts().


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