AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ScriptMgr Class Reference

#include "ScriptMgr.h"

Public Types

typedef void(* ScriptLoaderCallbackType) ()
 
typedef void(* ModulesLoaderCallbackType) ()
 

Public Member Functions

void Initialize ()
 
void LoadDatabase ()
 
void FillSpellSummary ()
 
void CheckIfScriptsInDatabaseExist ()
 
std::string_view ScriptsVersion () const
 
void IncreaseScriptCount ()
 
void DecreaseScriptCount ()
 
uint32 GetScriptCount () const
 
void SetScriptLoader (ScriptLoaderCallbackType script_loader_callback)
 
void SetModulesLoader (ModulesLoaderCallbackType 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)
 
bool CanPacketReceive (WorldSession *session, WorldPacket const &packet)
 
bool CanPacketSend (WorldSession *session, WorldPacket const &packet)
 
void OnLoadCustomDatabaseTable ()
 
void OnOpenStateChange (bool open)
 
void OnBeforeConfigLoad (bool reload)
 
void OnAfterConfigLoad (bool reload)
 
void OnBeforeFinalizePlayerWorldSession (uint32 &cacheVersion)
 
void OnMotdChange (std::string &newMotd)
 
void OnShutdownInitiate (ShutdownExitCode code, ShutdownMask mask)
 
void OnShutdownCancel ()
 
void OnWorldUpdate (uint32 diff)
 
void OnStartup ()
 
void OnShutdown ()
 
void OnBeforeWorldInitialized ()
 
void OnAfterUnloadAllMaps ()
 
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, ContentLevels content)
 
void OnGainCalculation (uint32 &gain, Player *player, Unit *unit)
 
void OnGroupRateCalculation (float &rate, uint32 count, bool isRaid)
 
void OnAfterArenaRatingCalculation (Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange, int32 &winnerChange, int32 &loserChange)
 
void OnBeforeUpdatingPersonalRating (int32 &mod, uint32 type)
 
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)
 
InstanceScriptCreateInstanceScript (InstanceMap *map)
 
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 OnCastItemCombatSpell (Player *player, Unit *victim, SpellInfo const *spellInfo, Item *item)
 
void OnGossipSelect (Player *player, Item *item, uint32 sender, uint32 action)
 
void OnGossipSelectCode (Player *player, Item *item, uint32 sender, uint32 action, const char *code)
 
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 OnQuestComplete (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)
 
void OnCreatureAddWorld (Creature *creature)
 
void OnCreatureRemoveWorld (Creature *creature)
 
void OnFfaPvpStateUpdate (Creature *creature, bool InPvp)
 
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 OnGameObjectModifyHealth (GameObject *go, Unit *attackerOrHealer, int32 &change, SpellInfo const *spellInfo)
 
void OnGameObjectLootStateChanged (GameObject *go, uint32 state, Unit *unit)
 
void OnGameObjectStateChanged (GameObject *go, uint32 state)
 
void OnGameObjectUpdate (GameObject *go, uint32 diff)
 
GameObjectAIGetGameObjectAI (GameObject *go)
 
void OnGameObjectAddWorld (GameObject *go)
 
void OnGameObjectRemoveWorld (GameObject *go)
 
bool OnAreaTrigger (Player *player, AreaTrigger const *trigger)
 
BattlegroundCreateBattleground (BattlegroundTypeId typeId)
 
OutdoorPvPCreateOutdoorPvP (OutdoorPvPData const *data)
 
std::vector< Acore::ChatCommands::ChatCommandBuilderGetChatCommands ()
 
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)
 
void OnBeforeAuctionHouseMgrSendAuctionWonMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *bidder, uint32 &bidder_accId, bool &sendNotification, bool &updateAchievementCriteria, bool &sendMail)
 
void OnBeforeAuctionHouseMgrSendAuctionSalePendingMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *owner, uint32 &owner_accId, bool &sendMail)
 
void OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *owner, uint32 &owner_accId, uint32 &profit, bool &sendNotification, bool &updateAchievementCriteria, bool &sendMail)
 
void OnBeforeAuctionHouseMgrSendAuctionExpiredMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *owner, uint32 &owner_accId, bool &sendNotification, bool &sendMail)
 
void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *oldBidder, uint32 &oldBidder_accId, Player *newBidder, uint32 &newPrice, bool &sendNotification, bool &sendMail)
 
void OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail (AuctionHouseMgr *auctionHouseMgr, AuctionEntry *auction, Player *bidder, uint32 &bidder_accId, bool &sendMail)
 
void OnBeforeAuctionHouseMgrUpdate ()
 
bool OnConditionCheck (Condition *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, uint32 criteria_id)
 
void OnBeforePlayerUpdate (Player *player, uint32 p_time)
 
void OnPlayerUpdate (Player *player, uint32 p_time)
 
void OnSendInitialPacketsBeforeAddToMap (Player *player, WorldPacket &data)
 
void OnPlayerJustDied (Player *player)
 
void OnCalculateTalentsPoints (Player const *player, uint32 &talentPointsForLevel)
 
void OnPlayerReleasedGhost (Player *player)
 
void OnPVPKill (Player *killer, Player *killed)
 
void OnPlayerPVPFlagChange (Player *player, bool state)
 
void OnCreatureKill (Player *killer, Creature *killed)
 
void OnCreatureKilledByPet (Player *petOwner, 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 OnAfterSpecSlotChanged (Player *player, uint8 newSlot)
 
void OnPlayerMoneyChanged (Player *player, int32 &amount)
 
void OnBeforeLootMoney (Player *player, Loot *loot)
 
void OnGivePlayerXP (Player *player, uint32 &amount, Unit *victim, uint8 xpSource)
 
bool OnPlayerReputationChange (Player *player, uint32 factionID, int32 &standing, bool incremental)
 
void OnPlayerReputationRankChange (Player *player, uint32 factionID, ReputationRank newRank, ReputationRank oldRank, bool increased)
 
void OnPlayerLearnSpell (Player *player, uint32 spellID)
 
void OnPlayerForgotSpell (Player *player, uint32 spellID)
 
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 OnBeforeSendChatMessage (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 OnPlayerEmote (Player *player, uint32 emote)
 
void OnPlayerTextEmote (Player *player, uint32 textEmote, uint32 emoteNum, ObjectGuid guid)
 
void OnPlayerSpellCast (Player *player, Spell *spell, bool skipCheck)
 
void OnPlayerLogin (Player *player)
 
void OnPlayerLoadFromDB (Player *player)
 
void OnBeforePlayerLogout (Player *player)
 
void OnPlayerLogout (Player *player)
 
void OnPlayerCreate (Player *player)
 
void OnPlayerSave (Player *player)
 
void OnPlayerDelete (ObjectGuid guid, uint32 accountId)
 
void OnPlayerFailedDelete (ObjectGuid guid, uint32 accountId)
 
void OnPlayerBindToInstance (Player *player, Difficulty difficulty, uint32 mapid, bool permanent)
 
void OnPlayerUpdateZone (Player *player, uint32 newZone, uint32 newArea)
 
void OnPlayerUpdateArea (Player *player, uint32 oldArea, uint32 newArea)
 
bool OnBeforePlayerTeleport (Player *player, uint32 mapid, float x, float y, float z, float orientation, uint32 options, Unit *target)
 
void OnPlayerUpdateFaction (Player *player)
 
void OnPlayerAddToBattleground (Player *player, Battleground *bg)
 
void OnPlayerQueueRandomDungeon (Player *player, uint32 &rDungeonId)
 
void OnPlayerRemoveFromBattleground (Player *player, Battleground *bg)
 
void OnAchievementComplete (Player *player, AchievementEntry const *achievement)
 
bool OnBeforeAchievementComplete (Player *player, AchievementEntry const *achievement)
 
void OnCriteriaProgress (Player *player, AchievementCriteriaEntry const *criteria)
 
bool OnBeforeCriteriaProgress (Player *player, AchievementCriteriaEntry const *criteria)
 
void OnAchievementSave (CharacterDatabaseTransaction trans, Player *player, uint16 achiId, CompletedAchievementData achiData)
 
void OnCriteriaSave (CharacterDatabaseTransaction trans, Player *player, uint16 critId, CriteriaProgress criteriaData)
 
void OnGossipSelect (Player *player, uint32 menu_id, uint32 sender, uint32 action)
 
void OnGossipSelectCode (Player *player, uint32 menu_id, uint32 sender, uint32 action, const char *code)
 
void OnPlayerBeingCharmed (Player *player, Unit *charmer, uint32 oldFactionId, uint32 newFactionId)
 
void OnAfterPlayerSetVisibleItemSlot (Player *player, uint8 slot, Item *item)
 
void OnAfterPlayerMoveItemFromInventory (Player *player, Item *it, uint8 bag, uint8 slot, bool update)
 
void OnEquip (Player *player, Item *it, uint8 bag, uint8 slot, bool update)
 
void OnPlayerJoinBG (Player *player)
 
void OnPlayerJoinArena (Player *player)
 
void OnGetMaxPersonalArenaRatingRequirement (Player const *player, uint32 minSlot, uint32 &maxArenaRating) const
 
void OnLootItem (Player *player, Item *item, uint32 count, ObjectGuid lootguid)
 
void OnBeforeFillQuestLootItem (Player *player, LootItem &item)
 
void OnStoreNewItem (Player *player, Item *item, uint32 count)
 
void OnCreateItem (Player *player, Item *item, uint32 count)
 
void OnQuestRewardItem (Player *player, Item *item, uint32 count)
 
bool CanPlaceAuctionBid (Player *player, AuctionEntry *auction)
 
void OnGroupRollRewardItem (Player *player, Item *item, uint32 count, RollVote voteType, Roll *roll)
 
bool OnBeforeOpenItem (Player *player, Item *item)
 
bool OnBeforePlayerQuestComplete (Player *player, uint32 quest_id)
 
void OnQuestComputeXP (Player *player, Quest const *quest, uint32 &xpValue)
 
void OnBeforePlayerDurabilityRepair (Player *player, ObjectGuid npcGUID, ObjectGuid itemGUID, float &discountMod, uint8 guildBank)
 
void OnBeforeBuyItemFromVendor (Player *player, ObjectGuid vendorguid, uint32 vendorslot, uint32 &item, uint8 count, uint8 bag, uint8 slot)
 
void OnBeforeStoreOrEquipNewItem (Player *player, uint32 vendorslot, uint32 &item, uint8 count, uint8 bag, uint8 slot, ItemTemplate const *pProto, Creature *pVendor, VendorItem const *crItem, bool bStore)
 
void OnAfterStoreOrEquipNewItem (Player *player, uint32 vendorslot, Item *item, uint8 count, uint8 bag, uint8 slot, ItemTemplate const *pProto, Creature *pVendor, VendorItem const *crItem, bool bStore)
 
void OnAfterUpdateMaxPower (Player *player, Powers &power, float &value)
 
void OnAfterUpdateMaxHealth (Player *player, float &value)
 
void OnBeforeUpdateAttackPowerAndDamage (Player *player, float &level, float &val2, bool ranged)
 
void OnAfterUpdateAttackPowerAndDamage (Player *player, float &level, float &base_attPower, float &attPowerMod, float &attPowerMultiplier, bool ranged)
 
void OnBeforeInitTalentForLevel (Player *player, uint8 &level, uint32 &talentPointsForLevel)
 
void OnFirstLogin (Player *player)
 
void OnSetMaxLevel (Player *player, uint32 &maxPlayerLevel)
 
void OnPlayerCompleteQuest (Player *player, Quest const *quest)
 
void OnBattlegroundDesertion (Player *player, BattlegroundDesertionType const desertionType)
 
bool CanJoinInBattlegroundQueue (Player *player, ObjectGuid BattlemasterGuid, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, GroupJoinBattlegroundResult &err)
 
bool ShouldBeRewardedWithMoneyInsteadOfExp (Player *player)
 
void OnBeforeTempSummonInitStats (Player *player, TempSummon *tempSummon, uint32 &duration)
 
void OnBeforeGuardianInitStatsForLevel (Player *player, Guardian *guardian, CreatureTemplate const *cinfo, PetType &petType)
 
void OnAfterGuardianInitStatsForLevel (Player *player, Guardian *guardian)
 
void OnBeforeLoadPetFromDB (Player *player, uint32 &petentry, uint32 &petnumber, bool &current, bool &forceLoadFromDB)
 
bool CanJoinInArenaQueue (Player *player, ObjectGuid BattlemasterGuid, uint8 arenaslot, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, uint8 IsRated, GroupJoinBattlegroundResult &err)
 
bool CanBattleFieldPort (Player *player, uint8 arenaType, BattlegroundTypeId BGTypeID, uint8 action)
 
bool CanGroupInvite (Player *player, std::string &membername)
 
bool CanGroupAccept (Player *player, Group *group)
 
bool CanSellItem (Player *player, Item *item, Creature *creature)
 
bool CanSendMail (Player *player, ObjectGuid receiverGuid, ObjectGuid mailbox, std::string &subject, std::string &body, uint32 money, uint32 COD, Item *item)
 
void PetitionBuy (Player *player, Creature *creature, uint32 &charterid, uint32 &cost, uint32 &type)
 
void PetitionShowList (Player *player, Creature *creature, uint32 &CharterEntry, uint32 &CharterDispayID, uint32 &CharterCost)
 
void OnRewardKillRewarder (Player *player, KillRewarder *rewarder, bool isDungeon, float &rate)
 
bool CanGiveMailRewardAtGiveLevel (Player *player, uint8 level)
 
void OnDeleteFromDB (CharacterDatabaseTransaction trans, uint32 guid)
 
bool CanRepopAtGraveyard (Player *player)
 
std::optional< bool > OnPlayerIsClass (Player const *player, Classes playerClass, ClassContext context)
 
void OnGetMaxSkillValue (Player *player, uint32 skill, int32 &result, bool IsPure)
 
bool OnPlayerHasActivePowerType (Player const *player, Powers power)
 
void OnUpdateGatheringSkill (Player *player, uint32 skillId, uint32 currentLevel, uint32 gray, uint32 green, uint32 yellow, uint32 &gain)
 
void OnUpdateCraftingSkill (Player *player, SkillLineAbilityEntry const *skill, uint32 currentLevel, uint32 &gain)
 
bool OnUpdateFishingSkill (Player *player, int32 skill, int32 zone_skill, int32 chance, int32 roll)
 
bool CanAreaExploreAndOutdoor (Player *player)
 
void OnVictimRewardBefore (Player *player, Player *victim, uint32 &killer_title, uint32 &victim_title)
 
void OnVictimRewardAfter (Player *player, Player *victim, uint32 &killer_title, uint32 &victim_rank, float &honor_f)
 
void OnCustomScalingStatValueBefore (Player *player, ItemTemplate const *proto, uint8 slot, bool apply, uint32 &CustomScalingStatValue)
 
void OnCustomScalingStatValue (Player *player, ItemTemplate const *proto, uint32 &statType, int32 &val, uint8 itemProtoStatNumber, uint32 ScalingStatValue, ScalingStatValuesEntry const *ssv)
 
void OnApplyItemModsBefore (Player *player, uint8 slot, bool apply, uint8 itemProtoStatNumber, uint32 statType, int32 &val)
 
void OnApplyEnchantmentItemModsBefore (Player *player, Item *item, EnchantmentSlot slot, bool apply, uint32 enchant_spell_id, uint32 &enchant_amount)
 
bool CanArmorDamageModifier (Player *player)
 
void OnGetFeralApBonus (Player *player, int32 &feral_bonus, int32 dpsMod, ItemTemplate const *proto, ScalingStatValuesEntry const *ssv)
 
bool CanApplyWeaponDependentAuraDamageMod (Player *player, Item *item, WeaponAttackType attackType, AuraEffect const *aura, bool apply)
 
bool CanApplyEquipSpell (Player *player, SpellInfo const *spellInfo, Item *item, bool apply, bool form_change)
 
bool CanApplyEquipSpellsItemSet (Player *player, ItemSetEffect *eff)
 
bool CanCastItemCombatSpell (Player *player, Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const *proto)
 
bool CanCastItemUseSpell (Player *player, Item *item, SpellCastTargets const &targets, uint8 cast_count, uint32 glyphIndex)
 
void OnApplyAmmoBonuses (Player *player, ItemTemplate const *proto, float &currentAmmoDPS)
 
bool CanEquipItem (Player *player, uint8 slot, uint16 &dest, Item *pItem, bool swap, bool not_loading)
 
bool CanUnequipItem (Player *player, uint16 pos, bool swap)
 
bool CanUseItem (Player *player, ItemTemplate const *proto, InventoryResult &result)
 
bool CanSaveEquipNewItem (Player *player, Item *item, uint16 pos, bool update)
 
bool CanApplyEnchantment (Player *player, Item *item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition)
 
void OnGetQuestRate (Player *player, float &result)
 
bool PassedQuestKilledMonsterCredit (Player *player, Quest const *qinfo, uint32 entry, uint32 real_entry, ObjectGuid guid)
 
bool CheckItemInSlotAtLoadInventory (Player *player, Item *item, uint8 slot, uint8 &err, uint16 &dest)
 
bool NotAvoidSatisfy (Player *player, DungeonProgressionRequirements const *ar, uint32 target_map, bool report)
 
bool NotVisibleGloballyFor (Player *player, Player const *u)
 
void OnGetArenaPersonalRating (Player *player, uint8 slot, uint32 &result)
 
void OnFfaPvpStateUpdate (Player *player, bool result)
 
void OnGetArenaTeamId (Player *player, uint8 slot, uint32 &result)
 
void OnIsFFAPvP (Player *player, bool &result)
 
void OnIsPvP (Player *player, bool &result)
 
void OnGetMaxSkillValueForLevel (Player *player, uint16 &result)
 
bool NotSetArenaTeamInfoField (Player *player, uint8 slot, ArenaTeamInfoType type, uint32 value)
 
bool CanJoinLfg (Player *player, uint8 roles, lfg::LfgDungeonSet &dungeons, const std::string &comment)
 
bool CanEnterMap (Player *player, MapEntry const *entry, InstanceTemplate const *instance, MapDifficulty const *mapDiff, bool loginCheck)
 
bool CanInitTrade (Player *player, Player *target)
 
bool CanSetTradeItem (Player *player, Item *tradedItem, uint8 tradeSlot)
 
void OnSetServerSideVisibility (Player *player, ServerSideVisibilityType &type, AccountTypes &sec)
 
void OnSetServerSideVisibilityDetect (Player *player, ServerSideVisibilityType &type, AccountTypes &sec)
 
void OnPlayerResurrect (Player *player, float restore_percent, bool applySickness)
 
void OnBeforeChooseGraveyard (Player *player, TeamId teamId, bool nearCorpse, uint32 &graveyardOverride)
 
bool CanPlayerUseChat (Player *player, uint32 type, uint32 language, std::string &msg)
 
bool CanPlayerUseChat (Player *player, uint32 type, uint32 language, std::string &msg, Player *receiver)
 
bool CanPlayerUseChat (Player *player, uint32 type, uint32 language, std::string &msg, Group *group)
 
bool CanPlayerUseChat (Player *player, uint32 type, uint32 language, std::string &msg, Guild *guild)
 
bool CanPlayerUseChat (Player *player, uint32 type, uint32 language, std::string &msg, Channel *channel)
 
void OnPlayerLearnTalents (Player *player, uint32 talentId, uint32 talentRank, uint32 spellid)
 
void OnPlayerEnterCombat (Player *player, Unit *enemy)
 
void OnPlayerLeaveCombat (Player *player)
 
void OnQuestAbandon (Player *player, uint32 questId)
 
bool CanSendErrorAlreadyLooted (Player *player)
 
void OnAfterCreatureLoot (Player *player)
 
void OnAfterCreatureLootMoney (Player *player)
 
bool OnCanPlayerFlyInZone (Player *player, uint32 mapId, uint32 zoneId, SpellInfo const *bySpell)
 
void AnticheatSetCanFlybyServer (Player *player, bool apply)
 
void AnticheatSetUnderACKmount (Player *player)
 
void AnticheatSetRootACKUpd (Player *player)
 
void AnticheatUpdateMovementInfo (Player *player, MovementInfo const &movementInfo)
 
void AnticheatSetJumpingbyOpcode (Player *player, bool jump)
 
bool AnticheatHandleDoubleJump (Player *player, Unit *mover)
 
bool AnticheatCheckMovementInfo (Player *player, MovementInfo const &movementInfo, Unit *mover, bool jump)
 
void OnAccountLogin (uint32 accountId)
 
void OnBeforeAccountDelete (uint32 accountId)
 
void OnLastIpUpdate (uint32 accountId, std::string ip)
 
void OnFailedAccountLogin (uint32 accountId)
 
void OnEmailChange (uint32 accountId)
 
void OnFailedEmailChange (uint32 accountId)
 
void OnPasswordChange (uint32 accountId)
 
void OnFailedPasswordChange (uint32 accountId)
 
bool CanAccountCreateCharacter (uint32 accountId, uint8 charRace, uint8 charClass)
 
void OnGuildAddMember (Guild *guild, Player *player, uint8 &plRank)
 
void OnGuildRemoveMember (Guild *guild, Player *player, 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, uint32 &amount, bool isRepair)
 
void OnGuildMemberDepositMoney (Guild *guild, Player *player, uint32 &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, uint32 itemOrMoney, uint16 itemStackCount, uint8 destTabId)
 
bool CanGuildSendBankList (Guild const *guild, WorldSession *session, uint8 tabId, bool sendAllSlots)
 
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)
 
bool CanGroupJoinBattlegroundQueue (Group const *group, Player *member, Battleground const *bgTemplate, uint32 MinPlayerCount, bool isRated, uint32 arenaSlot)
 
void OnCreate (Group *group, Player *leader)
 
void OnGlobalItemDelFromDB (CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
 
void OnGlobalMirrorImageDisplayItem (Item const *item, uint32 &display)
 
void OnBeforeUpdateArenaPoints (ArenaTeam *at, std::map< ObjectGuid, uint32 > &ap)
 
void OnAfterRefCount (Player const *player, Loot &loot, bool canRate, uint16 lootMode, LootStoreItem *LootStoreItem, uint32 &maxcount, LootStore const &store)
 
void OnAfterCalculateLootGroupAmount (Player const *player, Loot &loot, uint16 lootMode, uint32 &groupAmount, LootStore const &store)
 
void OnBeforeDropAddItem (Player const *player, Loot &loot, bool canRate, uint16 lootMode, LootStoreItem *LootStoreItem, LootStore const &store)
 
bool OnItemRoll (Player const *player, LootStoreItem const *LootStoreItem, float &chance, Loot &loot, LootStore const &store)
 
bool OnBeforeLootEqualChanced (Player const *player, LootStoreItemList EqualChanced, Loot &loot, LootStore const &store)
 
void OnInitializeLockedDungeons (Player *player, uint8 &level, uint32 &lockData, lfg::LFGDungeonData const *dungeon)
 
void OnAfterInitializeLockedDungeons (Player *player)
 
void OnAfterUpdateEncounterState (Map *map, EncounterCreditType type, uint32 creditEntry, Unit *source, Difficulty difficulty_fixed, DungeonEncounterList const *encounters, uint32 dungeonCompleted, bool updated)
 
void OnBeforeWorldObjectSetPhaseMask (WorldObject const *worldObject, uint32 &oldPhaseMask, uint32 &newPhaseMask, bool &useCombinedPhases, bool &update)
 
bool OnIsAffectedBySpellModCheck (SpellInfo const *affectSpell, SpellInfo const *checkSpell, SpellModifier const *mod)
 
bool OnSpellHealingBonusTakenNegativeModifiers (Unit const *target, Unit const *caster, SpellInfo const *spellInfo, float &val)
 
void OnLoadSpellCustomAttr (SpellInfo *spell)
 
bool OnAllowedForPlayerLootCheck (Player const *player, ObjectGuid source)
 
bool OnAllowedToLootContainerCheck (Player const *player, ObjectGuid source)
 
void OnInstanceIdRemoved (uint32 instanceId)
 Called when an instance Id is deleted, usually because it expired or no players are bound to it anymore. More...
 
void OnBeforeSetBossState (uint32 id, EncounterState newState, EncounterState oldState, Map *instance)
 Called when any raid boss has their state updated (e.g. pull, reset, kill). More...
 
void AfterInstanceGameObjectCreate (Map *instance, GameObject *go)
 Called when a game object is created inside an instance. More...
 
uint32 IncreaseScheduledScriptsCount ()
 
uint32 DecreaseScheduledScriptCount ()
 
uint32 DecreaseScheduledScriptCount (std::size_t count)
 
bool IsScriptScheduled () const
 
void OnHeal (Unit *healer, Unit *reciever, uint32 &gain)
 
void OnDamage (Unit *attacker, Unit *victim, uint32 &damage)
 
void ModifyPeriodicDamageAurasTick (Unit *target, Unit *attacker, uint32 &damage, SpellInfo const *spellInfo)
 
void ModifyMeleeDamage (Unit *target, Unit *attacker, uint32 &damage)
 
void ModifySpellDamageTaken (Unit *target, Unit *attacker, int32 &damage, SpellInfo const *spellInfo)
 
void ModifyHealReceived (Unit *target, Unit *healer, uint32 &addHealth, SpellInfo const *spellInfo)
 
uint32 DealDamage (Unit *AttackerUnit, Unit *pVictim, uint32 damage, DamageEffectType damagetype)
 
void OnBeforeRollMeleeOutcomeAgainst (Unit const *attacker, Unit const *victim, WeaponAttackType attType, int32 &attackerMaxSkillValueForLevel, int32 &victimMaxSkillValueForLevel, int32 &attackerWeaponSkill, int32 &victimDefenseSkill, int32 &crit_chance, int32 &miss_chance, int32 &dodge_chance, int32 &parry_chance, int32 &block_chance)
 
void OnAuraApply (Unit *, Aura *)
 
void OnAuraRemove (Unit *unit, AuraApplication *aurApp, AuraRemoveMode mode)
 
bool IfNormalReaction (Unit const *unit, Unit const *target, ReputationRank &repRank)
 
bool IsNeedModSpellDamagePercent (Unit const *unit, AuraEffect *auraEff, float &doneTotalMod, SpellInfo const *spellProto)
 
bool IsNeedModMeleeDamagePercent (Unit const *unit, AuraEffect *auraEff, float &doneTotalMod, SpellInfo const *spellProto)
 
bool IsNeedModHealPercent (Unit const *unit, AuraEffect *auraEff, float &doneTotalMod, SpellInfo const *spellProto)
 
bool CanSetPhaseMask (Unit const *unit, uint32 newPhaseMask, bool update)
 
bool IsCustomBuildValuesUpdate (Unit const *unit, uint8 updateType, ByteBuffer &fieldBuffer, Player const *target, uint16 index)
 
bool ShouldTrackValuesUpdatePosByIndex (Unit const *unit, uint8 updateType, uint16 index)
 
void OnPatchValuesUpdate (Unit const *unit, ByteBuffer &valuesUpdateBuf, BuildValuesCachePosPointers &posPointers, Player *target)
 
void OnUnitUpdate (Unit *unit, uint32 diff)
 
void OnDisplayIdChange (Unit *unit, uint32 displayId)
 
void OnUnitEnterEvadeMode (Unit *unit, uint8 why)
 
void OnUnitEnterCombat (Unit *unit, Unit *victim)
 
void OnUnitDeath (Unit *unit, Unit *killer)
 
void OnPlayerMove (Player *player, MovementInfo movementInfo, uint32 opcode)
 
void OnBeforeCreatureSelectLevel (const CreatureTemplate *cinfo, Creature *creature, uint8 &level)
 
void Creature_SelectLevel (const CreatureTemplate *cinfo, Creature *creature)
 
void OnCreatureSaveToDB (Creature *creature)
 
void OnGameObjectSaveToDB (GameObject *go)
 
void OnBeforeCreateInstanceScript (InstanceMap *instanceMap, InstanceScript **instanceData, bool load, std::string data, uint32 completedEncounterMask)
 
void OnDestroyInstance (MapInstanced *mapInstanced, Map *map)
 
void OnBattlegroundStart (Battleground *bg)
 
void OnBattlegroundEndReward (Battleground *bg, Player *player, TeamId winnerTeamId)
 
void OnBattlegroundUpdate (Battleground *bg, uint32 diff)
 
void OnBattlegroundAddPlayer (Battleground *bg, Player *player)
 
void OnBattlegroundBeforeAddPlayer (Battleground *bg, Player *player)
 
void OnBattlegroundRemovePlayerAtLeave (Battleground *bg, Player *player)
 
void OnQueueUpdate (BattlegroundQueue *queue, uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating)
 
bool OnQueueUpdateValidity (BattlegroundQueue *queue, uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating)
 
void OnAddGroup (BattlegroundQueue *queue, GroupQueueInfo *ginfo, uint32 &index, Player *leader, Group *group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const *bracketEntry, uint8 arenaType, bool isRated, bool isPremade, uint32 arenaRating, uint32 matchmakerRating, uint32 arenaTeamId, uint32 opponentsArenaTeamId)
 
bool CanFillPlayersToBG (BattlegroundQueue *queue, Battleground *bg, BattlegroundBracketId bracket_id)
 
bool IsCheckNormalMatch (BattlegroundQueue *queue, Battleground *bgTemplate, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers)
 
bool CanSendMessageBGQueue (BattlegroundQueue *queue, Player *leader, Battleground *bg, PvPDifficultyEntry const *bracketEntry)
 
bool OnBeforeSendJoinMessageArenaQueue (BattlegroundQueue *queue, Player *leader, GroupQueueInfo *ginfo, PvPDifficultyEntry const *bracketEntry, bool isRated)
 
bool OnBeforeSendExitMessageArenaQueue (BattlegroundQueue *queue, GroupQueueInfo *ginfo)
 
void OnBattlegroundEnd (Battleground *bg, TeamId winnerTeamId)
 
void OnBattlegroundDestroy (Battleground *bg)
 
void OnBattlegroundCreate (Battleground *bg)
 
void OnGetSlotByType (const uint32 type, uint8 &slot)
 
void OnGetArenaPoints (ArenaTeam *at, float &points)
 
void OnArenaTypeIDToQueueID (const BattlegroundTypeId bgTypeId, const uint8 arenaType, uint32 &queueTypeID)
 
void OnArenaQueueIdToArenaType (const BattlegroundQueueTypeId bgQueueTypeId, uint8 &ArenaType)
 
void OnSetArenaMaxPlayersPerTeam (const uint8 arenaType, uint32 &maxPlayerPerTeam)
 
void OnCalcMaxDuration (Aura const *aura, int32 &maxDuration)
 
bool CanModAuraEffectDamageDone (AuraEffect const *auraEff, Unit *target, AuraApplication const *aurApp, uint8 mode, bool apply)
 
bool CanModAuraEffectModDamagePercentDone (AuraEffect const *auraEff, Unit *target, AuraApplication const *aurApp, uint8 mode, bool apply)
 
void OnSpellCheckCast (Spell *spell, bool strict, SpellCastResult &res)
 
bool CanPrepare (Spell *spell, SpellCastTargets const *targets, AuraEffect const *triggeredByAura)
 
bool CanScalingEverything (Spell *spell)
 
bool CanSelectSpecTalent (Spell *spell)
 
void OnScaleAuraUnitAdd (Spell *spell, Unit *target, uint32 effectMask, bool checkIfValid, bool implicit, uint8 auraScaleMask, TargetInfo &targetInfo)
 
void OnRemoveAuraScaleTargets (Spell *spell, TargetInfo &targetInfo, uint8 auraScaleMask, bool &needErase)
 
void OnBeforeAuraRankForLevel (SpellInfo const *spellInfo, SpellInfo const *latestSpellInfo, uint8 level)
 
void OnDummyEffect (WorldObject *caster, uint32 spellID, SpellEffIndex effIndex, GameObject *gameObjTarget)
 
void OnDummyEffect (WorldObject *caster, uint32 spellID, SpellEffIndex effIndex, Creature *creatureTarget)
 
void OnDummyEffect (WorldObject *caster, uint32 spellID, SpellEffIndex effIndex, Item *itemTarget)
 
void OnGameEventStart (uint16 EventID)
 
void OnGameEventStop (uint16 EventID)
 
void OnGameEventCheck (uint16 EventID)
 
void OnBeforeMailDraftSendMailTo (MailDraft *mailDraft, MailReceiver const &receiver, MailSender const &sender, MailCheckMask &checked, uint32 &deliver_delay, uint32 &custom_expiration, bool &deleteMailItemsFromDB, bool &sendMail)
 
void SetRealmCompleted (AchievementEntry const *achievement)
 
bool IsCompletedCriteria (AchievementMgr *mgr, AchievementCriteriaEntry const *achievementCriteria, AchievementEntry const *achievement, CriteriaProgress const *progress)
 
bool IsRealmCompleted (AchievementGlobalMgr const *globalmgr, AchievementEntry const *achievement, std::chrono::system_clock::time_point completionTime)
 
void OnBeforeCheckCriteria (AchievementMgr *mgr, AchievementCriteriaEntryList const *achievementCriteriaList)
 
bool CanCheckCriteria (AchievementMgr *mgr, AchievementCriteriaEntry const *achievementCriteria)
 
void OnInitStatsForLevel (Guardian *guardian, uint8 petlevel)
 
void OnCalculateMaxTalentPointsForLevel (Pet *pet, uint8 level, uint8 &points)
 
bool CanUnlearnSpellSet (Pet *pet, uint32 level, uint32 spell)
 
bool CanUnlearnSpellDefault (Pet *pet, SpellInfo const *spellInfo)
 
bool CanResetTalents (Pet *pet)
 
bool CanAddMember (ArenaTeam *team, ObjectGuid PlayerGuid)
 
void OnGetPoints (ArenaTeam *team, uint32 memberRating, float &points)
 
bool CanSaveToDB (ArenaTeam *team)
 
bool OnBeforeArenaCheckWinConditions (Battleground *const bg)
 
void OnArenaStart (Battleground *const bg)
 
void OnConstructObject (Object *origin)
 
void OnDestructObject (Object *origin)
 
void OnConstructPlayer (Player *origin)
 
void OnDestructPlayer (Player *origin)
 
void OnConstructGroup (Group *origin)
 
void OnDestructGroup (Group *origin)
 
void OnConstructInstanceSave (InstanceSave *origin)
 
void OnDestructInstanceSave (InstanceSave *origin)
 
void OnItemCreate (Item *item, ItemTemplate const *itemProto, Player const *owner)
 
bool CanApplySoulboundFlag (Item *item, ItemTemplate const *proto)
 
bool CanItemApplyEquipSpell (Player *player, Item *item)
 
bool CanSendAuctionHello (WorldSession const *session, ObjectGuid guid, Creature *creature)
 
void ValidateSpellAtCastSpell (Player *player, uint32 &oldSpellId, uint32 &spellId, uint8 &castCount, uint8 &castFlags)
 
void OnPlayerSetPhase (const AuraEffect *auraEff, AuraApplication const *aurApp, uint8 mode, bool apply, uint32 &newPhase)
 
void ValidateSpellAtCastSpellResult (Player *player, Unit *mover, Spell *spell, uint32 oldSpellId, uint32 spellId)
 
void OnAfterLootTemplateProcess (Loot *loot, LootTemplate const *tab, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError, uint16 lootMode)
 
void OnInstanceSave (InstanceSave *instanceSave)
 
void GetDialogStatus (Player *player, Object *questgiver)
 
void OnHandleDevCommand (Player *player, bool &enable)
 
bool OnTryExecuteCommand (ChatHandler &handler, std::string_view cmdStr)
 
void OnAfterDatabasesLoaded (uint32 updateFlags)
 
void OnAfterDatabaseLoadCreatureTemplates (std::vector< CreatureTemplate * > creatureTemplateStore)
 
void OnWorldObjectDestroy (WorldObject *object)
 
void OnWorldObjectCreate (WorldObject *object)
 
void OnWorldObjectSetMap (WorldObject *object, Map *map)
 
void OnWorldObjectResetMap (WorldObject *object)
 
void OnWorldObjectUpdate (WorldObject *object, uint32 diff)
 
void OnPetAddToWorld (Pet *pet)
 
void OnLootMoney (Player *player, uint32 gold)
 

Static Public Member Functions

static ScriptMgrinstance ()
 

Private Member Functions

 ScriptMgr ()
 
virtual ~ScriptMgr ()
 

Private Attributes

uint32 _scriptCount
 
std::atomic< long > _scheduledScripts
 
ScriptLoaderCallbackType _script_loader_callback
 
ModulesLoaderCallbackType _modules_loader_callback
 

Friends

class ScriptObject
 

Detailed Description

Member Typedef Documentation

◆ ModulesLoaderCallbackType

typedef void(* ScriptMgr::ModulesLoaderCallbackType) ()

◆ ScriptLoaderCallbackType

typedef void(* ScriptMgr::ScriptLoaderCallbackType) ()

Constructor & Destructor Documentation

◆ ScriptMgr()

ScriptMgr::ScriptMgr ( )
private
49 : _scriptCount(0),
52 _modules_loader_callback(nullptr) { }
ModulesLoaderCallbackType _modules_loader_callback
Definition: ScriptMgr.h:705
ScriptLoaderCallbackType _script_loader_callback
Definition: ScriptMgr.h:704
uint32 _scriptCount
Definition: ScriptMgr.h:699
std::atomic< long > _scheduledScripts
Definition: ScriptMgr.h:702

Member Function Documentation

◆ AfterInstanceGameObjectCreate()

void ScriptMgr::AfterInstanceGameObjectCreate ( Map instance,
GameObject go 
)

Called when a game object is created inside an instance.

Parameters
instanceA pointer to the [map] object of the instance
goThe object being added
143{
144 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_AFTER_INSTANCE_GAME_OBJECT_CREATE, script->AfterInstanceGameObjectCreate(instance, go));
145}
@ GLOBALHOOK_AFTER_INSTANCE_GAME_OBJECT_CREATE
Definition: GlobalScript.h:48
#define CALL_ENABLED_HOOKS(scriptType, hookType, action)
Definition: ScriptMgrMacros.h:72
Definition: GlobalScript.h:54
static ScriptMgr * instance()
Definition: ScriptMgr.cpp:56

References CALL_ENABLED_HOOKS, GLOBALHOOK_AFTER_INSTANCE_GAME_OBJECT_CREATE, and instance().

◆ AnticheatCheckMovementInfo()

bool ScriptMgr::AnticheatCheckMovementInfo ( Player player,
MovementInfo const &  movementInfo,
Unit mover,
bool  jump 
)
889{
890 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_CHECK_MOVEMENT_INFO, !script->AnticheatCheckMovementInfo(player, movementInfo, mover, jump));
891}
@ PLAYERHOOK_ANTICHEAT_CHECK_MOVEMENT_INFO
Definition: PlayerScript.h:201
#define CALL_ENABLED_BOOLEAN_HOOKS(scriptType, hookType, action)
Definition: ScriptMgrMacros.h:76
Definition: PlayerScript.h:209

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ANTICHEAT_CHECK_MOVEMENT_INFO.

◆ AnticheatHandleDoubleJump()

bool ScriptMgr::AnticheatHandleDoubleJump ( Player player,
Unit mover 
)
884{
885 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_HANDLE_DOUBLE_JUMP, !script->AnticheatHandleDoubleJump(player, mover));
886}
@ PLAYERHOOK_ANTICHEAT_HANDLE_DOUBLE_JUMP
Definition: PlayerScript.h:200

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ANTICHEAT_HANDLE_DOUBLE_JUMP.

◆ AnticheatSetCanFlybyServer()

void ScriptMgr::AnticheatSetCanFlybyServer ( Player player,
bool  apply 
)
859{
860 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_SET_CAN_FLY_BY_SERVER, script->AnticheatSetCanFlybyServer(player, apply));
861}
@ PLAYERHOOK_ANTICHEAT_SET_CAN_FLY_BY_SERVER
Definition: PlayerScript.h:195

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ANTICHEAT_SET_CAN_FLY_BY_SERVER.

◆ AnticheatSetJumpingbyOpcode()

void ScriptMgr::AnticheatSetJumpingbyOpcode ( Player player,
bool  jump 
)
874{
875 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_SET_JUMPING_BY_OPCODE, script->AnticheatSetJumpingbyOpcode(player, jump));
876}
@ PLAYERHOOK_ANTICHEAT_SET_JUMPING_BY_OPCODE
Definition: PlayerScript.h:198

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ANTICHEAT_SET_JUMPING_BY_OPCODE.

◆ AnticheatSetRootACKUpd()

void ScriptMgr::AnticheatSetRootACKUpd ( Player player)
869{
870 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_SET_ROOT_ACK_UPD, script->AnticheatSetRootACKUpd(player));
871}
@ PLAYERHOOK_ANTICHEAT_SET_ROOT_ACK_UPD
Definition: PlayerScript.h:197

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ANTICHEAT_SET_ROOT_ACK_UPD.

◆ AnticheatSetUnderACKmount()

void ScriptMgr::AnticheatSetUnderACKmount ( Player player)
864{
865 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_SET_UNDER_ACK_MOUNT, script->AnticheatSetUnderACKmount(player));
866}
@ PLAYERHOOK_ANTICHEAT_SET_UNDER_ACK_MOUNT
Definition: PlayerScript.h:196

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ANTICHEAT_SET_UNDER_ACK_MOUNT.

◆ AnticheatUpdateMovementInfo()

void ScriptMgr::AnticheatUpdateMovementInfo ( Player player,
MovementInfo const &  movementInfo 
)
879{
880 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ANTICHEAT_UPDATE_MOVEMENT_INFO, script->AnticheatUpdateMovementInfo(player, movementInfo));
881}
@ PLAYERHOOK_ANTICHEAT_UPDATE_MOVEMENT_INFO
Definition: PlayerScript.h:199

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ANTICHEAT_UPDATE_MOVEMENT_INFO.

◆ CanAccountCreateCharacter()

bool ScriptMgr::CanAccountCreateCharacter ( uint32  accountId,
uint8  charRace,
uint8  charClass 
)
63{
64 CALL_ENABLED_BOOLEAN_HOOKS(AccountScript, ACCOUNTHOOK_CAN_ACCOUNT_CREATE_CHARACTER, !script->CanAccountCreateCharacter(accountId, charRace, charClass));
65}
@ ACCOUNTHOOK_CAN_ACCOUNT_CREATE_CHARACTER
Definition: AccountScript.h:34
Definition: AccountScript.h:39

References ACCOUNTHOOK_CAN_ACCOUNT_CREATE_CHARACTER, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanAddMember()

bool ScriptMgr::CanAddMember ( ArenaTeam team,
ObjectGuid  PlayerGuid 
)
23{
24 CALL_ENABLED_BOOLEAN_HOOKS(ArenaScript, ARENAHOOK_CAN_ADD_MEMBER, !script->CanAddMember(team, PlayerGuid));
25}
@ ARENAHOOK_CAN_ADD_MEMBER
Definition: ArenaScript.h:27
Definition: ArenaScript.h:36

References ARENAHOOK_CAN_ADD_MEMBER, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanApplyEnchantment()

bool ScriptMgr::CanApplyEnchantment ( Player player,
Item item,
EnchantmentSlot  slot,
bool  apply,
bool  apply_dur,
bool  ignore_condition 
)
708{
709 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_APPLY_ENCHANTMENT, !script->CanApplyEnchantment(player, item, slot, apply, apply_dur, ignore_condition));
710}
@ PLAYERHOOK_CAN_APPLY_ENCHANTMENT
Definition: PlayerScript.h:164

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_APPLY_ENCHANTMENT.

◆ CanApplyEquipSpell()

bool ScriptMgr::CanApplyEquipSpell ( Player player,
SpellInfo const *  spellInfo,
Item item,
bool  apply,
bool  form_change 
)
663{
664 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_APPLY_EQUIP_SPELL, !script->CanApplyEquipSpell(player, spellInfo, item, apply, form_change));
665}
@ PLAYERHOOK_CAN_APPLY_EQUIP_SPELL
Definition: PlayerScript.h:155

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_APPLY_EQUIP_SPELL.

◆ CanApplyEquipSpellsItemSet()

bool ScriptMgr::CanApplyEquipSpellsItemSet ( Player player,
ItemSetEffect eff 
)
668{
669 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_APPLY_EQUIP_SPELLS_ITEM_SET, !script->CanApplyEquipSpellsItemSet(player, eff));
670}
@ PLAYERHOOK_CAN_APPLY_EQUIP_SPELLS_ITEM_SET
Definition: PlayerScript.h:156

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_APPLY_EQUIP_SPELLS_ITEM_SET.

◆ CanApplySoulboundFlag()

bool ScriptMgr::CanApplySoulboundFlag ( Item item,
ItemTemplate const *  proto 
)
68{
69 CALL_ENABLED_BOOLEAN_HOOKS(MiscScript, MISCHOOK_CAN_APPLY_SOULBOUND_FLAG, !script->CanApplySoulboundFlag(item, proto));
70}
@ MISCHOOK_CAN_APPLY_SOULBOUND_FLAG
Definition: MiscScript.h:36
Definition: MiscScript.h:49

References CALL_ENABLED_BOOLEAN_HOOKS, and MISCHOOK_CAN_APPLY_SOULBOUND_FLAG.

◆ CanApplyWeaponDependentAuraDamageMod()

bool ScriptMgr::CanApplyWeaponDependentAuraDamageMod ( Player player,
Item item,
WeaponAttackType  attackType,
AuraEffect const *  aura,
bool  apply 
)
658{
659 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_APPLY_WEAPON_DEPENDENT_AURA_DAMAGE_MOD, !script->CanApplyWeaponDependentAuraDamageMod(player, item, attackType, aura, apply));
660}
@ PLAYERHOOK_CAN_APPLY_WEAPON_DEPENDENT_AURA_DAMAGE_MOD
Definition: PlayerScript.h:154

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_APPLY_WEAPON_DEPENDENT_AURA_DAMAGE_MOD.

◆ CanAreaExploreAndOutdoor()

bool ScriptMgr::CanAreaExploreAndOutdoor ( Player player)
613{
614 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_AREA_EXPLORE_AND_OUTDOOR, !script->CanAreaExploreAndOutdoor(player));
615}
@ PLAYERHOOK_CAN_AREA_EXPLORE_AND_OUTDOOR
Definition: PlayerScript.h:145

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_AREA_EXPLORE_AND_OUTDOOR.

◆ CanArmorDamageModifier()

bool ScriptMgr::CanArmorDamageModifier ( Player player)
648{
649 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_ARMOR_DAMAGE_MODIFIER, !script->CanArmorDamageModifier(player));
650}
@ PLAYERHOOK_CAN_ARMOR_DAMAGE_MODIFIER
Definition: PlayerScript.h:152

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_ARMOR_DAMAGE_MODIFIER.

◆ CanBattleFieldPort()

bool ScriptMgr::CanBattleFieldPort ( Player player,
uint8  arenaType,
BattlegroundTypeId  BGTypeID,
uint8  action 
)
503{
504 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_BATTLEFIELD_PORT, !script->CanBattleFieldPort(player, arenaType, BGTypeID, action));
505}
@ PLAYERHOOK_CAN_BATTLEFIELD_PORT
Definition: PlayerScript.h:128

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_BATTLEFIELD_PORT.

◆ CanCastItemCombatSpell()

bool ScriptMgr::CanCastItemCombatSpell ( Player player,
Unit target,
WeaponAttackType  attType,
uint32  procVictim,
uint32  procEx,
Item item,
ItemTemplate const *  proto 
)
673{
674 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_CAST_ITEM_COMBAT_SPELL, !script->CanCastItemCombatSpell(player, target, attType, procVictim, procEx, item, proto));
675}
@ PLAYERHOOK_CAN_CAST_ITEM_COMBAT_SPELL
Definition: PlayerScript.h:157

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_CAST_ITEM_COMBAT_SPELL.

◆ CanCastItemUseSpell()

bool ScriptMgr::CanCastItemUseSpell ( Player player,
Item item,
SpellCastTargets const &  targets,
uint8  cast_count,
uint32  glyphIndex 
)
678{
679 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_CAST_ITEM_USE_SPELL, !script->CanCastItemUseSpell(player, item, targets, cast_count, glyphIndex));
680}
@ PLAYERHOOK_CAN_CAST_ITEM_USE_SPELL
Definition: PlayerScript.h:158

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_CAST_ITEM_USE_SPELL.

◆ CanCheckCriteria()

bool ScriptMgr::CanCheckCriteria ( AchievementMgr mgr,
AchievementCriteriaEntry const *  achievementCriteria 
)
43{
44 CALL_ENABLED_BOOLEAN_HOOKS(AchievementScript, ACHIEVEMENTHOOK_CAN_CHECK_CRITERIA, !script->CanCheckCriteria(mgr, achievementCriteria));
45}
@ ACHIEVEMENTHOOK_CAN_CHECK_CRITERIA
Definition: AchievementScript.h:32
Definition: AchievementScript.h:37

References ACHIEVEMENTHOOK_CAN_CHECK_CRITERIA, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanEnterMap()

bool ScriptMgr::CanEnterMap ( Player player,
MapEntry const *  entry,
InstanceTemplate const *  instance,
MapDifficulty const *  mapDiff,
bool  loginCheck 
)
778{
779 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_ENTER_MAP, !script->CanEnterMap(player, entry, instance, mapDiff, loginCheck));
780}
@ PLAYERHOOK_CAN_ENTER_MAP
Definition: PlayerScript.h:177

References CALL_ENABLED_BOOLEAN_HOOKS, instance(), and PLAYERHOOK_CAN_ENTER_MAP.

◆ CanEquipItem()

bool ScriptMgr::CanEquipItem ( Player player,
uint8  slot,
uint16 dest,
Item pItem,
bool  swap,
bool  not_loading 
)
688{
689 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_EQUIP_ITEM, !script->CanEquipItem(player, slot, dest, pItem, swap, not_loading));
690}
@ PLAYERHOOK_CAN_EQUIP_ITEM
Definition: PlayerScript.h:160

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_EQUIP_ITEM.

◆ CanFillPlayersToBG()

bool ScriptMgr::CanFillPlayersToBG ( BattlegroundQueue queue,
Battleground bg,
BattlegroundBracketId  bracket_id 
)
68{
69 CALL_ENABLED_BOOLEAN_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_CAN_FILL_PLAYERS_TO_BG, !script->CanFillPlayersToBG(queue, bg, bracket_id));
70}
@ ALLBATTLEGROUNDHOOK_CAN_FILL_PLAYERS_TO_BG
Definition: AllBattlegroundScript.h:35
Definition: AllBattlegroundScript.h:51

References ALLBATTLEGROUNDHOOK_CAN_FILL_PLAYERS_TO_BG, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanGiveMailRewardAtGiveLevel()

bool ScriptMgr::CanGiveMailRewardAtGiveLevel ( Player player,
uint8  level 
)
558{
559 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_GIVE_MAIL_REWARD_AT_GIVE_LEVEL, !script->CanGiveMailRewardAtGiveLevel(player, level));
560}
@ PLAYERHOOK_CAN_GIVE_MAIL_REWARD_AT_GIVE_LEVEL
Definition: PlayerScript.h:136

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_GIVE_MAIL_REWARD_AT_GIVE_LEVEL.

◆ CanGroupAccept()

bool ScriptMgr::CanGroupAccept ( Player player,
Group group 
)
513{
514 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_GROUP_ACCEPT, !script->CanGroupAccept(player, group));
515}
@ PLAYERHOOK_CAN_GROUP_ACCEPT
Definition: PlayerScript.h:130

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_GROUP_ACCEPT.

◆ CanGroupInvite()

bool ScriptMgr::CanGroupInvite ( Player player,
std::string &  membername 
)
508{
509 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_GROUP_INVITE, !script->CanGroupInvite(player, membername));
510}
@ PLAYERHOOK_CAN_GROUP_INVITE
Definition: PlayerScript.h:129

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_GROUP_INVITE.

◆ CanGroupJoinBattlegroundQueue()

bool ScriptMgr::CanGroupJoinBattlegroundQueue ( Group const *  group,
Player member,
Battleground const *  bgTemplate,
uint32  MinPlayerCount,
bool  isRated,
uint32  arenaSlot 
)
58{
59 CALL_ENABLED_BOOLEAN_HOOKS(GroupScript, GROUPHOOK_CAN_GROUP_JOIN_BATTLEGROUND_QUEUE, !script->CanGroupJoinBattlegroundQueue(group, member, bgTemplate, MinPlayerCount, isRated, arenaSlot));
60}
@ GROUPHOOK_CAN_GROUP_JOIN_BATTLEGROUND_QUEUE
Definition: GroupScript.h:32
Definition: GroupScript.h:40

References CALL_ENABLED_BOOLEAN_HOOKS, and GROUPHOOK_CAN_GROUP_JOIN_BATTLEGROUND_QUEUE.

◆ CanGuildSendBankList()

bool ScriptMgr::CanGuildSendBankList ( Guild const *  guild,
WorldSession session,
uint8  tabId,
bool  sendAllSlots 
)
78{
79 CALL_ENABLED_BOOLEAN_HOOKS(GuildScript, GUILDHOOK_CAN_GUILD_SEND_BANK_LIST, !script->CanGuildSendBankList(guild, session, tabId, sendAllSlots));
80}
@ GUILDHOOK_CAN_GUILD_SEND_BANK_LIST
Definition: GuildScript.h:38
Definition: GuildScript.h:43

References CALL_ENABLED_BOOLEAN_HOOKS, and GUILDHOOK_CAN_GUILD_SEND_BANK_LIST.

◆ CanInitTrade()

bool ScriptMgr::CanInitTrade ( Player player,
Player target 
)
783{
784 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_INIT_TRADE, !script->CanInitTrade(player, target));
785}
@ PLAYERHOOK_CAN_INIT_TRADE
Definition: PlayerScript.h:178

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_INIT_TRADE.

◆ CanItemApplyEquipSpell()

bool ScriptMgr::CanItemApplyEquipSpell ( Player player,
Item item 
)
73{
74 CALL_ENABLED_BOOLEAN_HOOKS(MiscScript, MISCHOOK_CAN_ITEM_APPLY_EQUIP_SPELL, !script->CanItemApplyEquipSpell(player, item));
75}
@ MISCHOOK_CAN_ITEM_APPLY_EQUIP_SPELL
Definition: MiscScript.h:37

References CALL_ENABLED_BOOLEAN_HOOKS, and MISCHOOK_CAN_ITEM_APPLY_EQUIP_SPELL.

◆ CanJoinInArenaQueue()

bool ScriptMgr::CanJoinInArenaQueue ( Player player,
ObjectGuid  BattlemasterGuid,
uint8  arenaslot,
BattlegroundTypeId  BGTypeID,
uint8  joinAsGroup,
uint8  IsRated,
GroupJoinBattlegroundResult err 
)
498{
499 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_JOIN_IN_ARENA_QUEUE, !script->CanJoinInArenaQueue(player, BattlemasterGuid, arenaslot, BGTypeID, joinAsGroup, IsRated, err));
500}
@ PLAYERHOOK_CAN_JOIN_IN_ARENA_QUEUE
Definition: PlayerScript.h:127

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_JOIN_IN_ARENA_QUEUE.

◆ CanJoinInBattlegroundQueue()

bool ScriptMgr::CanJoinInBattlegroundQueue ( Player player,
ObjectGuid  BattlemasterGuid,
BattlegroundTypeId  BGTypeID,
uint8  joinAsGroup,
GroupJoinBattlegroundResult err 
)
418{
419 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_JOIN_IN_BATTLEGROUND_QUEUE, !script->CanJoinInBattlegroundQueue(player, BattlemasterGuid, BGTypeID, joinAsGroup, err));
420}
@ PLAYERHOOK_CAN_JOIN_IN_BATTLEGROUND_QUEUE
Definition: PlayerScript.h:121

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_JOIN_IN_BATTLEGROUND_QUEUE.

◆ CanJoinLfg()

bool ScriptMgr::CanJoinLfg ( Player player,
uint8  roles,
lfg::LfgDungeonSet dungeons,
const std::string &  comment 
)
773{
774 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_JOIN_LFG, !script->CanJoinLfg(player, roles, dungeons, comment));
775}
@ PLAYERHOOK_CAN_JOIN_LFG
Definition: PlayerScript.h:176

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_JOIN_LFG.

◆ CanModAuraEffectDamageDone()

bool ScriptMgr::CanModAuraEffectDamageDone ( AuraEffect const *  auraEff,
Unit target,
AuraApplication const *  aurApp,
uint8  mode,
bool  apply 
)
28{
29 CALL_ENABLED_BOOLEAN_HOOKS(AllSpellScript, ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_DAMAGE_DONE, !script->CanModAuraEffectDamageDone(auraEff, target, aurApp, mode, apply));
30}
@ ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_DAMAGE_DONE
Definition: AllSpellScript.h:27
Definition: AllSpellScript.h:46

References ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_DAMAGE_DONE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanModAuraEffectModDamagePercentDone()

bool ScriptMgr::CanModAuraEffectModDamagePercentDone ( AuraEffect const *  auraEff,
Unit target,
AuraApplication const *  aurApp,
uint8  mode,
bool  apply 
)
33{
34 CALL_ENABLED_BOOLEAN_HOOKS(AllSpellScript, ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_MOD_DAMAGE_PERCENT_DONE, !script->CanModAuraEffectModDamagePercentDone(auraEff, target, aurApp, mode, apply));
35}
@ ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_MOD_DAMAGE_PERCENT_DONE
Definition: AllSpellScript.h:28

References ALLSPELLHOOK_CAN_MOD_AURA_EFFECT_MOD_DAMAGE_PERCENT_DONE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanPacketReceive()

bool ScriptMgr::CanPacketReceive ( WorldSession session,
WorldPacket const &  packet 
)
59{
61 return true;
62
63 WorldPacket copy(packet);
64
65 CALL_ENABLED_BOOLEAN_HOOKS(ServerScript, SERVERHOOK_CAN_PACKET_RECEIVE, !script->CanPacketReceive(session, copy));
66}
@ SERVERHOOK_CAN_PACKET_RECEIVE
Definition: ServerScript.h:31
Definition: ServerScript.h:36
Definition: ScriptMgr.h:712
Definition: WorldPacket.h:27

References CALL_ENABLED_BOOLEAN_HOOKS, and SERVERHOOK_CAN_PACKET_RECEIVE.

◆ CanPacketSend()

bool ScriptMgr::CanPacketSend ( WorldSession session,
WorldPacket const &  packet 
)
47{
48 ASSERT(session);
49
51 return true;
52
53 WorldPacket copy(packet);
54
55 CALL_ENABLED_BOOLEAN_HOOKS(ServerScript, SERVERHOOK_CAN_PACKET_SEND, !script->CanPacketSend(session, copy));
56}
#define ASSERT
Definition: Errors.h:68
@ SERVERHOOK_CAN_PACKET_SEND
Definition: ServerScript.h:30

References ASSERT, CALL_ENABLED_BOOLEAN_HOOKS, and SERVERHOOK_CAN_PACKET_SEND.

◆ CanPlaceAuctionBid()

bool ScriptMgr::CanPlaceAuctionBid ( Player player,
AuctionEntry auction 
)
393{
394 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLACE_AUCTION_BID, !script->CanPlaceAuctionBid(player, auction));
395}
@ PLAYERHOOK_CAN_PLACE_AUCTION_BID
Definition: PlayerScript.h:105

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLACE_AUCTION_BID.

◆ CanPlayerUseChat() [1/5]

bool ScriptMgr::CanPlayerUseChat ( Player player,
uint32  type,
uint32  language,
std::string &  msg 
)
813{
814 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLAYER_USE_CHAT, !script->CanPlayerUseChat(player, type, language, msg));
815}
@ PLAYERHOOK_CAN_PLAYER_USE_CHAT
Definition: PlayerScript.h:184

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLAYER_USE_CHAT.

◆ CanPlayerUseChat() [2/5]

bool ScriptMgr::CanPlayerUseChat ( Player player,
uint32  type,
uint32  language,
std::string &  msg,
Channel channel 
)
833{
834 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT, !script->CanPlayerUseChat(player, type, language, msg, channel));
835}
@ PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT
Definition: PlayerScript.h:188

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT.

◆ CanPlayerUseChat() [3/5]

bool ScriptMgr::CanPlayerUseChat ( Player player,
uint32  type,
uint32  language,
std::string &  msg,
Group group 
)
823{
824 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT, !script->CanPlayerUseChat(player, type, language, msg, group));
825}
@ PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT
Definition: PlayerScript.h:186

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT.

◆ CanPlayerUseChat() [4/5]

bool ScriptMgr::CanPlayerUseChat ( Player player,
uint32  type,
uint32  language,
std::string &  msg,
Guild guild 
)
828{
829 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLAYER_USE_GUILD_CHAT, !script->CanPlayerUseChat(player, type, language, msg, guild));
830}
@ PLAYERHOOK_CAN_PLAYER_USE_GUILD_CHAT
Definition: PlayerScript.h:187

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLAYER_USE_GUILD_CHAT.

◆ CanPlayerUseChat() [5/5]

bool ScriptMgr::CanPlayerUseChat ( Player player,
uint32  type,
uint32  language,
std::string &  msg,
Player receiver 
)
818{
819 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT, !script->CanPlayerUseChat(player, type, language, msg, receiver));
820}
@ PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT
Definition: PlayerScript.h:185

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT.

◆ CanPrepare()

bool ScriptMgr::CanPrepare ( Spell spell,
SpellCastTargets const *  targets,
AuraEffect const *  triggeredByAura 
)
43{
44 CALL_ENABLED_BOOLEAN_HOOKS(AllSpellScript, ALLSPELLHOOK_CAN_PREPARE, !script->CanPrepare(spell, targets, triggeredByAura));
45}
@ ALLSPELLHOOK_CAN_PREPARE
Definition: AllSpellScript.h:30

References ALLSPELLHOOK_CAN_PREPARE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanRepopAtGraveyard()

bool ScriptMgr::CanRepopAtGraveyard ( Player player)
568{
569 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_REPOP_AT_GRAVEYARD, !script->CanRepopAtGraveyard(player));
570}
@ PLAYERHOOK_CAN_REPOP_AT_GRAVEYARD
Definition: PlayerScript.h:138

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_REPOP_AT_GRAVEYARD.

◆ CanResetTalents()

bool ScriptMgr::CanResetTalents ( Pet pet)
43{
44 CALL_ENABLED_BOOLEAN_HOOKS(PetScript, PETHOOK_CAN_RESET_TALENTS, !script->CanResetTalents(pet));
45}
@ PETHOOK_CAN_RESET_TALENTS
Definition: PetScript.h:30
Definition: PetScript.h:36

References CALL_ENABLED_BOOLEAN_HOOKS, and PETHOOK_CAN_RESET_TALENTS.

◆ CanSaveEquipNewItem()

bool ScriptMgr::CanSaveEquipNewItem ( Player player,
Item item,
uint16  pos,
bool  update 
)
703{
704 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_SAVE_EQUIP_NEW_ITEM, !script->CanSaveEquipNewItem(player, item, pos, update));
705}
@ PLAYERHOOK_CAN_SAVE_EQUIP_NEW_ITEM
Definition: PlayerScript.h:163

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_SAVE_EQUIP_NEW_ITEM.

◆ CanSaveToDB()

bool ScriptMgr::CanSaveToDB ( ArenaTeam team)
33{
35}
@ ARENAHOOK_CAN_SAVE_TO_DB
Definition: ArenaScript.h:29

References ARENAHOOK_CAN_SAVE_TO_DB, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanScalingEverything()

bool ScriptMgr::CanScalingEverything ( Spell spell)
48{
50}
@ ALLSPELLHOOK_CAN_SCALING_EVERYTHING
Definition: AllSpellScript.h:31
#define CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(scriptType, hookType, action)
Definition: ScriptMgrMacros.h:82

References ALLSPELLHOOK_CAN_SCALING_EVERYTHING, and CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE.

◆ CanSelectSpecTalent()

bool ScriptMgr::CanSelectSpecTalent ( Spell spell)
53{
55}
@ ALLSPELLHOOK_CAN_SELECT_SPEC_TALENT
Definition: AllSpellScript.h:32

References ALLSPELLHOOK_CAN_SELECT_SPEC_TALENT, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanSellItem()

bool ScriptMgr::CanSellItem ( Player player,
Item item,
Creature creature 
)
518{
519 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_SELL_ITEM, !script->CanSellItem(player, item, creature));
520}
@ PLAYERHOOK_CAN_SELL_ITEM
Definition: PlayerScript.h:131

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_SELL_ITEM.

◆ CanSendAuctionHello()

bool ScriptMgr::CanSendAuctionHello ( WorldSession const *  session,
ObjectGuid  guid,
Creature creature 
)
78{
79 CALL_ENABLED_BOOLEAN_HOOKS(MiscScript, MISCHOOK_CAN_SEND_AUCTIONHELLO, !script->CanSendAuctionHello(session, guid, creature));
80}
@ MISCHOOK_CAN_SEND_AUCTIONHELLO
Definition: MiscScript.h:38

References CALL_ENABLED_BOOLEAN_HOOKS, and MISCHOOK_CAN_SEND_AUCTIONHELLO.

◆ CanSendErrorAlreadyLooted()

bool ScriptMgr::CanSendErrorAlreadyLooted ( Player player)
528{
529 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_SEND_ERROR_ALREADY_LOOTED, !script->CanSendErrorAlreadyLooted(player));
530}
@ PLAYERHOOK_CAN_SEND_ERROR_ALREADY_LOOTED
Definition: PlayerScript.h:202

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_SEND_ERROR_ALREADY_LOOTED.

◆ CanSendMail()

bool ScriptMgr::CanSendMail ( Player player,
ObjectGuid  receiverGuid,
ObjectGuid  mailbox,
std::string &  subject,
std::string &  body,
uint32  money,
uint32  COD,
Item item 
)
523{
524 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_SEND_MAIL, !script->CanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, item));
525}
@ PLAYERHOOK_CAN_SEND_MAIL
Definition: PlayerScript.h:132

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_SEND_MAIL.

◆ CanSendMessageBGQueue()

bool ScriptMgr::CanSendMessageBGQueue ( BattlegroundQueue queue,
Player leader,
Battleground bg,
PvPDifficultyEntry const *  bracketEntry 
)
78{
79 CALL_ENABLED_BOOLEAN_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_CAN_SEND_MESSAGE_BG_QUEUE, !script->CanSendMessageBGQueue(queue, leader, bg, bracketEntry));
80}
@ ALLBATTLEGROUNDHOOK_CAN_SEND_MESSAGE_BG_QUEUE
Definition: AllBattlegroundScript.h:37

References ALLBATTLEGROUNDHOOK_CAN_SEND_MESSAGE_BG_QUEUE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ CanSetPhaseMask()

bool ScriptMgr::CanSetPhaseMask ( Unit const *  unit,
uint32  newPhaseMask,
bool  update 
)
107{
108 CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_CAN_SET_PHASE_MASK, !script->CanSetPhaseMask(unit, newPhaseMask, update));
109}
@ UNITHOOK_CAN_SET_PHASE_MASK
Definition: UnitScript.h:39
Definition: UnitScript.h:56

References CALL_ENABLED_BOOLEAN_HOOKS, and UNITHOOK_CAN_SET_PHASE_MASK.

◆ CanSetTradeItem()

bool ScriptMgr::CanSetTradeItem ( Player player,
Item tradedItem,
uint8  tradeSlot 
)
788{
789 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_SET_TRADE_ITEM, !script->CanSetTradeItem(player, tradedItem, tradeSlot));
790}
@ PLAYERHOOK_CAN_SET_TRADE_ITEM
Definition: PlayerScript.h:179

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_SET_TRADE_ITEM.

◆ CanUnequipItem()

bool ScriptMgr::CanUnequipItem ( Player player,
uint16  pos,
bool  swap 
)
693{
694 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_UNEQUIP_ITEM, !script->CanUnequipItem(player, pos, swap));
695}
@ PLAYERHOOK_CAN_UNEQUIP_ITEM
Definition: PlayerScript.h:161

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_UNEQUIP_ITEM.

◆ CanUnlearnSpellDefault()

bool ScriptMgr::CanUnlearnSpellDefault ( Pet pet,
SpellInfo const *  spellInfo 
)
38{
39 CALL_ENABLED_BOOLEAN_HOOKS(PetScript, PETHOOK_CAN_UNLEARN_SPELL_DEFAULT, !script->CanUnlearnSpellDefault(pet, spellInfo));
40}
@ PETHOOK_CAN_UNLEARN_SPELL_DEFAULT
Definition: PetScript.h:29

References CALL_ENABLED_BOOLEAN_HOOKS, and PETHOOK_CAN_UNLEARN_SPELL_DEFAULT.

◆ CanUnlearnSpellSet()

bool ScriptMgr::CanUnlearnSpellSet ( Pet pet,
uint32  level,
uint32  spell 
)
33{
34 CALL_ENABLED_BOOLEAN_HOOKS(PetScript, PETHOOK_CAN_UNLEARN_SPELL_SET, !script->CanUnlearnSpellSet(pet, level, spell));
35}
@ PETHOOK_CAN_UNLEARN_SPELL_SET
Definition: PetScript.h:28

References CALL_ENABLED_BOOLEAN_HOOKS, and PETHOOK_CAN_UNLEARN_SPELL_SET.

◆ CanUseItem()

bool ScriptMgr::CanUseItem ( Player player,
ItemTemplate const *  proto,
InventoryResult result 
)
698{
699 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CAN_USE_ITEM, !script->CanUseItem(player, proto, result));
700}
@ PLAYERHOOK_CAN_USE_ITEM
Definition: PlayerScript.h:162

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CAN_USE_ITEM.

◆ CheckIfScriptsInDatabaseExist()

void ScriptMgr::CheckIfScriptsInDatabaseExist ( )
191{
192 for (auto const& scriptName : sObjectMgr->GetScriptNames())
193 {
194 if (uint32 sid = sObjectMgr->GetScriptId(scriptName))
195 {
229 {
230 LOG_ERROR("sql.sql", "Script named '{}' is assigned in the database, but has no code!", scriptName);
231 }
232 }
233 }
234}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
std::uint32_t uint32
Definition: Define.h:107
#define sObjectMgr
Definition: ObjectMgr.h:1623

References LOG_ERROR, and sObjectMgr.

Referenced by LoadDatabase().

◆ CheckItemInSlotAtLoadInventory()

bool ScriptMgr::CheckItemInSlotAtLoadInventory ( Player player,
Item item,
uint8  slot,
uint8 err,
uint16 dest 
)
723{
724 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_CHECK_ITEM_IN_SLOT_AT_LOAD_INVENTORY, !script->CheckItemInSlotAtLoadInventory(player, item, slot, err, dest));
725}
@ PLAYERHOOK_CHECK_ITEM_IN_SLOT_AT_LOAD_INVENTORY
Definition: PlayerScript.h:166

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_CHECK_ITEM_IN_SLOT_AT_LOAD_INVENTORY.

◆ CreateAuraScripts()

void ScriptMgr::CreateAuraScripts ( uint32  spellId,
std::list< AuraScript * > &  scriptVector 
)
44{
45 SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
46
47 for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
48 {
50 if (!tempScript)
51 continue;
52
53 AuraScript* script = tempScript->GetAuraScript();
54
55 if (!script)
56 continue;
57
58 script->_Init(&tempScript->GetName(), spellId);
59
60 scriptVector.push_back(script);
61 }
62}
std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
Definition: ObjectMgr.h:389
Definition: SpellScriptLoader.h:26
virtual AuraScript * GetAuraScript() const
Definition: SpellScriptLoader.h:37
static TScript * GetScriptById(uint32 id)
Definition: ScriptMgr.h:841
const std::string & GetName() const
Definition: ScriptObject.h:54
virtual void _Init(std::string const *scriptname, uint32 spellId)
Definition: SpellScript.cpp:59
Definition: SpellScript.h:517

References _SpellScript::_Init(), SpellScriptLoader::GetAuraScript(), ScriptObject::GetName(), ScriptRegistry< TScript >::GetScriptById(), and sObjectMgr.

◆ CreateBattleground()

Battleground * ScriptMgr::CreateBattleground ( BattlegroundTypeId  typeId)
Todo:
: Implement script-side battlegrounds.
22{
24 ABORT();
25 return nullptr;
26}
#define ABORT
Definition: Errors.h:76

References ABORT.

◆ CreateInstanceScript()

InstanceScript * ScriptMgr::CreateInstanceScript ( InstanceMap map)
22{
23 ASSERT(map);
24
26 return tempScript ? tempScript->GetInstanceScript(map) : nullptr;
27}
uint32 GetScriptId() const
Definition: Map.h:829

References ASSERT, ScriptRegistry< TScript >::GetScriptById(), and InstanceMap::GetScriptId().

◆ CreateOutdoorPvP()

OutdoorPvP * ScriptMgr::CreateOutdoorPvP ( OutdoorPvPData const *  data)
23{
24 ASSERT(data);
25
26 auto tempScript = ScriptRegistry<OutdoorPvPScript>::GetScriptById(data->ScriptId);
27 return tempScript ? tempScript->GetOutdoorPvP() : nullptr;
28}

References ASSERT, ScriptRegistry< TScript >::GetScriptById(), and OutdoorPvPData::ScriptId.

◆ CreateSpellScriptLoaders()

void ScriptMgr::CreateSpellScriptLoaders ( uint32  spellId,
std::vector< std::pair< SpellScriptLoader *, std::multimap< uint32, uint32 >::iterator > > &  scriptVector 
)
65{
66 SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
67 scriptVector.reserve(std::distance(bounds.first, bounds.second));
68
69 for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
70 {
72 if (!tempScript)
73 continue;
74
75 scriptVector.emplace_back(tempScript, itr);
76 }
77}

References ScriptRegistry< TScript >::GetScriptById(), and sObjectMgr.

◆ CreateSpellScripts()

void ScriptMgr::CreateSpellScripts ( uint32  spellId,
std::list< SpellScript * > &  scriptVector 
)
23{
24 SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
25
26 for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
27 {
29 if (!tempScript)
30 continue;
31
32 SpellScript* script = tempScript->GetSpellScript();
33
34 if (!script)
35 continue;
36
37 script->_Init(&tempScript->GetName(), spellId);
38
39 scriptVector.push_back(script);
40 }
41}
virtual SpellScript * GetSpellScript() const
Definition: SpellScriptLoader.h:34
Definition: SpellScript.h:182

References _SpellScript::_Init(), ScriptObject::GetName(), ScriptRegistry< TScript >::GetScriptById(), SpellScriptLoader::GetSpellScript(), and sObjectMgr.

◆ Creature_SelectLevel()

void ScriptMgr::Creature_SelectLevel ( const CreatureTemplate cinfo,
Creature creature 
)
61{
62 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
63 {
64 script->Creature_SelectLevel(cinfo, creature);
65 });
66}
Definition: AllCreatureScript.h:24
virtual void Creature_SelectLevel(const CreatureTemplate *, Creature *)
Definition: AllCreatureScript.h:36

References AllCreatureScript::Creature_SelectLevel().

◆ DealDamage()

uint32 ScriptMgr::DealDamage ( Unit AttackerUnit,
Unit pVictim,
uint32  damage,
DamageEffectType  damagetype 
)
53{
55 {
56 return damage;
57 }
58
59 for (auto const& [scriptID, script] : ScriptRegistry<UnitScript>::ScriptPointerList)
60 {
61 auto const& dmg = script->DealDamage(AttackerUnit, pVictim, damage, damagetype);
62 if (dmg != damage)
63 {
64 return damage;
65 }
66 }
67
68 return damage;
69}

◆ DecreaseScheduledScriptCount() [1/2]

uint32 ScriptMgr::DecreaseScheduledScriptCount ( )
inline
531{ return --_scheduledScripts; }

References _scheduledScripts.

◆ DecreaseScheduledScriptCount() [2/2]

uint32 ScriptMgr::DecreaseScheduledScriptCount ( std::size_t  count)
inline
532{ return _scheduledScripts -= count; }

References _scheduledScripts.

◆ DecreaseScriptCount()

void ScriptMgr::DecreaseScriptCount ( )
inline
128{ --_scriptCount; }

References _scriptCount.

◆ FillSpellSummary()

void ScriptMgr::FillSpellSummary ( )
237{
239
240 SpellSummary = new TSpellSummary[sSpellMgr->GetSpellInfoStoreSize()];
241
242 SpellInfo const* pTempSpell;
243
244 for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i)
245 {
246 SpellSummary[i].Effects = 0;
247 SpellSummary[i].Targets = 0;
248
249 pTempSpell = sSpellMgr->GetSpellInfo(i);
250 // This spell doesn't exist.
251 if (!pTempSpell)
252 continue;
253
254 for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j)
255 {
256 // Spell targets self.
257 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_CASTER)
258 SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF - 1);
259
260 // Spell targets a single enemy.
261 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
262 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_DEST_TARGET_ENEMY)
264
265 // Spell targets AoE at enemy.
266 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY ||
267 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY ||
268 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_SRC_CASTER ||
269 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY)
271
272 // Spell targets an enemy.
273 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
274 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_DEST_TARGET_ENEMY ||
275 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENEMY ||
276 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENEMY ||
277 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_SRC_CASTER ||
278 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_DEST_DYNOBJ_ENEMY)
280
281 // Spell targets a single friend (or self).
282 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_CASTER ||
283 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ALLY ||
284 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_PARTY)
286
287 // Spell targets AoE friends.
288 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_CASTER_AREA_PARTY ||
289 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_LASTTARGET_AREA_PARTY ||
290 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_SRC_CASTER)
292
293 // Spell targets any friend (or self).
294 if (pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_CASTER ||
295 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ALLY ||
296 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_PARTY ||
297 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_CASTER_AREA_PARTY ||
298 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_UNIT_LASTTARGET_AREA_PARTY ||
299 pTempSpell->Effects[j].TargetA.GetTarget() == TARGET_SRC_CASTER)
301
302 // Make sure that this spell includes a damage effect.
303 if (pTempSpell->Effects[j].Effect == SPELL_EFFECT_SCHOOL_DAMAGE ||
304 pTempSpell->Effects[j].Effect == SPELL_EFFECT_INSTAKILL ||
305 pTempSpell->Effects[j].Effect == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE ||
306 pTempSpell->Effects[j].Effect == SPELL_EFFECT_HEALTH_LEECH)
308
309 // Make sure that this spell includes a healing effect (or an apply aura with a periodic heal).
310 if (pTempSpell->Effects[j].Effect == SPELL_EFFECT_HEAL ||
311 pTempSpell->Effects[j].Effect == SPELL_EFFECT_HEAL_MAX_HEALTH ||
312 pTempSpell->Effects[j].Effect == SPELL_EFFECT_HEAL_MECHANICAL ||
313 (pTempSpell->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && pTempSpell->Effects[j].ApplyAuraName == 8))
314 SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING - 1);
315
316 // Make sure that this spell applies an aura.
317 if (pTempSpell->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA)
318 SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA - 1);
319 }
320 }
321}
struct TSpellSummary * SpellSummary
@ SELECT_TARGET_ANY_FRIEND
Definition: CreatureAI.h:52
@ SELECT_TARGET_AOE_FRIEND
Definition: CreatureAI.h:51
@ SELECT_TARGET_ANY_ENEMY
Definition: CreatureAI.h:48
@ SELECT_TARGET_SINGLE_FRIEND
Definition: CreatureAI.h:50
@ SELECT_TARGET_SINGLE_ENEMY
Definition: CreatureAI.h:46
@ SELECT_TARGET_SELF
Definition: CreatureAI.h:44
@ SELECT_TARGET_AOE_ENEMY
Definition: CreatureAI.h:47
@ SELECT_EFFECT_AURA
Definition: CreatureAI.h:61
@ SELECT_EFFECT_HEALING
Definition: CreatureAI.h:60
@ SELECT_EFFECT_DAMAGE
Definition: CreatureAI.h:59
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_EFFECT_HEALTH_LEECH
Definition: SharedDefines.h:787
@ SPELL_EFFECT_HEAL
Definition: SharedDefines.h:788
@ SPELL_EFFECT_HEAL_MAX_HEALTH
Definition: SharedDefines.h:845
@ SPELL_EFFECT_HEAL_MECHANICAL
Definition: SharedDefines.h:853
@ SPELL_EFFECT_ENVIRONMENTAL_DAMAGE
Definition: SharedDefines.h:785
@ SPELL_EFFECT_SCHOOL_DAMAGE
Definition: SharedDefines.h:780
@ SPELL_EFFECT_INSTAKILL
Definition: SharedDefines.h:779
@ SPELL_EFFECT_APPLY_AURA
Definition: SharedDefines.h:784
Targets
Definition: SharedDefines.h:1409
@ TARGET_UNIT_TARGET_PARTY
Definition: SharedDefines.h:1439
@ TARGET_DEST_DYNOBJ_ENEMY
Definition: SharedDefines.h:1432
@ TARGET_UNIT_CASTER_AREA_PARTY
Definition: SharedDefines.h:1424
@ TARGET_UNIT_DEST_AREA_ENEMY
Definition: SharedDefines.h:1421
@ TARGET_UNIT_TARGET_ALLY
Definition: SharedDefines.h:1425
@ TARGET_UNIT_SRC_AREA_ENEMY
Definition: SharedDefines.h:1420
@ TARGET_DEST_TARGET_ENEMY
Definition: SharedDefines.h:1457
@ TARGET_UNIT_TARGET_ENEMY
Definition: SharedDefines.h:1415
@ TARGET_UNIT_LASTTARGET_AREA_PARTY
Definition: SharedDefines.h:1441
@ TARGET_UNIT_CASTER
Definition: SharedDefines.h:1410
@ TARGET_SRC_CASTER
Definition: SharedDefines.h:1426
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:1637
static void FillAISpellInfo()
Definition: UnitAI.cpp:292
Definition: ScriptedCreature.cpp:35
uint8 Targets
Definition: ScriptedCreature.cpp:36
uint8 Effects
Definition: ScriptedCreature.cpp:37
Definition: SpellInfo.h:316
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition: SpellInfo.h:393

References TSpellSummary::Effects, SpellInfo::Effects, UnitAI::FillAISpellInfo(), MAX_SPELL_EFFECTS, SELECT_EFFECT_AURA, SELECT_EFFECT_DAMAGE, SELECT_EFFECT_HEALING, SELECT_TARGET_ANY_ENEMY, SELECT_TARGET_ANY_FRIEND, SELECT_TARGET_AOE_ENEMY, SELECT_TARGET_AOE_FRIEND, SELECT_TARGET_SELF, SELECT_TARGET_SINGLE_ENEMY, SELECT_TARGET_SINGLE_FRIEND, SPELL_EFFECT_APPLY_AURA, SPELL_EFFECT_ENVIRONMENTAL_DAMAGE, SPELL_EFFECT_HEAL, SPELL_EFFECT_HEAL_MAX_HEALTH, SPELL_EFFECT_HEAL_MECHANICAL, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_INSTAKILL, SPELL_EFFECT_SCHOOL_DAMAGE, SpellSummary, sSpellMgr, TARGET_DEST_DYNOBJ_ENEMY, TARGET_DEST_TARGET_ENEMY, TARGET_SRC_CASTER, TARGET_UNIT_CASTER, TARGET_UNIT_CASTER_AREA_PARTY, TARGET_UNIT_DEST_AREA_ENEMY, TARGET_UNIT_LASTTARGET_AREA_PARTY, TARGET_UNIT_SRC_AREA_ENEMY, TARGET_UNIT_TARGET_ALLY, TARGET_UNIT_TARGET_ENEMY, TARGET_UNIT_TARGET_PARTY, and TSpellSummary::Targets.

Referenced by LoadDatabase().

◆ GetChatCommands()

Acore::ChatCommands::ChatCommandTable ScriptMgr::GetChatCommands ( )
23{
25
26 for (auto const& [scriptID, script] : ScriptRegistry<CommandScript>::ScriptPointerList)
27 {
28 Acore::ChatCommands::ChatCommandTable cmds = script->GetCommands();
29 std::move(cmds.begin(), cmds.end(), std::back_inserter(table));
30 }
31
32 return table;
33}
std::vector< ChatCommandBuilder > ChatCommandTable
Definition: ChatCommand.h:49

◆ GetCreatureAI()

CreatureAI * ScriptMgr::GetCreatureAI ( Creature creature)
157{
158 ASSERT(creature);
159
160 auto retAI = GetReturnAIScript<AllCreatureScript, CreatureAI>([creature](AllCreatureScript* script)
161 {
162 return script->GetCreatureAI(creature);
163 });
164
165 if (retAI)
166 {
167 return retAI;
168 }
169
170 auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId());
171 return tempScript ? tempScript->GetAI(creature) : nullptr;
172}
uint32 GetScriptId() const
Definition: Creature.cpp:3038
virtual CreatureAI * GetCreatureAI(Creature *) const
Definition: AllCreatureScript.h:101

References ASSERT, AllCreatureScript::GetCreatureAI(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ GetDialogStatus() [1/3]

uint32 ScriptMgr::GetDialogStatus ( Player player,
Creature creature 
)
148{
149 ASSERT(player);
150 ASSERT(creature);
151
152 auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId());
153 return tempScript ? tempScript->GetDialogStatus(player, creature) : DIALOG_STATUS_SCRIPTED_NO_STATUS;
154}
@ DIALOG_STATUS_SCRIPTED_NO_STATUS
Definition: QuestDef.h:125

References ASSERT, DIALOG_STATUS_SCRIPTED_NO_STATUS, ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ GetDialogStatus() [2/3]

uint32 ScriptMgr::GetDialogStatus ( Player player,
GameObject go 
)
126{
127 ASSERT(player);
128 ASSERT(go);
129
131 return tempScript ? tempScript->GetDialogStatus(player, go) : DIALOG_STATUS_SCRIPTED_NO_STATUS;
132}
virtual uint32 GetScriptId() const
Definition: GameObject.cpp:2197

References ASSERT, DIALOG_STATUS_SCRIPTED_NO_STATUS, ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ GetDialogStatus() [3/3]

void ScriptMgr::GetDialogStatus ( Player player,
Object questgiver 
)
108{
109 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_GET_DIALOG_STATUS, script->GetDialogStatus(player, questgiver));
110}
@ MISCHOOK_GET_DIALOG_STATUS
Definition: MiscScript.h:44

References CALL_ENABLED_HOOKS, and MISCHOOK_GET_DIALOG_STATUS.

◆ GetGameObjectAI()

GameObjectAI * ScriptMgr::GetGameObjectAI ( GameObject go)
225{
226 ASSERT(go);
227
228 auto retAI = GetReturnAIScript<AllGameObjectScript, GameObjectAI>([go](AllGameObjectScript* script)
229 {
230 return script->GetGameObjectAI(go);
231 });
232
233 if (retAI)
234 {
235 return retAI;
236 }
237
239 return tempScript ? tempScript->GetAI(go) : nullptr;
240}
Definition: AllGameObjectScript.h:24
virtual GameObjectAI * GetGameObjectAI(GameObject *) const
Definition: AllGameObjectScript.h:86

References ASSERT, AllGameObjectScript::GetGameObjectAI(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ GetScriptCount()

uint32 ScriptMgr::GetScriptCount ( ) const
inline
129{ return _scriptCount; }

References _scriptCount.

Referenced by LoadDatabase().

◆ IfNormalReaction()

bool ScriptMgr::IfNormalReaction ( Unit const *  unit,
Unit const *  target,
ReputationRank repRank 
)
87{
88 CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IF_NORMAL_REACTION, !script->IfNormalReaction(unit, target, repRank));
89}
@ UNITHOOK_IF_NORMAL_REACTION
Definition: UnitScript.h:35

References CALL_ENABLED_BOOLEAN_HOOKS, and UNITHOOK_IF_NORMAL_REACTION.

◆ IncreaseScheduledScriptsCount()

uint32 ScriptMgr::IncreaseScheduledScriptsCount ( )
inline
530{ return ++_scheduledScripts; }

References _scheduledScripts.

◆ IncreaseScriptCount()

void ScriptMgr::IncreaseScriptCount ( )
inline
127{ ++_scriptCount; }

References _scriptCount.

◆ Initialize()

void ScriptMgr::Initialize ( )
63{
64 LOG_INFO("server.loading", "> Loading C++ scripts");
65 LOG_INFO("server.loading", " ");
66
68
69 // LFGScripts
71
73 "Script loader callback wasn't registered!");
74
76 "Modules loader callback wasn't registered!");
77
80
106}
#define LOG_INFO(filterType__,...)
Definition: Log.h:164
@ GAMEEVENTHOOK_END
Definition: GameEventScript.h:29
@ ALLBATTLEGROUNDHOOK_END
Definition: AllBattlegroundScript.h:43
@ DATABASEHOOK_END
Definition: DatabaseScript.h:28
@ ACCOUNTHOOK_END
Definition: AccountScript.h:35
@ PETHOOK_END
Definition: PetScript.h:32
@ ALLMAPHOOK_END
Definition: AllMapScript.h:33
@ ALLSPELLHOOK_END
Definition: AllSpellScript.h:39
@ ARENATEAMHOOK_END
Definition: ArenaTeamScript.h:32
@ MISCHOOK_END
Definition: MiscScript.h:45
@ GROUPHOOK_END
Definition: GroupScript.h:34
@ ACHIEVEMENTHOOK_END
Definition: AchievementScript.h:33
@ SERVERHOOK_END
Definition: ServerScript.h:32
@ PLAYERHOOK_END
Definition: PlayerScript.h:205
@ AUCTIONHOUSEHOOK_END
Definition: AuctionHouseScript.h:37
@ ARENAHOOK_END
Definition: ArenaScript.h:32
@ ALLCOMMANDHOOK_END
Definition: AllCommandScript.h:28
@ UNITHOOK_END
Definition: UnitScript.h:48
@ WORLDOBJECTHOOK_END
Definition: WorldObjectScript.h:31
@ GUILDHOOK_END
Definition: GuildScript.h:39
@ WORLDHOOK_END
Definition: WorldScript.h:39
@ FORMULAHOOK_END
Definition: FormulaScript.h:35
@ MOVEMENTHOOK_END
Definition: MovementHandlerScript.h:28
@ LOOTHOOK_END
Definition: LootScript.h:27
@ GLOBALHOOK_END
Definition: GlobalScript.h:49
@ MAILHOOK_END
Definition: MailScript.h:27
void AddSC_SmartScripts()
Registers scripts required by the SAI scripting system.
Definition: SmartAI.cpp:1318
void AddSC_LFGScripts()
Definition: LFGScripts.cpp:319
static void InitEnabledHooksIfNeeded(uint16 totalAvailableHooks)
Definition: ScriptMgr.h:732

References _modules_loader_callback, _script_loader_callback, ACCOUNTHOOK_END, ACHIEVEMENTHOOK_END, lfg::AddSC_LFGScripts(), AddSC_SmartScripts(), ALLBATTLEGROUNDHOOK_END, ALLCOMMANDHOOK_END, ALLMAPHOOK_END, ALLSPELLHOOK_END, ARENAHOOK_END, ARENATEAMHOOK_END, ASSERT, AUCTIONHOUSEHOOK_END, DATABASEHOOK_END, FORMULAHOOK_END, GAMEEVENTHOOK_END, GLOBALHOOK_END, GROUPHOOK_END, GUILDHOOK_END, ScriptRegistry< TScript >::InitEnabledHooksIfNeeded(), LOG_INFO, LOOTHOOK_END, MAILHOOK_END, MISCHOOK_END, MOVEMENTHOOK_END, PETHOOK_END, PLAYERHOOK_END, SERVERHOOK_END, UNITHOOK_END, WORLDHOOK_END, and WORLDOBJECTHOOK_END.

◆ instance()

ScriptMgr * ScriptMgr::instance ( )
static
57{
58 static ScriptMgr instance;
59 return &instance;
60}
Definition: ScriptMgr.h:111

References instance().

Referenced by AfterInstanceGameObjectCreate(), CanEnterMap(), instance(), and OnBeforeSetBossState().

◆ IsCheckNormalMatch()

bool ScriptMgr::IsCheckNormalMatch ( BattlegroundQueue queue,
Battleground bgTemplate,
BattlegroundBracketId  bracket_id,
uint32  minPlayers,
uint32  maxPlayers 
)
73{
74 CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_IS_CHECK_NORMAL_MATCH, script->IsCheckNormalMatch(queue, bgTemplate, bracket_id, minPlayers, maxPlayers));
75}
@ ALLBATTLEGROUNDHOOK_IS_CHECK_NORMAL_MATCH
Definition: AllBattlegroundScript.h:36

References ALLBATTLEGROUNDHOOK_IS_CHECK_NORMAL_MATCH, and CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE.

◆ IsCompletedCriteria()

bool ScriptMgr::IsCompletedCriteria ( AchievementMgr mgr,
AchievementCriteriaEntry const *  achievementCriteria,
AchievementEntry const *  achievement,
CriteriaProgress const *  progress 
)
28{
29 CALL_ENABLED_BOOLEAN_HOOKS(AchievementScript, ACHIEVEMENTHOOK_IS_COMPLETED_CRITERIA, !script->IsCompletedCriteria(mgr, achievementCriteria, achievement, progress));
30}
@ ACHIEVEMENTHOOK_IS_COMPLETED_CRITERIA
Definition: AchievementScript.h:29

References ACHIEVEMENTHOOK_IS_COMPLETED_CRITERIA, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ IsCustomBuildValuesUpdate()

bool ScriptMgr::IsCustomBuildValuesUpdate ( Unit const *  unit,
uint8  updateType,
ByteBuffer fieldBuffer,
Player const *  target,
uint16  index 
)
112{
113 CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(UnitScript, UNITHOOK_IS_CUSTOM_BUILD_VALUES_UPDATE, script->IsCustomBuildValuesUpdate(unit, updateType, fieldBuffer, target, index));
114}
@ UNITHOOK_IS_CUSTOM_BUILD_VALUES_UPDATE
Definition: UnitScript.h:40

References CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE, and UNITHOOK_IS_CUSTOM_BUILD_VALUES_UPDATE.

◆ IsNeedModHealPercent()

bool ScriptMgr::IsNeedModHealPercent ( Unit const *  unit,
AuraEffect auraEff,
float &  doneTotalMod,
SpellInfo const *  spellProto 
)
102{
103 CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_HEAL_PERCENT, !script->IsNeedModHealPercent(unit, auraEff, doneTotalMod, spellProto));
104}
@ UNITHOOK_IS_NEEDMOD_HEAL_PERCENT
Definition: UnitScript.h:38

References CALL_ENABLED_BOOLEAN_HOOKS, and UNITHOOK_IS_NEEDMOD_HEAL_PERCENT.

◆ IsNeedModMeleeDamagePercent()

bool ScriptMgr::IsNeedModMeleeDamagePercent ( Unit const *  unit,
AuraEffect auraEff,
float &  doneTotalMod,
SpellInfo const *  spellProto 
)
97{
98 CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_MELEE_DAMAGE_PERCENT, !script->IsNeedModMeleeDamagePercent(unit, auraEff, doneTotalMod, spellProto));
99}
@ UNITHOOK_IS_NEEDMOD_MELEE_DAMAGE_PERCENT
Definition: UnitScript.h:37

References CALL_ENABLED_BOOLEAN_HOOKS, and UNITHOOK_IS_NEEDMOD_MELEE_DAMAGE_PERCENT.

◆ IsNeedModSpellDamagePercent()

bool ScriptMgr::IsNeedModSpellDamagePercent ( Unit const *  unit,
AuraEffect auraEff,
float &  doneTotalMod,
SpellInfo const *  spellProto 
)
92{
93 CALL_ENABLED_BOOLEAN_HOOKS(UnitScript, UNITHOOK_IS_NEEDMOD_SPELL_DAMAGE_PERCENT, !script->IsNeedModSpellDamagePercent(unit, auraEff, doneTotalMod, spellProto));
94}
@ UNITHOOK_IS_NEEDMOD_SPELL_DAMAGE_PERCENT
Definition: UnitScript.h:36

References CALL_ENABLED_BOOLEAN_HOOKS, and UNITHOOK_IS_NEEDMOD_SPELL_DAMAGE_PERCENT.

◆ IsRealmCompleted()

bool ScriptMgr::IsRealmCompleted ( AchievementGlobalMgr const *  globalmgr,
AchievementEntry const *  achievement,
std::chrono::system_clock::time_point  completionTime 
)
33{
34 CALL_ENABLED_BOOLEAN_HOOKS(AchievementScript, ACHIEVEMENTHOOK_IS_REALM_COMPLETED, !script->IsRealmCompleted(globalmgr, achievement, completionTime));
35}
@ ACHIEVEMENTHOOK_IS_REALM_COMPLETED
Definition: AchievementScript.h:30

References ACHIEVEMENTHOOK_IS_REALM_COMPLETED, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ IsScriptScheduled()

bool ScriptMgr::IsScriptScheduled ( ) const
inline
533{ return _scheduledScripts > 0; }

References _scheduledScripts.

◆ LoadDatabase()

void ScriptMgr::LoadDatabase ( )
161{
162 uint32 oldMSTime = getMSTime();
163
164 sScriptSystemMgr->LoadScriptWaypoints();
165
166 // Add all scripts that must be loaded after db/maps
181
183
185
186 LOG_INFO("server.loading", ">> Loaded {} C++ scripts in {} ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
187 LOG_INFO("server.loading", " ");
188}
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:131
uint32 getMSTime()
Definition: Timer.h:103
#define sScriptSystemMgr
Definition: ScriptSystem.h:91
void FillSpellSummary()
Definition: ScriptMgr.cpp:236
uint32 GetScriptCount() const
Definition: ScriptMgr.h:129
void CheckIfScriptsInDatabaseExist()
Definition: ScriptMgr.cpp:190
static void AddALScripts()
Definition: ScriptMgr.h:764

References ScriptRegistry< TScript >::AddALScripts(), CheckIfScriptsInDatabaseExist(), FillSpellSummary(), getMSTime(), GetMSTimeDiffToNow(), GetScriptCount(), LOG_INFO, and sScriptSystemMgr.

◆ ModifyHealReceived()

void ScriptMgr::ModifyHealReceived ( Unit target,
Unit healer,
uint32 addHealth,
SpellInfo const *  spellInfo 
)
48{
49 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_MODIFY_HEAL_RECEIVED, script->ModifyHealReceived(target, healer, heal, spellInfo));
50}
@ UNITHOOK_MODIFY_HEAL_RECEIVED
Definition: UnitScript.h:31

References CALL_ENABLED_HOOKS, and UNITHOOK_MODIFY_HEAL_RECEIVED.

◆ ModifyMeleeDamage()

void ScriptMgr::ModifyMeleeDamage ( Unit target,
Unit attacker,
uint32 damage 
)
38{
39 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_MODIFY_MELEE_DAMAGE, script->ModifyMeleeDamage(target, attacker, damage));
40}
@ UNITHOOK_MODIFY_MELEE_DAMAGE
Definition: UnitScript.h:29

References CALL_ENABLED_HOOKS, and UNITHOOK_MODIFY_MELEE_DAMAGE.

◆ ModifyPeriodicDamageAurasTick()

void ScriptMgr::ModifyPeriodicDamageAurasTick ( Unit target,
Unit attacker,
uint32 damage,
SpellInfo const *  spellInfo 
)
33{
34 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_MODIFY_PERIODIC_DAMAGE_AURAS_TICK, script->ModifyPeriodicDamageAurasTick(target, attacker, damage, spellInfo));
35}
@ UNITHOOK_MODIFY_PERIODIC_DAMAGE_AURAS_TICK
Definition: UnitScript.h:28

References CALL_ENABLED_HOOKS, and UNITHOOK_MODIFY_PERIODIC_DAMAGE_AURAS_TICK.

◆ ModifySpellDamageTaken()

void ScriptMgr::ModifySpellDamageTaken ( Unit target,
Unit attacker,
int32 damage,
SpellInfo const *  spellInfo 
)
43{
44 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_MODIFY_SPELL_DAMAGE_TAKEN, script->ModifySpellDamageTaken(target, attacker, damage, spellInfo));
45}
@ UNITHOOK_MODIFY_SPELL_DAMAGE_TAKEN
Definition: UnitScript.h:30

References CALL_ENABLED_HOOKS, and UNITHOOK_MODIFY_SPELL_DAMAGE_TAKEN.

◆ NotAvoidSatisfy()

bool ScriptMgr::NotAvoidSatisfy ( Player player,
DungeonProgressionRequirements const *  ar,
uint32  target_map,
bool  report 
)
728{
729 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_NOT_AVOID_SATISFY, !script->NotAvoidSatisfy(player, ar, target_map, report));
730}
@ PLAYERHOOK_NOT_AVOID_SATISFY
Definition: PlayerScript.h:167

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_NOT_AVOID_SATISFY.

◆ NotSetArenaTeamInfoField()

bool ScriptMgr::NotSetArenaTeamInfoField ( Player player,
uint8  slot,
ArenaTeamInfoType  type,
uint32  value 
)
768{
769 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_NOT_SET_ARENA_TEAM_INFO_FIELD, !script->NotSetArenaTeamInfoField(player, slot, type, value));
770}
@ PLAYERHOOK_NOT_SET_ARENA_TEAM_INFO_FIELD
Definition: PlayerScript.h:175

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_NOT_SET_ARENA_TEAM_INFO_FIELD.

◆ NotVisibleGloballyFor()

bool ScriptMgr::NotVisibleGloballyFor ( Player player,
Player const *  u 
)
733{
734 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_NOT_VISIBLE_GLOBALLY_FOR, !script->NotVisibleGloballyFor(player, u));
735}
@ PLAYERHOOK_NOT_VISIBLE_GLOBALLY_FOR
Definition: PlayerScript.h:168

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_NOT_VISIBLE_GLOBALLY_FOR.

◆ OnAccountLogin()

void ScriptMgr::OnAccountLogin ( uint32  accountId)
23{
24 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_ACCOUNT_LOGIN, script->OnAccountLogin(accountId));
25}
@ ACCOUNTHOOK_ON_ACCOUNT_LOGIN
Definition: AccountScript.h:26

References ACCOUNTHOOK_ON_ACCOUNT_LOGIN, and CALL_ENABLED_HOOKS.

◆ OnAchievementComplete()

void ScriptMgr::OnAchievementComplete ( Player player,
AchievementEntry const *  achievement 
)
308{
309 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_ACHI_COMPLETE, script->OnAchiComplete(player, achievement));
310}
@ PLAYERHOOK_ON_ACHI_COMPLETE
Definition: PlayerScript.h:83

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_ACHI_COMPLETE.

◆ OnAchievementSave()

void ScriptMgr::OnAchievementSave ( CharacterDatabaseTransaction  trans,
Player player,
uint16  achiId,
CompletedAchievementData  achiData 
)
323{
324 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_ACHI_SAVE, script->OnAchiSave(trans, player, achiId, achiData));
325}
@ PLAYERHOOK_ON_ACHI_SAVE
Definition: PlayerScript.h:87

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_ACHI_SAVE.

◆ OnAddCreaturePassenger()

void ScriptMgr::OnAddCreaturePassenger ( Transport transport,
Creature creature 
)
34{
35 ASSERT(transport);
36 ASSERT(creature);
37
38 if (auto tempScript = ScriptRegistry<TransportScript>::GetScriptById(transport->GetScriptId()))
39 {
40 tempScript->OnAddCreaturePassenger(transport, creature);
41 }
42}

References ASSERT, and GameObject::GetScriptId().

◆ OnAddGroup()

void ScriptMgr::OnAddGroup ( BattlegroundQueue queue,
GroupQueueInfo ginfo,
uint32 index,
Player leader,
Group group,
BattlegroundTypeId  bgTypeId,
PvPDifficultyEntry const *  bracketEntry,
uint8  arenaType,
bool  isRated,
bool  isPremade,
uint32  arenaRating,
uint32  matchmakerRating,
uint32  arenaTeamId,
uint32  opponentsArenaTeamId 
)
63{
64 CALL_ENABLED_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_ADD_GROUP, script->OnAddGroup(queue, ginfo, index, leader, group, bgTypeId, bracketEntry, arenaType, isRated, isPremade, arenaRating, matchmakerRating, arenaTeamId, opponentsArenaTeamId));
65}
@ ALLBATTLEGROUNDHOOK_ON_ADD_GROUP
Definition: AllBattlegroundScript.h:34

References ALLBATTLEGROUNDHOOK_ON_ADD_GROUP, and CALL_ENABLED_HOOKS.

◆ OnAddPassenger() [1/2]

void ScriptMgr::OnAddPassenger ( Transport transport,
Player player 
)
23{
24 ASSERT(transport);
25 ASSERT(player);
26
27 if (auto tempScript = ScriptRegistry<TransportScript>::GetScriptById(transport->GetScriptId()))
28 {
29 tempScript->OnAddPassenger(transport, player);
30 }
31}

References ASSERT, and GameObject::GetScriptId().

◆ OnAddPassenger() [2/2]

void ScriptMgr::OnAddPassenger ( Vehicle veh,
Unit passenger,
int8  seatId 
)
68{
69 ASSERT(veh);
70 ASSERT(veh->GetBase()->IsCreature());
71 ASSERT(passenger);
72
74 {
75 tempScript->OnAddPassenger(veh, passenger, seatId);
76 }
77}
bool IsCreature() const
Definition: Object.h:201
Creature * ToCreature()
Definition: Object.h:202
Unit * GetBase() const
May be called from scripts.
Definition: Vehicle.h:37

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnAfterArenaRatingCalculation()

void ScriptMgr::OnAfterArenaRatingCalculation ( Battleground *const  bg,
int32 winnerMatchmakerChange,
int32 loserMatchmakerChange,
int32 winnerChange,
int32 loserChange 
)
61{
62 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_AFTER_ARENA_RATING_CALCULATION, script->OnAfterArenaRatingCalculation(bg, winnerMatchmakerChange, loserMatchmakerChange, winnerChange, loserChange));
63}
@ FORMULAHOOK_ON_AFTER_ARENA_RATING_CALCULATION
Definition: FormulaScript.h:33
Definition: FormulaScript.h:41

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_AFTER_ARENA_RATING_CALCULATION.

◆ OnAfterCalculateLootGroupAmount()

void ScriptMgr::OnAfterCalculateLootGroupAmount ( Player const *  player,
Loot loot,
uint16  lootMode,
uint32 groupAmount,
LootStore const &  store 
)
43{
44 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_AFTER_CALCULATE_LOOT_GROUP_AMOUNT, script->OnAfterCalculateLootGroupAmount(player, loot, lootMode, groupAmount, store));
45}
@ GLOBALHOOK_ON_AFTER_CALCULATE_LOOT_GROUP_AMOUNT
Definition: GlobalScript.h:32

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_AFTER_CALCULATE_LOOT_GROUP_AMOUNT.

◆ OnAfterConfigLoad()

void ScriptMgr::OnAfterConfigLoad ( bool  reload)
28{
29 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_AFTER_CONFIG_LOAD, script->OnAfterConfigLoad(reload));
30}
@ WORLDHOOK_ON_AFTER_CONFIG_LOAD
Definition: WorldScript.h:27
Definition: WorldScript.h:43

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_AFTER_CONFIG_LOAD.

◆ OnAfterCreatureLoot()

void ScriptMgr::OnAfterCreatureLoot ( Player player)
533{
534 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_CREATURE_LOOT, script->OnAfterCreatureLoot(player));
535}
@ PLAYERHOOK_ON_AFTER_CREATURE_LOOT
Definition: PlayerScript.h:203

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_CREATURE_LOOT.

◆ OnAfterCreatureLootMoney()

void ScriptMgr::OnAfterCreatureLootMoney ( Player player)
538{
539 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_CREATURE_LOOT_MONEY, script->OnAfterCreatureLootMoney(player));
540}
@ PLAYERHOOK_ON_AFTER_CREATURE_LOOT_MONEY
Definition: PlayerScript.h:204

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_CREATURE_LOOT_MONEY.

◆ OnAfterDatabaseLoadCreatureTemplates()

void ScriptMgr::OnAfterDatabaseLoadCreatureTemplates ( std::vector< CreatureTemplate * >  creatureTemplateStore)
28{
29 CALL_ENABLED_HOOKS(DatabaseScript, DATABASEHOOK_ON_AFTER_DATABASE_LOAD_CREATURETEMPLATES, script->OnAfterDatabaseLoadCreatureTemplates(creatureTemplates));
30}
@ DATABASEHOOK_ON_AFTER_DATABASE_LOAD_CREATURETEMPLATES
Definition: DatabaseScript.h:27
Definition: DatabaseScript.h:32

References CALL_ENABLED_HOOKS, and DATABASEHOOK_ON_AFTER_DATABASE_LOAD_CREATURETEMPLATES.

◆ OnAfterDatabasesLoaded()

void ScriptMgr::OnAfterDatabasesLoaded ( uint32  updateFlags)
23{
24 CALL_ENABLED_HOOKS(DatabaseScript, DATABASEHOOK_ON_AFTER_DATABASES_LOADED, script->OnAfterDatabasesLoaded(updateFlags));
25}
@ DATABASEHOOK_ON_AFTER_DATABASES_LOADED
Definition: DatabaseScript.h:26

References CALL_ENABLED_HOOKS, and DATABASEHOOK_ON_AFTER_DATABASES_LOADED.

◆ OnAfterGuardianInitStatsForLevel()

void ScriptMgr::OnAfterGuardianInitStatsForLevel ( Player player,
Guardian guardian 
)
438{
439 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_GUARDIAN_INIT_STATS_FOR_LEVEL, script->OnAfterGuardianInitStatsForLevel(player, guardian));
440}
@ PLAYERHOOK_ON_AFTER_GUARDIAN_INIT_STATS_FOR_LEVEL
Definition: PlayerScript.h:125

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_GUARDIAN_INIT_STATS_FOR_LEVEL.

◆ OnAfterInitializeLockedDungeons()

void ScriptMgr::OnAfterInitializeLockedDungeons ( Player player)
68{
69 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_AFTER_INITIALIZE_LOCKED_DUNGEONS, script->OnAfterInitializeLockedDungeons(player));
70}
@ GLOBALHOOK_ON_AFTER_INITIALIZE_LOCKED_DUNGEONS
Definition: GlobalScript.h:37

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_AFTER_INITIALIZE_LOCKED_DUNGEONS.

◆ OnAfterLootTemplateProcess()

void ScriptMgr::OnAfterLootTemplateProcess ( Loot loot,
LootTemplate const *  tab,
LootStore const &  store,
Player lootOwner,
bool  personal,
bool  noEmptyError,
uint16  lootMode 
)
93{
94 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_AFTER_LOOT_TEMPLATE_PROCESS, script->OnAfterLootTemplateProcess(loot, tab, store, lootOwner, personal, noEmptyError, lootMode));
95}
@ MISCHOOK_ON_AFTER_LOOT_TEMPLATE_PROCESS
Definition: MiscScript.h:41

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_AFTER_LOOT_TEMPLATE_PROCESS.

◆ OnAfterPlayerMoveItemFromInventory()

void ScriptMgr::OnAfterPlayerMoveItemFromInventory ( Player player,
Item it,
uint8  bag,
uint8  slot,
bool  update 
)
343{
344 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_MOVE_ITEM_FROM_INVENTORY, script->OnAfterMoveItemFromInventory(player, it, bag, slot, update));
345}
@ PLAYERHOOK_ON_AFTER_MOVE_ITEM_FROM_INVENTORY
Definition: PlayerScript.h:93

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_MOVE_ITEM_FROM_INVENTORY.

◆ OnAfterPlayerSetVisibleItemSlot()

void ScriptMgr::OnAfterPlayerSetVisibleItemSlot ( Player player,
uint8  slot,
Item item 
)
338{
339 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_SET_VISIBLE_ITEM_SLOT, script->OnAfterSetVisibleItemSlot(player, slot, item));
340}
@ PLAYERHOOK_ON_AFTER_SET_VISIBLE_ITEM_SLOT
Definition: PlayerScript.h:92

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_SET_VISIBLE_ITEM_SLOT.

◆ OnAfterRefCount()

void ScriptMgr::OnAfterRefCount ( Player const *  player,
Loot loot,
bool  canRate,
uint16  lootMode,
LootStoreItem LootStoreItem,
uint32 maxcount,
LootStore const &  store 
)
38{
39 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_AFTER_REF_COUNT, script->OnAfterRefCount(player, LootStoreItem, loot, canRate, lootMode, maxcount, store));
40}
@ GLOBALHOOK_ON_AFTER_REF_COUNT
Definition: GlobalScript.h:31
Definition: LootMgr.h:129

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_AFTER_REF_COUNT.

◆ OnAfterSpecSlotChanged()

void ScriptMgr::OnAfterSpecSlotChanged ( Player player,
uint8  newSlot 
)
113{
114 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_SPEC_SLOT_CHANGED, script->OnAfterSpecSlotChanged(player, newSlot));
115}
@ PLAYERHOOK_ON_AFTER_SPEC_SLOT_CHANGED
Definition: PlayerScript.h:44

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_SPEC_SLOT_CHANGED.

◆ OnAfterStoreOrEquipNewItem()

void ScriptMgr::OnAfterStoreOrEquipNewItem ( Player player,
uint32  vendorslot,
Item item,
uint8  count,
uint8  bag,
uint8  slot,
ItemTemplate const *  pProto,
Creature pVendor,
VendorItem const *  crItem,
bool  bStore 
)
453{
454 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_STORE_OR_EQUIP_NEW_ITEM, script->OnAfterStoreOrEquipNewItem(player, vendorslot, item, count, bag, slot, pProto, pVendor, crItem, bStore));
455}
@ PLAYERHOOK_ON_AFTER_STORE_OR_EQUIP_NEW_ITEM
Definition: PlayerScript.h:113

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_STORE_OR_EQUIP_NEW_ITEM.

◆ OnAfterUnloadAllMaps()

void ScriptMgr::OnAfterUnloadAllMaps ( )
73{
75}
@ WORLDHOOK_ON_AFTER_UNLOAD_ALL_MAPS
Definition: WorldScript.h:36

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_AFTER_UNLOAD_ALL_MAPS.

◆ OnAfterUpdateAttackPowerAndDamage()

void ScriptMgr::OnAfterUpdateAttackPowerAndDamage ( Player player,
float &  level,
float &  base_attPower,
float &  attPowerMod,
float &  attPowerMultiplier,
bool  ranged 
)
473{
474 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_UPDATE_ATTACK_POWER_AND_DAMAGE, script->OnAfterUpdateAttackPowerAndDamage(player, level, base_attPower, attPowerMod, attPowerMultiplier, ranged));
475}
@ PLAYERHOOK_ON_AFTER_UPDATE_ATTACK_POWER_AND_DAMAGE
Definition: PlayerScript.h:117

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_UPDATE_ATTACK_POWER_AND_DAMAGE.

◆ OnAfterUpdateEncounterState()

void ScriptMgr::OnAfterUpdateEncounterState ( Map map,
EncounterCreditType  type,
uint32  creditEntry,
Unit source,
Difficulty  difficulty_fixed,
DungeonEncounterList const *  encounters,
uint32  dungeonCompleted,
bool  updated 
)
78{
79 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_AFTER_UPDATE_ENCOUNTER_STATE, script->OnAfterUpdateEncounterState(map, type, creditEntry, source, difficulty_fixed, encounters, dungeonCompleted, updated));
80}
@ GLOBALHOOK_ON_AFTER_UPDATE_ENCOUNTER_STATE
Definition: GlobalScript.h:39

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_AFTER_UPDATE_ENCOUNTER_STATE.

◆ OnAfterUpdateMaxHealth()

void ScriptMgr::OnAfterUpdateMaxHealth ( Player player,
float &  value 
)
463{
464 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_UPDATE_MAX_HEALTH, script->OnAfterUpdateMaxHealth(player, value));
465}
@ PLAYERHOOK_ON_AFTER_UPDATE_MAX_HEALTH
Definition: PlayerScript.h:115

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_UPDATE_MAX_HEALTH.

◆ OnAfterUpdateMaxPower()

void ScriptMgr::OnAfterUpdateMaxPower ( Player player,
Powers power,
float &  value 
)
458{
459 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_AFTER_UPDATE_MAX_POWER, script->OnAfterUpdateMaxPower(player, power, value));
460}
@ PLAYERHOOK_ON_AFTER_UPDATE_MAX_POWER
Definition: PlayerScript.h:114

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_AFTER_UPDATE_MAX_POWER.

◆ OnAllowedForPlayerLootCheck()

bool ScriptMgr::OnAllowedForPlayerLootCheck ( Player const *  player,
ObjectGuid  source 
)
103{
104 CALL_ENABLED_BOOLEAN_HOOKS(GlobalScript, GLOBALHOOK_ON_ALLOWED_FOR_PLAYER_LOOT_CHECK, script->OnAllowedForPlayerLootCheck(player, source));
105}
@ GLOBALHOOK_ON_ALLOWED_FOR_PLAYER_LOOT_CHECK
Definition: GlobalScript.h:44

References CALL_ENABLED_BOOLEAN_HOOKS, and GLOBALHOOK_ON_ALLOWED_FOR_PLAYER_LOOT_CHECK.

◆ OnAllowedToLootContainerCheck()

bool ScriptMgr::OnAllowedToLootContainerCheck ( Player const *  player,
ObjectGuid  source 
)
108{
109 CALL_ENABLED_BOOLEAN_HOOKS(GlobalScript, GLOBALHOOK_ON_ALLOWED_TO_LOOT_CONTAINER_CHECK, script->OnAllowedToLootContainerCheck(player, source));
110}
@ GLOBALHOOK_ON_ALLOWED_TO_LOOT_CONTAINER_CHECK
Definition: GlobalScript.h:45

References CALL_ENABLED_BOOLEAN_HOOKS, and GLOBALHOOK_ON_ALLOWED_TO_LOOT_CONTAINER_CHECK.

◆ OnApplyAmmoBonuses()

void ScriptMgr::OnApplyAmmoBonuses ( Player player,
ItemTemplate const *  proto,
float &  currentAmmoDPS 
)
683{
684 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_APPLY_AMMO_BONUSES, script->OnApplyAmmoBonuses(player, proto, currentAmmoDPS));
685}
@ PLAYERHOOK_ON_APPLY_AMMO_BONUSES
Definition: PlayerScript.h:159

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_APPLY_AMMO_BONUSES.

◆ OnApplyEnchantmentItemModsBefore()

void ScriptMgr::OnApplyEnchantmentItemModsBefore ( Player player,
Item item,
EnchantmentSlot  slot,
bool  apply,
uint32  enchant_spell_id,
uint32 enchant_amount 
)
643{
644 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_APPLY_ENCHANTMENT_ITEM_MODS_BEFORE, script->OnApplyEnchantmentItemModsBefore(player, item, slot, apply, enchant_spell_id, enchant_amount));
645}
@ PLAYERHOOK_ON_APPLY_ENCHANTMENT_ITEM_MODS_BEFORE
Definition: PlayerScript.h:151

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_APPLY_ENCHANTMENT_ITEM_MODS_BEFORE.

◆ OnApplyItemModsBefore()

void ScriptMgr::OnApplyItemModsBefore ( Player player,
uint8  slot,
bool  apply,
uint8  itemProtoStatNumber,
uint32  statType,
int32 val 
)
638{
639 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_APPLY_ITEM_MODS_BEFORE, script->OnApplyItemModsBefore(player, slot, apply, itemProtoStatNumber, statType, val));
640}
@ PLAYERHOOK_ON_APPLY_ITEM_MODS_BEFORE
Definition: PlayerScript.h:150

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_APPLY_ITEM_MODS_BEFORE.

◆ OnAreaTrigger()

bool ScriptMgr::OnAreaTrigger ( Player player,
AreaTrigger const *  trigger 
)
25{
26 ASSERT(player);
27 ASSERT(trigger);
28
29 auto ret = IsValidBoolScript<ElunaScript>([&](ElunaScript* script)
30 {
31 return script->CanAreaTrigger(player, trigger);
32 });
33
34 if (ret && *ret)
35 {
36 return false;
37 }
38
39 auto tempScript = ScriptRegistry<AreaTriggerScript>::GetScriptById(sObjectMgr->GetAreaTriggerScriptId(trigger->entry));
40 return tempScript ? tempScript->OnTrigger(player, trigger) : false;
41}
Definition: ElunaScript.h:24
virtual bool CanAreaTrigger(Player *, AreaTrigger const *)
Definition: ElunaScript.h:39

◆ OnArenaQueueIdToArenaType()

void ScriptMgr::OnArenaQueueIdToArenaType ( const BattlegroundQueueTypeId  bgQueueTypeId,
uint8 ArenaType 
)
38{
39 CALL_ENABLED_HOOKS(ArenaTeamScript, ARENATEAMHOOK_ON_QUEUEID_TO_ARENA_TYPE, script->OnQueueIdToArenaType(bgQueueTypeId, ArenaType));
40}
@ ARENATEAMHOOK_ON_QUEUEID_TO_ARENA_TYPE
Definition: ArenaTeamScript.h:30
ArenaType
Definition: Battleground.h:211
Definition: ArenaTeamScript.h:36

References ARENATEAMHOOK_ON_QUEUEID_TO_ARENA_TYPE, and CALL_ENABLED_HOOKS.

◆ OnArenaStart()

void ScriptMgr::OnArenaStart ( Battleground *const  bg)
43{
45}
@ ARENAHOOK_ON_ARENA_START
Definition: ArenaScript.h:31

References ARENAHOOK_ON_ARENA_START, and CALL_ENABLED_HOOKS.

◆ OnArenaTypeIDToQueueID()

void ScriptMgr::OnArenaTypeIDToQueueID ( const BattlegroundTypeId  bgTypeId,
const uint8  arenaType,
uint32 queueTypeID 
)
33{
34 CALL_ENABLED_HOOKS(ArenaTeamScript, ARENATEAMHOOK_ON_TYPEID_TO_QUEUEID, script->OnTypeIDToQueueID(bgTypeId, arenaType, queueTypeID));
35}
@ ARENATEAMHOOK_ON_TYPEID_TO_QUEUEID
Definition: ArenaTeamScript.h:29

References ARENATEAMHOOK_ON_TYPEID_TO_QUEUEID, and CALL_ENABLED_HOOKS.

◆ OnAuctionAdd()

void ScriptMgr::OnAuctionAdd ( AuctionHouseObject ah,
AuctionEntry entry 
)
23{
24 ASSERT(ah);
25 ASSERT(entry);
26
28}
@ AUCTIONHOUSEHOOK_ON_AUCTION_ADD
Definition: AuctionHouseScript.h:26
Definition: AuctionHouseScript.h:41

References ASSERT, AUCTIONHOUSEHOOK_ON_AUCTION_ADD, and CALL_ENABLED_HOOKS.

◆ OnAuctionExpire()

void ScriptMgr::OnAuctionExpire ( AuctionHouseObject ah,
AuctionEntry entry 
)
47{
48 ASSERT(ah);
49 ASSERT(entry);
50
52}
@ AUCTIONHOUSEHOOK_ON_AUCTION_EXPIRE
Definition: AuctionHouseScript.h:29

References ASSERT, AUCTIONHOUSEHOOK_ON_AUCTION_EXPIRE, and CALL_ENABLED_HOOKS.

◆ OnAuctionRemove()

void ScriptMgr::OnAuctionRemove ( AuctionHouseObject ah,
AuctionEntry entry 
)
31{
32 ASSERT(ah);
33 ASSERT(entry);
34
36}
@ AUCTIONHOUSEHOOK_ON_AUCTION_REMOVE
Definition: AuctionHouseScript.h:27

References ASSERT, AUCTIONHOUSEHOOK_ON_AUCTION_REMOVE, and CALL_ENABLED_HOOKS.

◆ OnAuctionSuccessful()

void ScriptMgr::OnAuctionSuccessful ( AuctionHouseObject ah,
AuctionEntry entry 
)
39{
40 ASSERT(ah);
41 ASSERT(entry);
42
44}
@ AUCTIONHOUSEHOOK_ON_AUCTION_SUCCESSFUL
Definition: AuctionHouseScript.h:28

References ASSERT, AUCTIONHOUSEHOOK_ON_AUCTION_SUCCESSFUL, and CALL_ENABLED_HOOKS.

◆ OnAuraApply()

void ScriptMgr::OnAuraApply ( Unit unit,
Aura aura 
)
77{
78 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_AURA_APPLY, script->OnAuraApply(unit, aura));
79}
@ UNITHOOK_ON_AURA_APPLY
Definition: UnitScript.h:33

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_AURA_APPLY.

◆ OnAuraRemove()

void ScriptMgr::OnAuraRemove ( Unit unit,
AuraApplication aurApp,
AuraRemoveMode  mode 
)
82{
83 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_AURA_REMOVE, script->OnAuraRemove(unit, aurApp, mode));
84}
@ UNITHOOK_ON_AURA_REMOVE
Definition: UnitScript.h:34

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_AURA_REMOVE.

◆ OnBaseGainCalculation()

void ScriptMgr::OnBaseGainCalculation ( uint32 gain,
uint8  playerLevel,
uint8  mobLevel,
ContentLevels  content 
)
43{
44 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_BASE_GAIN_CALCULATION, script->OnBaseGainCalculation(gain, playerLevel, mobLevel, content));
45}
@ FORMULAHOOK_ON_BASE_GAIN_CALCULATION
Definition: FormulaScript.h:30

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_BASE_GAIN_CALCULATION.

◆ OnBattlegroundAddPlayer()

void ScriptMgr::OnBattlegroundAddPlayer ( Battleground bg,
Player player 
)
38{
40}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_ADD_PLAYER
Definition: AllBattlegroundScript.h:29

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_ADD_PLAYER, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundBeforeAddPlayer()

void ScriptMgr::OnBattlegroundBeforeAddPlayer ( Battleground bg,
Player player 
)
43{
45}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_BEFORE_ADD_PLAYER
Definition: AllBattlegroundScript.h:30

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_BEFORE_ADD_PLAYER, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundCreate()

void ScriptMgr::OnBattlegroundCreate ( Battleground bg)
103{
105}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_CREATE
Definition: AllBattlegroundScript.h:42

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_CREATE, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundDesertion()

void ScriptMgr::OnBattlegroundDesertion ( Player player,
BattlegroundDesertionType const  desertionType 
)
48{
49 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BATTLEGROUND_DESERTION, script->OnBattlegroundDesertion(player, desertionType));
50}
@ PLAYERHOOK_ON_BATTLEGROUND_DESERTION
Definition: PlayerScript.h:34

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BATTLEGROUND_DESERTION.

◆ OnBattlegroundDestroy()

void ScriptMgr::OnBattlegroundDestroy ( Battleground bg)
98{
100}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_DESTROY
Definition: AllBattlegroundScript.h:41

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_DESTROY, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundEnd()

void ScriptMgr::OnBattlegroundEnd ( Battleground bg,
TeamId  winnerTeamId 
)
93{
94 CALL_ENABLED_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END, script->OnBattlegroundEnd(bg, winnerTeam));
95}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END
Definition: AllBattlegroundScript.h:40

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundEndReward()

void ScriptMgr::OnBattlegroundEndReward ( Battleground bg,
Player player,
TeamId  winnerTeamId 
)
28{
29 CALL_ENABLED_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END_REWARD, script->OnBattlegroundEndReward(bg, player, winnerTeamId));
30}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END_REWARD
Definition: AllBattlegroundScript.h:27

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_END_REWARD, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundRemovePlayerAtLeave()

void ScriptMgr::OnBattlegroundRemovePlayerAtLeave ( Battleground bg,
Player player 
)
48{
50}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_REMOVE_PLAYER_AT_LEAVE
Definition: AllBattlegroundScript.h:31

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_REMOVE_PLAYER_AT_LEAVE, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundStart()

void ScriptMgr::OnBattlegroundStart ( Battleground bg)
23{
25}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_START
Definition: AllBattlegroundScript.h:26

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_START, and CALL_ENABLED_HOOKS.

◆ OnBattlegroundUpdate()

void ScriptMgr::OnBattlegroundUpdate ( Battleground bg,
uint32  diff 
)
33{
35}
@ ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_UPDATE
Definition: AllBattlegroundScript.h:28

References ALLBATTLEGROUNDHOOK_ON_BATTLEGROUND_UPDATE, and CALL_ENABLED_HOOKS.

◆ OnBeforeAccountDelete()

void ScriptMgr::OnBeforeAccountDelete ( uint32  accountId)
28{
29 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_BEFORE_ACCOUNT_DELETE, script->OnBeforeAccountDelete(accountId));
30}
@ ACCOUNTHOOK_ON_BEFORE_ACCOUNT_DELETE
Definition: AccountScript.h:27

References ACCOUNTHOOK_ON_BEFORE_ACCOUNT_DELETE, and CALL_ENABLED_HOOKS.

◆ OnBeforeAchievementComplete()

bool ScriptMgr::OnBeforeAchievementComplete ( Player player,
AchievementEntry const *  achievement 
)
303{
304 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_ACHI_COMPLETE, !script->OnBeforeAchiComplete(player, achievement));
305}
@ PLAYERHOOK_ON_BEFORE_ACHI_COMPLETE
Definition: PlayerScript.h:84

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_BEFORE_ACHI_COMPLETE.

◆ OnBeforeArenaCheckWinConditions()

bool ScriptMgr::OnBeforeArenaCheckWinConditions ( Battleground *const  bg)
38{
39 CALL_ENABLED_BOOLEAN_HOOKS(ArenaScript, ARENAHOOK_ON_BEFORE_CHECK_WIN_CONDITION, !script->OnBeforeArenaCheckWinConditions(bg));
40}
@ ARENAHOOK_ON_BEFORE_CHECK_WIN_CONDITION
Definition: ArenaScript.h:30

References ARENAHOOK_ON_BEFORE_CHECK_WIN_CONDITION, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player bidder,
uint32 bidder_accId,
bool &  sendMail 
)
80{
81 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_CANCELLED_TO_BIDDER_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail(auctionHouseMgr, auction, bidder, bidder_accId, sendMail));
82}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_CANCELLED_TO_BIDDER_MAIL
Definition: AuctionHouseScript.h:35

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_CANCELLED_TO_BIDDER_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionExpiredMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionExpiredMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player owner,
uint32 owner_accId,
bool &  sendNotification,
bool &  sendMail 
)
70{
71 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_EXPIRED_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionExpiredMail(auctionHouseMgr, auction, owner, owner_accId, sendNotification, sendMail));
72}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_EXPIRED_MAIL
Definition: AuctionHouseScript.h:33

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_EXPIRED_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player oldBidder,
uint32 oldBidder_accId,
Player newBidder,
uint32 newPrice,
bool &  sendNotification,
bool &  sendMail 
)
75{
76 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_OUTBIDDED_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(auctionHouseMgr, auction, oldBidder, oldBidder_accId, newBidder, newPrice, sendNotification, sendMail));
77}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_OUTBIDDED_MAIL
Definition: AuctionHouseScript.h:34

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_OUTBIDDED_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionSalePendingMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionSalePendingMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player owner,
uint32 owner_accId,
bool &  sendMail 
)
60{
61 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SALE_PENDING_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionSalePendingMail(auctionHouseMgr, auction, owner, owner_accId, sendMail));
62}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SALE_PENDING_MAIL
Definition: AuctionHouseScript.h:31

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SALE_PENDING_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player owner,
uint32 owner_accId,
uint32 profit,
bool &  sendNotification,
bool &  updateAchievementCriteria,
bool &  sendMail 
)
65{
66 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SUCCESSFUL_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail(auctionHouseMgr, auction, owner, owner_accId, profit, sendNotification, updateAchievementCriteria, sendMail));
67}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SUCCESSFUL_MAIL
Definition: AuctionHouseScript.h:32

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SUCCESSFUL_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrSendAuctionWonMail()

void ScriptMgr::OnBeforeAuctionHouseMgrSendAuctionWonMail ( AuctionHouseMgr auctionHouseMgr,
AuctionEntry auction,
Player bidder,
uint32 bidder_accId,
bool &  sendNotification,
bool &  updateAchievementCriteria,
bool &  sendMail 
)
55{
56 CALL_ENABLED_HOOKS(AuctionHouseScript, AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_WON_MAIL, script->OnBeforeAuctionHouseMgrSendAuctionWonMail(auctionHouseMgr, auction, bidder, bidder_accId, sendNotification, updateAchievementCriteria, sendMail));
57}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_WON_MAIL
Definition: AuctionHouseScript.h:30

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_WON_MAIL, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuctionHouseMgrUpdate()

void ScriptMgr::OnBeforeAuctionHouseMgrUpdate ( )
85{
87}
@ AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_UPDATE
Definition: AuctionHouseScript.h:36

References AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_UPDATE, and CALL_ENABLED_HOOKS.

◆ OnBeforeAuraRankForLevel()

void ScriptMgr::OnBeforeAuraRankForLevel ( SpellInfo const *  spellInfo,
SpellInfo const *  latestSpellInfo,
uint8  level 
)
68{
69 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_BEFORE_AURA_RANK_FOR_LEVEL, script->OnBeforeAuraRankForLevel(spellInfo, latestSpellInfo, level));
70}
@ ALLSPELLHOOK_ON_BEFORE_AURA_RANK_FOR_LEVEL
Definition: AllSpellScript.h:35

References ALLSPELLHOOK_ON_BEFORE_AURA_RANK_FOR_LEVEL, and CALL_ENABLED_HOOKS.

◆ OnBeforeBuyItemFromVendor()

void ScriptMgr::OnBeforeBuyItemFromVendor ( Player player,
ObjectGuid  vendorguid,
uint32  vendorslot,
uint32 item,
uint8  count,
uint8  bag,
uint8  slot 
)
448{
449 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_BUY_ITEM_FROM_VENDOR, script->OnBeforeBuyItemFromVendor(player, vendorguid, vendorslot, item, count, bag, slot));
450}
@ PLAYERHOOK_ON_BEFORE_BUY_ITEM_FROM_VENDOR
Definition: PlayerScript.h:111

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_BUY_ITEM_FROM_VENDOR.

◆ OnBeforeCheckCriteria()

void ScriptMgr::OnBeforeCheckCriteria ( AchievementMgr mgr,
AchievementCriteriaEntryList const *  achievementCriteriaList 
)
38{
39 CALL_ENABLED_HOOKS(AchievementScript, ACHIEVEMENTHOOK_ON_BEFORE_CHECK_CRITERIA, script->OnBeforeCheckCriteria(mgr, achievementCriteriaList));
40}
@ ACHIEVEMENTHOOK_ON_BEFORE_CHECK_CRITERIA
Definition: AchievementScript.h:31

References ACHIEVEMENTHOOK_ON_BEFORE_CHECK_CRITERIA, and CALL_ENABLED_HOOKS.

◆ OnBeforeChooseGraveyard()

void ScriptMgr::OnBeforeChooseGraveyard ( Player player,
TeamId  teamId,
bool  nearCorpse,
uint32 graveyardOverride 
)
808{
809 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_CHOOSE_GRAVEYARD, script->OnBeforeChooseGraveyard(player, teamId, nearCorpse, graveyardOverride));
810}
@ PLAYERHOOK_ON_BEFORE_CHOOSE_GRAVEYARD
Definition: PlayerScript.h:183

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_CHOOSE_GRAVEYARD.

◆ OnBeforeConfigLoad()

void ScriptMgr::OnBeforeConfigLoad ( bool  reload)
38{
39 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_BEFORE_CONFIG_LOAD, script->OnBeforeConfigLoad(reload));
40}
@ WORLDHOOK_ON_BEFORE_CONFIG_LOAD
Definition: WorldScript.h:29

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_BEFORE_CONFIG_LOAD.

◆ OnBeforeCreateInstanceScript()

void ScriptMgr::OnBeforeCreateInstanceScript ( InstanceMap instanceMap,
InstanceScript **  instanceData,
bool  load,
std::string  data,
uint32  completedEncounterMask 
)
268{
269 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_BEFORE_CREATE_INSTANCE_SCRIPT, script->OnBeforeCreateInstanceScript(instanceMap, instanceData, load, data, completedEncounterMask));
270}
@ ALLMAPHOOK_ON_BEFORE_CREATE_INSTANCE_SCRIPT
Definition: AllMapScript.h:28
Definition: AllMapScript.h:37

References ALLMAPHOOK_ON_BEFORE_CREATE_INSTANCE_SCRIPT, and CALL_ENABLED_HOOKS.

◆ OnBeforeCreatureSelectLevel()

void ScriptMgr::OnBeforeCreatureSelectLevel ( const CreatureTemplate cinfo,
Creature creature,
uint8 level 
)
53{
54 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
55 {
56 script->OnBeforeCreatureSelectLevel(cinfo, creature, level);
57 });
58}
virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate *, Creature *, uint8 &)
Definition: AllCreatureScript.h:33

References AllCreatureScript::OnBeforeCreatureSelectLevel().

◆ OnBeforeCriteriaProgress()

bool ScriptMgr::OnBeforeCriteriaProgress ( Player player,
AchievementCriteriaEntry const *  criteria 
)
313{
314 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_CRITERIA_PROGRESS, !script->OnBeforeCriteriaProgress(player, criteria));
315}
@ PLAYERHOOK_ON_BEFORE_CRITERIA_PROGRESS
Definition: PlayerScript.h:86

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_BEFORE_CRITERIA_PROGRESS.

◆ OnBeforeDropAddItem()

void ScriptMgr::OnBeforeDropAddItem ( Player const *  player,
Loot loot,
bool  canRate,
uint16  lootMode,
LootStoreItem LootStoreItem,
LootStore const &  store 
)
48{
49 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_BEFORE_DROP_ADD_ITEM, script->OnBeforeDropAddItem(player, loot, canRate, lootMode, LootStoreItem, store));
50}
@ GLOBALHOOK_ON_BEFORE_DROP_ADD_ITEM
Definition: GlobalScript.h:33

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_BEFORE_DROP_ADD_ITEM.

◆ OnBeforeFillQuestLootItem()

void ScriptMgr::OnBeforeFillQuestLootItem ( Player player,
LootItem item 
)
373{
374 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_FILL_QUEST_LOOT_ITEM, script->OnBeforeFillQuestLootItem(player, item));
375}
@ PLAYERHOOK_ON_BEFORE_FILL_QUEST_LOOT_ITEM
Definition: PlayerScript.h:101

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_FILL_QUEST_LOOT_ITEM.

◆ OnBeforeFinalizePlayerWorldSession()

void ScriptMgr::OnBeforeFinalizePlayerWorldSession ( uint32 cacheVersion)
78{
79 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_BEFORE_FINALIZE_PLAYER_WORLD_SESSION, script->OnBeforeFinalizePlayerWorldSession(cacheVersion));
80}
@ WORLDHOOK_ON_BEFORE_FINALIZE_PLAYER_WORLD_SESSION
Definition: WorldScript.h:37

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_BEFORE_FINALIZE_PLAYER_WORLD_SESSION.

◆ OnBeforeGuardianInitStatsForLevel()

void ScriptMgr::OnBeforeGuardianInitStatsForLevel ( Player player,
Guardian guardian,
CreatureTemplate const *  cinfo,
PetType petType 
)
433{
434 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_GUARDIAN_INIT_STATS_FOR_LEVEL, script->OnBeforeGuardianInitStatsForLevel(player, guardian, cinfo, petType));
435}
@ PLAYERHOOK_ON_BEFORE_GUARDIAN_INIT_STATS_FOR_LEVEL
Definition: PlayerScript.h:124

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_GUARDIAN_INIT_STATS_FOR_LEVEL.

◆ OnBeforeInitTalentForLevel()

void ScriptMgr::OnBeforeInitTalentForLevel ( Player player,
uint8 level,
uint32 talentPointsForLevel 
)
478{
479 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_INIT_TALENT_FOR_LEVEL, script->OnBeforeInitTalentForLevel(player, level, talentPointsForLevel));
480}
@ PLAYERHOOK_ON_BEFORE_INIT_TALENT_FOR_LEVEL
Definition: PlayerScript.h:118

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_INIT_TALENT_FOR_LEVEL.

◆ OnBeforeLoadPetFromDB()

void ScriptMgr::OnBeforeLoadPetFromDB ( Player player,
uint32 petentry,
uint32 petnumber,
bool &  current,
bool &  forceLoadFromDB 
)
443{
444 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_LOAD_PET_FROM_DB, script->OnBeforeLoadPetFromDB(player, petentry, petnumber, current, forceLoadFromDB));
445}
@ PLAYERHOOK_ON_BEFORE_LOAD_PET_FROM_DB
Definition: PlayerScript.h:126

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_LOAD_PET_FROM_DB.

◆ OnBeforeLootEqualChanced()

bool ScriptMgr::OnBeforeLootEqualChanced ( Player const *  player,
LootStoreItemList  EqualChanced,
Loot loot,
LootStore const &  store 
)
58{
59 CALL_ENABLED_BOOLEAN_HOOKS(GlobalScript, GLOBALHOOK_ON_BEFORE_LOOT_EQUAL_CHANCED, !script->OnBeforeLootEqualChanced(player, equalChanced, loot, store));
60}
@ GLOBALHOOK_ON_BEFORE_LOOT_EQUAL_CHANCED
Definition: GlobalScript.h:35

References CALL_ENABLED_BOOLEAN_HOOKS, and GLOBALHOOK_ON_BEFORE_LOOT_EQUAL_CHANCED.

◆ OnBeforeLootMoney()

void ScriptMgr::OnBeforeLootMoney ( Player player,
Loot loot 
)
123{
124 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_LOOT_MONEY, script->OnBeforeLootMoney(player, loot));
125}
@ PLAYERHOOK_ON_BEFORE_LOOT_MONEY
Definition: PlayerScript.h:48

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_LOOT_MONEY.

◆ OnBeforeMailDraftSendMailTo()

void ScriptMgr::OnBeforeMailDraftSendMailTo ( MailDraft mailDraft,
MailReceiver const &  receiver,
MailSender const &  sender,
MailCheckMask checked,
uint32 deliver_delay,
uint32 custom_expiration,
bool &  deleteMailItemsFromDB,
bool &  sendMail 
)
23{
24 CALL_ENABLED_HOOKS(MailScript, MAILHOOK_ON_BEFORE_MAIL_DRAFT_SEND_MAIL_TO, script->OnBeforeMailDraftSendMailTo(mailDraft, receiver, sender, checked, deliver_delay, custom_expiration, deleteMailItemsFromDB, sendMail));
25}
@ MAILHOOK_ON_BEFORE_MAIL_DRAFT_SEND_MAIL_TO
Definition: MailScript.h:26
Definition: MailScript.h:31

References CALL_ENABLED_HOOKS, and MAILHOOK_ON_BEFORE_MAIL_DRAFT_SEND_MAIL_TO.

◆ OnBeforeOpenItem()

bool ScriptMgr::OnBeforeOpenItem ( Player player,
Item item 
)
403{
404 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_OPEN_ITEM, !script->OnBeforeOpenItem(player, item));
405}
@ PLAYERHOOK_ON_BEFORE_OPEN_ITEM
Definition: PlayerScript.h:107

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_BEFORE_OPEN_ITEM.

◆ OnBeforePlayerDurabilityRepair()

void ScriptMgr::OnBeforePlayerDurabilityRepair ( Player player,
ObjectGuid  npcGUID,
ObjectGuid  itemGUID,
float &  discountMod,
uint8  guildBank 
)
23{
24 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_DURABILITY_REPAIR, script->OnBeforeDurabilityRepair(player, npcGUID, itemGUID, discountMod, guildBank));
25}
@ PLAYERHOOK_ON_BEFORE_DURABILITY_REPAIR
Definition: PlayerScript.h:110

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_DURABILITY_REPAIR.

◆ OnBeforePlayerLogout()

void ScriptMgr::OnBeforePlayerLogout ( Player player)
233{
234 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_LOGOUT, script->OnBeforeLogout(player));
235}
@ PLAYERHOOK_ON_BEFORE_LOGOUT
Definition: PlayerScript.h:68

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_LOGOUT.

◆ OnBeforePlayerQuestComplete()

bool ScriptMgr::OnBeforePlayerQuestComplete ( Player player,
uint32  quest_id 
)
483{
484 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_QUEST_COMPLETE, !script->OnBeforeQuestComplete(player, quest_id));
485}
@ PLAYERHOOK_ON_BEFORE_QUEST_COMPLETE
Definition: PlayerScript.h:108

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_BEFORE_QUEST_COMPLETE.

◆ OnBeforePlayerTeleport()

bool ScriptMgr::OnBeforePlayerTeleport ( Player player,
uint32  mapid,
float  x,
float  y,
float  z,
float  orientation,
uint32  options,
Unit target 
)
278{
279 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_TELEPORT, !script->OnBeforeTeleport(player, mapid, x, y, z, orientation, options, target));
280}
@ PLAYERHOOK_ON_BEFORE_TELEPORT
Definition: PlayerScript.h:78

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_BEFORE_TELEPORT.

◆ OnBeforePlayerUpdate()

void ScriptMgr::OnBeforePlayerUpdate ( Player player,
uint32  p_time 
)
213{
214 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_UPDATE, script->OnBeforeUpdate(player, p_time));
215}
@ PLAYERHOOK_ON_BEFORE_UPDATE
Definition: PlayerScript.h:45

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_UPDATE.

◆ OnBeforeRollMeleeOutcomeAgainst()

void ScriptMgr::OnBeforeRollMeleeOutcomeAgainst ( Unit const *  attacker,
Unit const *  victim,
WeaponAttackType  attType,
int32 attackerMaxSkillValueForLevel,
int32 victimMaxSkillValueForLevel,
int32 attackerWeaponSkill,
int32 victimDefenseSkill,
int32 crit_chance,
int32 miss_chance,
int32 dodge_chance,
int32 parry_chance,
int32 block_chance 
)
72{
73 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_BEFORE_ROLL_MELEE_OUTCOME_AGAINST, script->OnBeforeRollMeleeOutcomeAgainst(attacker, victim, attType, attackerMaxSkillValueForLevel, victimMaxSkillValueForLevel, attackerWeaponSkill, victimDefenseSkill, crit_chance, miss_chance, dodge_chance, parry_chance, block_chance));
74}
@ UNITHOOK_ON_BEFORE_ROLL_MELEE_OUTCOME_AGAINST
Definition: UnitScript.h:32

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_BEFORE_ROLL_MELEE_OUTCOME_AGAINST.

◆ OnBeforeSendChatMessage()

void ScriptMgr::OnBeforeSendChatMessage ( Player player,
uint32 type,
uint32 lang,
std::string &  msg 
)
173{
174 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE, script->OnBeforeSendChatMessage(player, type, lang, msg));
175}
@ PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE
Definition: PlayerScript.h:58

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_SEND_CHAT_MESSAGE.

◆ OnBeforeSendExitMessageArenaQueue()

bool ScriptMgr::OnBeforeSendExitMessageArenaQueue ( BattlegroundQueue queue,
GroupQueueInfo ginfo 
)
88{
90}
@ ALLBATTLEGROUNDHOOK_ON_BEFORE_SEND_EXIT_MESSAGE_ARENA_QUEUE
Definition: AllBattlegroundScript.h:39

References ALLBATTLEGROUNDHOOK_ON_BEFORE_SEND_EXIT_MESSAGE_ARENA_QUEUE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ OnBeforeSendJoinMessageArenaQueue()

bool ScriptMgr::OnBeforeSendJoinMessageArenaQueue ( BattlegroundQueue queue,
Player leader,
GroupQueueInfo ginfo,
PvPDifficultyEntry const *  bracketEntry,
bool  isRated 
)
83{
84 CALL_ENABLED_BOOLEAN_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_BEFORE_SEND_JOIN_MESSAGE_ARENA_QUEUE, !script->OnBeforeSendJoinMessageArenaQueue(queue, leader, ginfo, bracketEntry, isRated));
85}
@ ALLBATTLEGROUNDHOOK_ON_BEFORE_SEND_JOIN_MESSAGE_ARENA_QUEUE
Definition: AllBattlegroundScript.h:38

References ALLBATTLEGROUNDHOOK_ON_BEFORE_SEND_JOIN_MESSAGE_ARENA_QUEUE, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ OnBeforeSetBossState()

void ScriptMgr::OnBeforeSetBossState ( uint32  id,
EncounterState  newState,
EncounterState  oldState,
Map instance 
)

Called when any raid boss has their state updated (e.g. pull, reset, kill).

Careful checks for old- and newState are required, since it can fire multiple times and not only when combat starts/ends.

Parameters
idThe id of the boss in the [instance]
newStateThe new boss state to be applied to this boss
oldStateThe previously assigned state of this boss
instanceA pointer to the [map] object of the instance
132{
133 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_BEFORE_SET_BOSS_STATE, script->OnBeforeSetBossState(id, newState, oldState, instance));
134}
@ GLOBALHOOK_ON_BEFORE_SET_BOSS_STATE
Definition: GlobalScript.h:47

References CALL_ENABLED_HOOKS, GLOBALHOOK_ON_BEFORE_SET_BOSS_STATE, and instance().

◆ OnBeforeStoreOrEquipNewItem()

void ScriptMgr::OnBeforeStoreOrEquipNewItem ( Player player,
uint32  vendorslot,
uint32 item,
uint8  count,
uint8  bag,
uint8  slot,
ItemTemplate const *  pProto,
Creature pVendor,
VendorItem const *  crItem,
bool  bStore 
)
493{
494 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_STORE_OR_EQUIP_NEW_ITEM, script->OnBeforeStoreOrEquipNewItem(player, vendorslot, item, count, bag, slot, pProto, pVendor, crItem, bStore));
495}
@ PLAYERHOOK_ON_BEFORE_STORE_OR_EQUIP_NEW_ITEM
Definition: PlayerScript.h:112

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_STORE_OR_EQUIP_NEW_ITEM.

◆ OnBeforeTempSummonInitStats()

void ScriptMgr::OnBeforeTempSummonInitStats ( Player player,
TempSummon tempSummon,
uint32 duration 
)
428{
429 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_TEMP_SUMMON_INIT_STATS, script->OnBeforeTempSummonInitStats(player, tempSummon, duration));
430}
@ PLAYERHOOK_ON_BEFORE_TEMP_SUMMON_INIT_STATS
Definition: PlayerScript.h:123

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_TEMP_SUMMON_INIT_STATS.

◆ OnBeforeUpdateArenaPoints()

void ScriptMgr::OnBeforeUpdateArenaPoints ( ArenaTeam at,
std::map< ObjectGuid, uint32 > &  ap 
)
73{
74 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_BEFORE_UPDATE_ARENA_POINTS, script->OnBeforeUpdateArenaPoints(at, ap));
75}
@ GLOBALHOOK_ON_BEFORE_UPDATE_ARENA_POINTS
Definition: GlobalScript.h:38

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_BEFORE_UPDATE_ARENA_POINTS.

◆ OnBeforeUpdateAttackPowerAndDamage()

void ScriptMgr::OnBeforeUpdateAttackPowerAndDamage ( Player player,
float &  level,
float &  val2,
bool  ranged 
)
468{
469 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEFORE_UPDATE_ATTACK_POWER_AND_DAMAGE, script->OnBeforeUpdateAttackPowerAndDamage(player, level, val2, ranged));
470}
@ PLAYERHOOK_ON_BEFORE_UPDATE_ATTACK_POWER_AND_DAMAGE
Definition: PlayerScript.h:116

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEFORE_UPDATE_ATTACK_POWER_AND_DAMAGE.

◆ OnBeforeUpdatingPersonalRating()

void ScriptMgr::OnBeforeUpdatingPersonalRating ( int32 mod,
uint32  type 
)
66{
67 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_BEFORE_UPDATING_PERSONAL_RATING, script->OnBeforeUpdatingPersonalRating(mod, type));
68}
@ FORMULAHOOK_ON_BEFORE_UPDATING_PERSONAL_RATING
Definition: FormulaScript.h:34

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_BEFORE_UPDATING_PERSONAL_RATING.

◆ OnBeforeWorldInitialized()

void ScriptMgr::OnBeforeWorldInitialized ( )
83{
84 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_BEFORE_WORLD_INITIALIZED, script->OnBeforeWorldInitialized());
85}
@ WORLDHOOK_ON_BEFORE_WORLD_INITIALIZED
Definition: WorldScript.h:38

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_BEFORE_WORLD_INITIALIZED.

◆ OnBeforeWorldObjectSetPhaseMask()

void ScriptMgr::OnBeforeWorldObjectSetPhaseMask ( WorldObject const *  worldObject,
uint32 oldPhaseMask,
uint32 newPhaseMask,
bool &  useCombinedPhases,
bool &  update 
)
83{
84 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_BEFORE_WORLDOBJECT_SET_PHASEMASK, script->OnBeforeWorldObjectSetPhaseMask(worldObject, oldPhaseMask, newPhaseMask, useCombinedPhases, update));
85}
@ GLOBALHOOK_ON_BEFORE_WORLDOBJECT_SET_PHASEMASK
Definition: GlobalScript.h:40

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_BEFORE_WORLDOBJECT_SET_PHASEMASK.

◆ OnCalcMaxDuration()

void ScriptMgr::OnCalcMaxDuration ( Aura const *  aura,
int32 maxDuration 
)
23{
24 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_CALC_MAX_DURATION, script->OnCalcMaxDuration(aura, maxDuration));
25}
@ ALLSPELLHOOK_ON_CALC_MAX_DURATION
Definition: AllSpellScript.h:26

References ALLSPELLHOOK_ON_CALC_MAX_DURATION, and CALL_ENABLED_HOOKS.

◆ OnCalculateMaxTalentPointsForLevel()

void ScriptMgr::OnCalculateMaxTalentPointsForLevel ( Pet pet,
uint8  level,
uint8 points 
)
28{
29 CALL_ENABLED_HOOKS(PetScript, PETHOOK_ON_CALCULATE_MAX_TALENT_POINTS_FOR_LEVEL, script->OnCalculateMaxTalentPointsForLevel(pet, level, points));
30}
@ PETHOOK_ON_CALCULATE_MAX_TALENT_POINTS_FOR_LEVEL
Definition: PetScript.h:27

References CALL_ENABLED_HOOKS, and PETHOOK_ON_CALCULATE_MAX_TALENT_POINTS_FOR_LEVEL.

◆ OnCalculateTalentsPoints()

void ScriptMgr::OnCalculateTalentsPoints ( Player const *  player,
uint32 talentPointsForLevel 
)
58{
59 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CALCULATE_TALENTS_POINTS, script->OnCalculateTalentsPoints(player, talentPointsForLevel));
60}
@ PLAYERHOOK_ON_CALCULATE_TALENTS_POINTS
Definition: PlayerScript.h:31

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CALCULATE_TALENTS_POINTS.

◆ OnCanPlayerFlyInZone()

bool ScriptMgr::OnCanPlayerFlyInZone ( Player player,
uint32  mapId,
uint32  zoneId,
SpellInfo const *  bySpell 
)
68{
69 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_CAN_PLAYER_FLY_IN_ZONE, !script->OnCanPlayerFlyInZone(player, mapId, zoneId, bySpell));
70}
@ PLAYERHOOK_ON_CAN_PLAYER_FLY_IN_ZONE
Definition: PlayerScript.h:194

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_CAN_PLAYER_FLY_IN_ZONE.

◆ OnCastItemCombatSpell()

bool ScriptMgr::OnCastItemCombatSpell ( Player player,
Unit victim,
SpellInfo const *  spellInfo,
Item item 
)
103{
104 ASSERT(player);
105 ASSERT(victim);
106 ASSERT(spellInfo);
107 ASSERT(item);
108
110 return tempScript ? tempScript->OnCastItemCombatSpell(player, victim, spellInfo, item) : true;
111}
uint32 GetScriptId() const
Definition: Item.h:364

References ASSERT, ScriptRegistry< TScript >::GetScriptById(), and Item::GetScriptId().

◆ OnColorCodeCalculation()

void ScriptMgr::OnColorCodeCalculation ( XPColorChar color,
uint8  playerLevel,
uint8  mobLevel 
)
33{
34 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_COLOR_CODE_CALCULATION, script->OnColorCodeCalculation(color, playerLevel, mobLevel));
35}
@ FORMULAHOOK_ON_COLOR_CODE_CALCULATION
Definition: FormulaScript.h:28

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_COLOR_CODE_CALCULATION.

◆ OnConditionCheck()

bool ScriptMgr::OnConditionCheck ( Condition condition,
ConditionSourceInfo sourceInfo 
)
22{
23 ASSERT(condition);
24
25 auto tempScript = ScriptRegistry<ConditionScript>::GetScriptById(condition->ScriptId);
26 return tempScript ? tempScript->OnConditionCheck(condition, sourceInfo) : true;
27}
uint32 ScriptId
Definition: ConditionMgr.h:207

References ASSERT, ScriptRegistry< TScript >::GetScriptById(), and Condition::ScriptId.

◆ OnConstructGroup()

void ScriptMgr::OnConstructGroup ( Group origin)
43{
44 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_CONSTRUCT_GROUP, script->OnConstructGroup(origin));
45}
@ MISCHOOK_ON_CONSTRUCT_GROUP
Definition: MiscScript.h:31

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_CONSTRUCT_GROUP.

◆ OnConstructInstanceSave()

void ScriptMgr::OnConstructInstanceSave ( InstanceSave origin)
53{
54 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_CONSTRUCT_INSTANCE_SAVE, script->OnConstructInstanceSave(origin));
55}
@ MISCHOOK_ON_CONSTRUCT_INSTANCE_SAVE
Definition: MiscScript.h:33

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_CONSTRUCT_INSTANCE_SAVE.

◆ OnConstructObject()

void ScriptMgr::OnConstructObject ( Object origin)
23{
24 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_CONSTRUCT_OBJECT, script->OnConstructObject(origin));
25}
@ MISCHOOK_ON_CONSTRUCT_OBJECT
Definition: MiscScript.h:27

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_CONSTRUCT_OBJECT.

◆ OnConstructPlayer()

void ScriptMgr::OnConstructPlayer ( Player origin)
33{
34 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_CONSTRUCT_PLAYER, script->OnConstructPlayer(origin));
35}
@ MISCHOOK_ON_CONSTRUCT_PLAYER
Definition: MiscScript.h:29

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_CONSTRUCT_PLAYER.

◆ OnCreate()

void ScriptMgr::OnCreate ( Group group,
Player leader 
)
63{
64 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_CREATE, script->OnCreate(group, leader));
65}
@ GROUPHOOK_ON_CREATE
Definition: GroupScript.h:33

References CALL_ENABLED_HOOKS, and GROUPHOOK_ON_CREATE.

◆ OnCreateItem()

void ScriptMgr::OnCreateItem ( Player player,
Item item,
uint32  count 
)
383{
384 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CREATE_ITEM, script->OnCreateItem(player, item, count));
385}
@ PLAYERHOOK_ON_CREATE_ITEM
Definition: PlayerScript.h:103

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CREATE_ITEM.

◆ OnCreateMap()

void ScriptMgr::OnCreateMap ( Map map)
88{
89 ASSERT(map);
90
92
93 ForeachMaps<WorldMapScript>(map,
94 [&](WorldMapScript* script)
95 {
96 script->OnCreate(map);
97 });
98
99 ForeachMaps<InstanceMapScript>(map,
100 [&](InstanceMapScript* script)
101 {
102 script->OnCreate((InstanceMap*)map);
103 });
104
105 ForeachMaps<BattlegroundMapScript>(map,
106 [&](BattlegroundMapScript* script)
107 {
108 script->OnCreate((BattlegroundMap*)map);
109 });
110}
@ ALLMAPHOOK_ON_CREATE_MAP
Definition: AllMapScript.h:30
Definition: Map.h:819
Definition: Map.h:853
Definition: BattlegroundMapScript.h:24
Definition: InstanceMapScript.h:24
Definition: WorldMapScript.h:24
virtual void OnCreate(TMap *)
Definition: ScriptObject.h:96

References ALLMAPHOOK_ON_CREATE_MAP, ASSERT, CALL_ENABLED_HOOKS, and MapScript< TMap >::OnCreate().

◆ OnCreatureAddWorld()

void ScriptMgr::OnCreatureAddWorld ( Creature creature)
23{
24 ASSERT(creature);
25
26 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
27 {
28 script->OnCreatureAddWorld(creature);
29 });
30}
virtual void OnCreatureAddWorld(Creature *)
This hook runs after add creature in world.
Definition: AllCreatureScript.h:43

References ASSERT, and AllCreatureScript::OnCreatureAddWorld().

◆ OnCreatureKill()

void ScriptMgr::OnCreatureKill ( Player killer,
Creature killed 
)
83{
84 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CREATURE_KILL, script->OnCreatureKill(killer, killed));
85}
@ PLAYERHOOK_ON_CREATURE_KILL
Definition: PlayerScript.h:38

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CREATURE_KILL.

◆ OnCreatureKilledByPet()

void ScriptMgr::OnCreatureKilledByPet ( Player petOwner,
Creature killed 
)
88{
89 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CREATURE_KILLED_BY_PET, script->OnCreatureKilledByPet(petOwner, killed));
90}
@ PLAYERHOOK_ON_CREATURE_KILLED_BY_PET
Definition: PlayerScript.h:39

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CREATURE_KILLED_BY_PET.

◆ OnCreatureRemoveWorld()

void ScriptMgr::OnCreatureRemoveWorld ( Creature creature)
33{
34 ASSERT(creature);
35
36 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
37 {
38 script->OnCreatureRemoveWorld(creature);
39 });
40}
virtual void OnCreatureRemoveWorld(Creature *)
This hook runs after remove creature in world.
Definition: AllCreatureScript.h:50

References ASSERT, and AllCreatureScript::OnCreatureRemoveWorld().

◆ OnCreatureSaveToDB()

void ScriptMgr::OnCreatureSaveToDB ( Creature creature)
43{
44 ASSERT(creature);
45
46 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
47 {
48 script->OnCreatureSaveToDB(creature);
49 });
50}
virtual void OnCreatureSaveToDB(Creature *)
This hook runs after creature has been saved to DB.
Definition: AllCreatureScript.h:57

References ASSERT, and AllCreatureScript::OnCreatureSaveToDB().

◆ OnCreatureUpdate()

void ScriptMgr::OnCreatureUpdate ( Creature creature,
uint32  diff 
)
184{
185 ASSERT(creature);
186
187 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
188 {
189 script->OnAllCreatureUpdate(creature, diff);
190 });
191
192 if (auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId()))
193 {
194 tempScript->OnUpdate(creature, diff);
195 }
196}
virtual void OnAllCreatureUpdate(Creature *, uint32)
Definition: AllCreatureScript.h:30

References ASSERT, Creature::GetScriptId(), and AllCreatureScript::OnAllCreatureUpdate().

◆ OnCriteriaCheck()

bool ScriptMgr::OnCriteriaCheck ( uint32  scriptId,
Player source,
Unit target,
uint32  criteria_id 
)
22{
23 ASSERT(source);
24 // target can be nullptr.
25
27 return tempScript ? tempScript->OnCheck(source, target, criteria_id) : false;
28}

References ASSERT, and ScriptRegistry< TScript >::GetScriptById().

◆ OnCriteriaProgress()

void ScriptMgr::OnCriteriaProgress ( Player player,
AchievementCriteriaEntry const *  criteria 
)
318{
319 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CRITERIA_PROGRESS, script->OnCriteriaProgress(player, criteria));
320}
@ PLAYERHOOK_ON_CRITERIA_PROGRESS
Definition: PlayerScript.h:85

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CRITERIA_PROGRESS.

◆ OnCriteriaSave()

void ScriptMgr::OnCriteriaSave ( CharacterDatabaseTransaction  trans,
Player player,
uint16  critId,
CriteriaProgress  criteriaData 
)
328{
329 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CRITERIA_SAVE, script->OnCriteriaSave(trans, player, critId, criteriaData));
330}
@ PLAYERHOOK_ON_CRITERIA_SAVE
Definition: PlayerScript.h:88

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CRITERIA_SAVE.

◆ OnCustomScalingStatValue()

void ScriptMgr::OnCustomScalingStatValue ( Player player,
ItemTemplate const *  proto,
uint32 statType,
int32 val,
uint8  itemProtoStatNumber,
uint32  ScalingStatValue,
ScalingStatValuesEntry const *  ssv 
)
633{
634 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE, script->OnCustomScalingStatValue(player, proto, statType, val, itemProtoStatNumber, ScalingStatValue, ssv));
635}
@ PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE
Definition: PlayerScript.h:149

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE.

◆ OnCustomScalingStatValueBefore()

void ScriptMgr::OnCustomScalingStatValueBefore ( Player player,
ItemTemplate const *  proto,
uint8  slot,
bool  apply,
uint32 CustomScalingStatValue 
)
628{
629 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE_BEFORE, script->OnCustomScalingStatValueBefore(player, proto, slot, apply, CustomScalingStatValue));
630}
@ PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE_BEFORE
Definition: PlayerScript.h:148

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CUSTOM_SCALING_STAT_VALUE_BEFORE.

◆ OnDamage()

void ScriptMgr::OnDamage ( Unit attacker,
Unit victim,
uint32 damage 
)
28{
29 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_DAMAGE, script->OnDamage(attacker, victim, damage));
30}
@ UNITHOOK_ON_DAMAGE
Definition: UnitScript.h:27

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_DAMAGE.

◆ OnDeleteFromDB()

void ScriptMgr::OnDeleteFromDB ( CharacterDatabaseTransaction  trans,
uint32  guid 
)
563{
564 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DELETE_FROM_DB, script->OnDeleteFromDB(trans, guid));
565}
@ PLAYERHOOK_ON_DELETE_FROM_DB
Definition: PlayerScript.h:137

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_DELETE_FROM_DB.

◆ OnDestroyInstance()

void ScriptMgr::OnDestroyInstance ( MapInstanced mapInstanced,
Map map 
)
273{
274 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_DESTROY_INSTANCE, script->OnDestroyInstance(mapInstanced, map));
275}
@ ALLMAPHOOK_ON_DESTROY_INSTANCE
Definition: AllMapScript.h:29

References ALLMAPHOOK_ON_DESTROY_INSTANCE, and CALL_ENABLED_HOOKS.

◆ OnDestroyMap()

void ScriptMgr::OnDestroyMap ( Map map)
113{
114 ASSERT(map);
115
116 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_DESTROY_MAP, script->OnDestroyMap(map));
117
118 ForeachMaps<WorldMapScript>(map,
119 [&](WorldMapScript* script)
120 {
121 script->OnDestroy(map);
122 });
123
124 ForeachMaps<InstanceMapScript>(map,
125 [&](InstanceMapScript* script)
126 {
127 script->OnDestroy((InstanceMap*)map);
128 });
129
130 ForeachMaps<BattlegroundMapScript>(map,
131 [&](BattlegroundMapScript* script)
132 {
133 script->OnDestroy((BattlegroundMap*)map);
134 });
135}
@ ALLMAPHOOK_ON_DESTROY_MAP
Definition: AllMapScript.h:31
virtual void OnDestroy(TMap *)
Definition: ScriptObject.h:99

References ALLMAPHOOK_ON_DESTROY_MAP, ASSERT, CALL_ENABLED_HOOKS, and MapScript< TMap >::OnDestroy().

◆ OnDestructGroup()

void ScriptMgr::OnDestructGroup ( Group origin)
48{
49 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_DESTRUCT_GROUP, script->OnDestructGroup(origin));
50}
@ MISCHOOK_ON_DESTRUCT_GROUP
Definition: MiscScript.h:32

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_DESTRUCT_GROUP.

◆ OnDestructInstanceSave()

void ScriptMgr::OnDestructInstanceSave ( InstanceSave origin)
58{
59 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_DESTRUCT_INSTANCE_SAVE, script->OnDestructInstanceSave(origin));
60}
@ MISCHOOK_ON_DESTRUCT_INSTANCE_SAVE
Definition: MiscScript.h:34

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_DESTRUCT_INSTANCE_SAVE.

◆ OnDestructObject()

void ScriptMgr::OnDestructObject ( Object origin)
28{
29 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_DESTRUCT_OBJECT, script->OnDestructObject(origin));
30}
@ MISCHOOK_ON_DESTRUCT_OBJECT
Definition: MiscScript.h:28

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_DESTRUCT_OBJECT.

◆ OnDestructPlayer()

void ScriptMgr::OnDestructPlayer ( Player origin)
38{
39 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_DESTRUCT_PLAYER, script->OnDestructPlayer(origin));
40}
@ MISCHOOK_ON_DESTRUCT_PLAYER
Definition: MiscScript.h:30

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_DESTRUCT_PLAYER.

◆ OnDisplayIdChange()

void ScriptMgr::OnDisplayIdChange ( Unit unit,
uint32  displayId 
)
132{
133 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_DISPLAYID_CHANGE, script->OnDisplayIdChange(unit, displayId));
134}
@ UNITHOOK_ON_DISPLAYID_CHANGE
Definition: UnitScript.h:44

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_DISPLAYID_CHANGE.

◆ OnDummyEffect() [1/3]

void ScriptMgr::OnDummyEffect ( WorldObject caster,
uint32  spellID,
SpellEffIndex  effIndex,
Creature creatureTarget 
)
78{
79 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_DUMMY_EFFECT_CREATURE, script->OnDummyEffect(caster, spellID, effIndex, creatureTarget));
80}
@ ALLSPELLHOOK_ON_DUMMY_EFFECT_CREATURE
Definition: AllSpellScript.h:37

References ALLSPELLHOOK_ON_DUMMY_EFFECT_CREATURE, and CALL_ENABLED_HOOKS.

◆ OnDummyEffect() [2/3]

void ScriptMgr::OnDummyEffect ( WorldObject caster,
uint32  spellID,
SpellEffIndex  effIndex,
GameObject gameObjTarget 
)
73{
74 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_DUMMY_EFFECT_GAMEOBJECT, script->OnDummyEffect(caster, spellID, effIndex, gameObjTarget));
75}
@ ALLSPELLHOOK_ON_DUMMY_EFFECT_GAMEOBJECT
Definition: AllSpellScript.h:36

References ALLSPELLHOOK_ON_DUMMY_EFFECT_GAMEOBJECT, and CALL_ENABLED_HOOKS.

◆ OnDummyEffect() [3/3]

void ScriptMgr::OnDummyEffect ( WorldObject caster,
uint32  spellID,
SpellEffIndex  effIndex,
Item itemTarget 
)
83{
84 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_DUMMY_EFFECT_ITEM, script->OnDummyEffect(caster, spellID, effIndex, itemTarget));
85}
@ ALLSPELLHOOK_ON_DUMMY_EFFECT_ITEM
Definition: AllSpellScript.h:38

References ALLSPELLHOOK_ON_DUMMY_EFFECT_ITEM, and CALL_ENABLED_HOOKS.

◆ OnDynamicObjectUpdate()

void ScriptMgr::OnDynamicObjectUpdate ( DynamicObject dynobj,
uint32  diff 
)
22{
23 ASSERT(dynobj);
24
25 for (auto const& [scriptID, script] : ScriptRegistry<DynamicObjectScript>::ScriptPointerList)
26 {
27 script->OnUpdate(dynobj, diff);
28 }
29}

References ASSERT.

◆ OnEmailChange()

void ScriptMgr::OnEmailChange ( uint32  accountId)
43{
44 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_EMAIL_CHANGE, script->OnEmailChange(accountId));
45}
@ ACCOUNTHOOK_ON_EMAIL_CHANGE
Definition: AccountScript.h:30

References ACCOUNTHOOK_ON_EMAIL_CHANGE, and CALL_ENABLED_HOOKS.

◆ OnEquip()

void ScriptMgr::OnEquip ( Player player,
Item it,
uint8  bag,
uint8  slot,
bool  update 
)
348{
349 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_EQUIP, script->OnEquip(player, it, bag, slot, update));
350}
@ PLAYERHOOK_ON_EQUIP
Definition: PlayerScript.h:94

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_EQUIP.

◆ OnFailedAccountLogin()

void ScriptMgr::OnFailedAccountLogin ( uint32  accountId)
38{
39 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_FAILED_ACCOUNT_LOGIN, script->OnFailedAccountLogin(accountId));
40}
@ ACCOUNTHOOK_ON_FAILED_ACCOUNT_LOGIN
Definition: AccountScript.h:29

References ACCOUNTHOOK_ON_FAILED_ACCOUNT_LOGIN, and CALL_ENABLED_HOOKS.

◆ OnFailedEmailChange()

void ScriptMgr::OnFailedEmailChange ( uint32  accountId)
48{
49 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_FAILED_EMAIL_CHANGE, script->OnFailedEmailChange(accountId));
50}
@ ACCOUNTHOOK_ON_FAILED_EMAIL_CHANGE
Definition: AccountScript.h:31

References ACCOUNTHOOK_ON_FAILED_EMAIL_CHANGE, and CALL_ENABLED_HOOKS.

◆ OnFailedPasswordChange()

void ScriptMgr::OnFailedPasswordChange ( uint32  accountId)
58{
59 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_FAILED_PASSWORD_CHANGE, script->OnFailedPasswordChange(accountId));
60}
@ ACCOUNTHOOK_ON_FAILED_PASSWORD_CHANGE
Definition: AccountScript.h:33

References ACCOUNTHOOK_ON_FAILED_PASSWORD_CHANGE, and CALL_ENABLED_HOOKS.

◆ OnFfaPvpStateUpdate() [1/2]

void ScriptMgr::OnFfaPvpStateUpdate ( Creature creature,
bool  InPvp 
)
176{
177 ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
178 {
179 script->OnFfaPvpStateUpdate(creature, InPvp);
180 });
181}
virtual void OnFfaPvpStateUpdate(Creature *, bool)
Definition: AllCreatureScript.h:104

References AllCreatureScript::OnFfaPvpStateUpdate().

◆ OnFfaPvpStateUpdate() [2/2]

void ScriptMgr::OnFfaPvpStateUpdate ( Player player,
bool  result 
)
753{
754 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_FFA_PVP_STATE_UPDATE, script->OnFfaPvpStateUpdate(player, result));
755}
@ PLAYERHOOK_ON_FFA_PVP_STATE_UPDATE
Definition: PlayerScript.h:172

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_FFA_PVP_STATE_UPDATE.

◆ OnFirstLogin()

void ScriptMgr::OnFirstLogin ( Player player)
408{
409 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_FIRST_LOGIN, script->OnFirstLogin(player));
410}
@ PLAYERHOOK_ON_FIRST_LOGIN
Definition: PlayerScript.h:119

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_FIRST_LOGIN.

◆ OnGainCalculation()

void ScriptMgr::OnGainCalculation ( uint32 gain,
Player player,
Unit unit 
)
48{
49 ASSERT(player);
50 ASSERT(unit);
51
52 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_GAIN_CALCULATION, script->OnGainCalculation(gain, player, unit));
53}
@ FORMULAHOOK_ON_GAIN_CALCULATION
Definition: FormulaScript.h:31

References ASSERT, CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_GAIN_CALCULATION.

◆ OnGameEventCheck()

void ScriptMgr::OnGameEventCheck ( uint16  EventID)
33{
35}
@ GAMEEVENTHOOK_ON_EVENT_CHECK
Definition: GameEventScript.h:28
Definition: GameEventScript.h:33

References CALL_ENABLED_HOOKS, and GAMEEVENTHOOK_ON_EVENT_CHECK.

◆ OnGameEventStart()

void ScriptMgr::OnGameEventStart ( uint16  EventID)
23{
25}
@ GAMEEVENTHOOK_ON_START
Definition: GameEventScript.h:26

References CALL_ENABLED_HOOKS, and GAMEEVENTHOOK_ON_START.

◆ OnGameEventStop()

void ScriptMgr::OnGameEventStop ( uint16  EventID)
28{
30}
@ GAMEEVENTHOOK_ON_STOP
Definition: GameEventScript.h:27

References CALL_ENABLED_HOOKS, and GAMEEVENTHOOK_ON_STOP.

◆ OnGameObjectAddWorld()

void ScriptMgr::OnGameObjectAddWorld ( GameObject go)
23{
24 ASSERT(go);
25
26 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
27 {
28 script->OnGameObjectAddWorld(go);
29 });
30}
virtual void OnGameObjectAddWorld(GameObject *)
This hook runs after add game object in world.
Definition: AllGameObjectScript.h:34

References ASSERT, and AllGameObjectScript::OnGameObjectAddWorld().

◆ OnGameObjectDamaged()

void ScriptMgr::OnGameObjectDamaged ( GameObject go,
Player player 
)
150{
151 ASSERT(go);
152
153 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
154 {
155 script->OnGameObjectDamaged(go, player);
156 });
157
159 {
160 tempScript->OnDamaged(go, player);
161 }
162}
virtual void OnGameObjectDamaged(GameObject *, Player *)
Definition: AllGameObjectScript.h:74

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectDamaged().

◆ OnGameObjectDestroyed()

void ScriptMgr::OnGameObjectDestroyed ( GameObject go,
Player player 
)
135{
136 ASSERT(go);
137
138 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
139 {
140 script->OnGameObjectDestroyed(go, player);
141 });
142
144 {
145 tempScript->OnDestroyed(go, player);
146 }
147}
virtual void OnGameObjectDestroyed(GameObject *, Player *)
Definition: AllGameObjectScript.h:71

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectDestroyed().

◆ OnGameObjectLootStateChanged()

void ScriptMgr::OnGameObjectLootStateChanged ( GameObject go,
uint32  state,
Unit unit 
)
180{
181 ASSERT(go);
182
183 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
184 {
185 script->OnGameObjectLootStateChanged(go, state, unit);
186 });
187
189 {
190 tempScript->OnLootStateChanged(go, state, unit);
191 }
192}
virtual void OnGameObjectLootStateChanged(GameObject *, uint32, Unit *)
Definition: AllGameObjectScript.h:80

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectLootStateChanged().

◆ OnGameObjectModifyHealth()

void ScriptMgr::OnGameObjectModifyHealth ( GameObject go,
Unit attackerOrHealer,
int32 change,
SpellInfo const *  spellInfo 
)
165{
166 ASSERT(go);
167
168 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
169 {
170 script->OnGameObjectModifyHealth(go, attackerOrHealer, change, spellInfo);
171 });
172
174 {
175 tempScript->OnModifyHealth(go, attackerOrHealer, change, spellInfo);
176 }
177}
virtual void OnGameObjectModifyHealth(GameObject *, Unit *, int32 &, SpellInfo const *)
Definition: AllGameObjectScript.h:77

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectModifyHealth().

◆ OnGameObjectRemoveWorld()

void ScriptMgr::OnGameObjectRemoveWorld ( GameObject go)
33{
34 ASSERT(go);
35
36 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
37 {
38 script->OnGameObjectRemoveWorld(go);
39 });
40}
virtual void OnGameObjectRemoveWorld(GameObject *)
This hook runs after remove game object in world.
Definition: AllGameObjectScript.h:46

References ASSERT, and AllGameObjectScript::OnGameObjectRemoveWorld().

◆ OnGameObjectSaveToDB()

void ScriptMgr::OnGameObjectSaveToDB ( GameObject go)
43{
44 ASSERT(go);
45
46 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
47 {
48 script->OnGameObjectSaveToDB(go);
49 });
50}
virtual void OnGameObjectSaveToDB(GameObject *)
This hook runs after the game object iis saved to the database.
Definition: AllGameObjectScript.h:40

References ASSERT, and AllGameObjectScript::OnGameObjectSaveToDB().

◆ OnGameObjectStateChanged()

void ScriptMgr::OnGameObjectStateChanged ( GameObject go,
uint32  state 
)
195{
196 ASSERT(go);
197
198 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
199 {
200 script->OnGameObjectStateChanged(go, state);
201 });
202
204 {
205 tempScript->OnGameObjectStateChanged(go, state);
206 }
207}
virtual void OnGameObjectStateChanged(GameObject *, uint32)
Definition: AllGameObjectScript.h:83

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectStateChanged().

◆ OnGameObjectUpdate()

void ScriptMgr::OnGameObjectUpdate ( GameObject go,
uint32  diff 
)
210{
211 ASSERT(go);
212
213 ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
214 {
215 script->OnGameObjectUpdate(go, diff);
216 });
217
219 {
220 tempScript->OnUpdate(go, diff);
221 }
222}
virtual void OnGameObjectUpdate(GameObject *, uint32)
This hook runs after remove game object in world.
Definition: AllGameObjectScript.h:53

References ASSERT, GameObject::GetScriptId(), and AllGameObjectScript::OnGameObjectUpdate().

◆ OnGetArenaPersonalRating()

void ScriptMgr::OnGetArenaPersonalRating ( Player player,
uint8  slot,
uint32 result 
)
738{
739 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_ARENA_PERSONAL_RATING, script->OnGetArenaPersonalRating(player, slot, result));
740}
@ PLAYERHOOK_ON_GET_ARENA_PERSONAL_RATING
Definition: PlayerScript.h:169

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_ARENA_PERSONAL_RATING.

◆ OnGetArenaPoints()

void ScriptMgr::OnGetArenaPoints ( ArenaTeam at,
float &  points 
)
28{
29 CALL_ENABLED_HOOKS(ArenaTeamScript, ARENATEAMHOOK_ON_GET_ARENA_POINTS, script->OnGetArenaPoints(at, points));
30}
@ ARENATEAMHOOK_ON_GET_ARENA_POINTS
Definition: ArenaTeamScript.h:28

References ARENATEAMHOOK_ON_GET_ARENA_POINTS, and CALL_ENABLED_HOOKS.

◆ OnGetArenaTeamId()

void ScriptMgr::OnGetArenaTeamId ( Player player,
uint8  slot,
uint32 result 
)
743{
744 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_ARENA_TEAM_ID, script->OnGetArenaTeamId(player, slot, result));
745}
@ PLAYERHOOK_ON_GET_ARENA_TEAM_ID
Definition: PlayerScript.h:170

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_ARENA_TEAM_ID.

◆ OnGetFeralApBonus()

void ScriptMgr::OnGetFeralApBonus ( Player player,
int32 feral_bonus,
int32  dpsMod,
ItemTemplate const *  proto,
ScalingStatValuesEntry const *  ssv 
)
653{
654 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_FERAL_AP_BONUS, script->OnGetFeralApBonus(player, feral_bonus, dpsMod, proto, ssv));
655}
@ PLAYERHOOK_ON_GET_FERAL_AP_BONUS
Definition: PlayerScript.h:153

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_FERAL_AP_BONUS.

◆ OnGetMaxPersonalArenaRatingRequirement()

void ScriptMgr::OnGetMaxPersonalArenaRatingRequirement ( Player const *  player,
uint32  minSlot,
uint32 maxArenaRating 
) const
363{
364 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_MAX_PERSONAL_ARENA_RATING_REQUIREMENT, script->OnGetMaxPersonalArenaRatingRequirement(player, minSlot, maxArenaRating));
365}
@ PLAYERHOOK_ON_GET_MAX_PERSONAL_ARENA_RATING_REQUIREMENT
Definition: PlayerScript.h:99

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_MAX_PERSONAL_ARENA_RATING_REQUIREMENT.

◆ OnGetMaxSkillValue()

void ScriptMgr::OnGetMaxSkillValue ( Player player,
uint32  skill,
int32 result,
bool  IsPure 
)
588{
589 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_MAX_SKILL_VALUE, script->OnGetMaxSkillValue(player, skill, result, IsPure));
590}
@ PLAYERHOOK_ON_GET_MAX_SKILL_VALUE
Definition: PlayerScript.h:140

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_MAX_SKILL_VALUE.

◆ OnGetMaxSkillValueForLevel()

void ScriptMgr::OnGetMaxSkillValueForLevel ( Player player,
uint16 result 
)
763{
764 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_MAX_SKILL_VALUE_FOR_LEVEL, script->OnGetMaxSkillValueForLevel(player, result));
765}
@ PLAYERHOOK_ON_GET_MAX_SKILL_VALUE_FOR_LEVEL
Definition: PlayerScript.h:174

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_MAX_SKILL_VALUE_FOR_LEVEL.

◆ OnGetPoints()

void ScriptMgr::OnGetPoints ( ArenaTeam team,
uint32  memberRating,
float &  points 
)
28{
29 CALL_ENABLED_HOOKS(ArenaScript, ARENAHOOK_ON_GET_POINTS, script->OnGetPoints(team, memberRating, points));
30}
@ ARENAHOOK_ON_GET_POINTS
Definition: ArenaScript.h:28

References ARENAHOOK_ON_GET_POINTS, and CALL_ENABLED_HOOKS.

◆ OnGetQuestRate()

void ScriptMgr::OnGetQuestRate ( Player player,
float &  result 
)
713{
714 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GET_QUEST_RATE, script->OnGetQuestRate(player, result));
715}
@ PLAYERHOOK_ON_GET_QUEST_RATE
Definition: PlayerScript.h:193

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GET_QUEST_RATE.

◆ OnGetSlotByType()

void ScriptMgr::OnGetSlotByType ( const uint32  type,
uint8 slot 
)
23{
24 CALL_ENABLED_HOOKS(ArenaTeamScript, ARENATEAMHOOK_ON_GET_SLOT_BY_TYPE, script->OnGetSlotByType(type, slot));
25}
@ ARENATEAMHOOK_ON_GET_SLOT_BY_TYPE
Definition: ArenaTeamScript.h:27

References ARENATEAMHOOK_ON_GET_SLOT_BY_TYPE, and CALL_ENABLED_HOOKS.

◆ OnGivePlayerXP()

void ScriptMgr::OnGivePlayerXP ( Player player,
uint32 amount,
Unit victim,
uint8  xpSource 
)
128{
129 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GIVE_EXP, script->OnGiveXP(player, amount, victim, xpSource));
130}
@ PLAYERHOOK_ON_GIVE_EXP
Definition: PlayerScript.h:49

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GIVE_EXP.

◆ OnGlobalItemDelFromDB()

void ScriptMgr::OnGlobalItemDelFromDB ( CharacterDatabaseTransaction  trans,
ObjectGuid::LowType  itemGuid 
)
25{
26 ASSERT(trans);
27 ASSERT(itemGuid);
28
29 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_ITEM_DEL_FROM_DB, script->OnItemDelFromDB(trans, itemGuid));
30}
@ GLOBALHOOK_ON_ITEM_DEL_FROM_DB
Definition: GlobalScript.h:29

References ASSERT, CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_ITEM_DEL_FROM_DB.

◆ OnGlobalMirrorImageDisplayItem()

void ScriptMgr::OnGlobalMirrorImageDisplayItem ( Item const *  item,
uint32 display 
)
33{
34 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_MIRRORIMAGE_DISPLAY_ITEM, script->OnMirrorImageDisplayItem(item, display));
35}
@ GLOBALHOOK_ON_MIRRORIMAGE_DISPLAY_ITEM
Definition: GlobalScript.h:30

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_MIRRORIMAGE_DISPLAY_ITEM.

◆ OnGossipHello() [1/2]

bool ScriptMgr::OnGossipHello ( Player player,
Creature creature 
)
25{
26 ASSERT(player);
27 ASSERT(creature);
28
29 auto ret = IsValidBoolScript<AllCreatureScript>([&](AllCreatureScript* script)
30 {
31 return script->CanCreatureGossipHello(player, creature);
32 });
33
34 if (ret && *ret)
35 {
36 return true;
37 }
38
40 ClearGossipMenuFor(player);
41 return tempScript ? tempScript->OnGossipHello(player, creature) : false;
42}
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
virtual bool CanCreatureGossipHello(Player *, Creature *)
This hook called when a player opens a gossip dialog with the creature.
Definition: AllCreatureScript.h:67

References ASSERT, AllCreatureScript::CanCreatureGossipHello(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnGossipHello() [2/2]

bool ScriptMgr::OnGossipHello ( Player player,
GameObject go 
)
25{
26 ASSERT(player);
27 ASSERT(go);
28
29 auto ret = IsValidBoolScript<AllGameObjectScript>([&](AllGameObjectScript* script)
30 {
31 return script->CanGameObjectGossipHello(player, go);
32 });
33
34 if (ret && *ret)
35 {
36 return true;
37 }
38
40 ClearGossipMenuFor(player);
41 return tempScript && tempScript->OnGossipHello(player, go);
42}
virtual bool CanGameObjectGossipHello(Player *, GameObject *)
Definition: AllGameObjectScript.h:56

References ASSERT, AllGameObjectScript::CanGameObjectGossipHello(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ OnGossipSelect() [1/4]

bool ScriptMgr::OnGossipSelect ( Player player,
Creature creature,
uint32  sender,
uint32  action 
)
45{
46 ASSERT(player);
47 ASSERT(creature);
48
49 auto ret = IsValidBoolScript<AllCreatureScript>([&](AllCreatureScript* script)
50 {
51 return script->CanCreatureGossipSelect(player, creature, sender, action);
52 });
53
54 if (ret && *ret)
55 {
56 return true;
57 }
58
60 return tempScript ? tempScript->OnGossipSelect(player, creature, sender, action) : false;
61}
virtual bool CanCreatureGossipSelect(Player *, Creature *, uint32, uint32)
This hook called when a player selects a gossip item in the creature's gossip menu.
Definition: AllCreatureScript.h:79

References ASSERT, AllCreatureScript::CanCreatureGossipSelect(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnGossipSelect() [2/4]

bool ScriptMgr::OnGossipSelect ( Player player,
GameObject go,
uint32  sender,
uint32  action 
)
45{
46 ASSERT(player);
47 ASSERT(go);
48
49 auto ret = IsValidBoolScript<AllGameObjectScript>([&](AllGameObjectScript* script)
50 {
51 return script->CanGameObjectGossipSelect(player, go, sender, action);
52 });
53
54 if (ret && *ret)
55 {
56 return true;
57 }
58
60 return tempScript ? tempScript->OnGossipSelect(player, go, sender, action) : false;
61}
virtual bool CanGameObjectGossipSelect(Player *, GameObject *, uint32, uint32)
Definition: AllGameObjectScript.h:59

References ASSERT, AllGameObjectScript::CanGameObjectGossipSelect(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ OnGossipSelect() [3/4]

void ScriptMgr::OnGossipSelect ( Player player,
Item item,
uint32  sender,
uint32  action 
)
114{
115 ASSERT(player);
116 ASSERT(item);
117
118 ExecuteScript<AllItemScript>([&](AllItemScript* script)
119 {
120 script->OnItemGossipSelect(player, item, sender, action);
121 });
122
123 if (auto tempScript = ScriptRegistry<ItemScript>::GetScriptById(item->GetScriptId()))
124 {
125 tempScript->OnGossipSelect(player, item, sender, action);
126 }
127}
Definition: AllItemScript.h:24
virtual void OnItemGossipSelect(Player *, Item *, uint32, uint32)
Definition: AllItemScript.h:42

References ASSERT, Item::GetScriptId(), and AllItemScript::OnItemGossipSelect().

◆ OnGossipSelect() [4/4]

void ScriptMgr::OnGossipSelect ( Player player,
uint32  menu_id,
uint32  sender,
uint32  action 
)
28{
29 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GOSSIP_SELECT, script->OnGossipSelect(player, menu_id, sender, action));
30}
@ PLAYERHOOK_ON_GOSSIP_SELECT
Definition: PlayerScript.h:89

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GOSSIP_SELECT.

◆ OnGossipSelectCode() [1/4]

bool ScriptMgr::OnGossipSelectCode ( Player player,
Creature creature,
uint32  sender,
uint32  action,
const char *  code 
)
64{
65 ASSERT(player);
66 ASSERT(creature);
67 ASSERT(code);
68
69 auto ret = IsValidBoolScript<AllCreatureScript>([&](AllCreatureScript* script)
70 {
71 return script->CanCreatureGossipSelectCode(player, creature, sender, action, code);
72 });
73
74 if (ret && *ret)
75 {
76 return true;
77 }
78
80 return tempScript ? tempScript->OnGossipSelectCode(player, creature, sender, action, code) : false;
81}
virtual bool CanCreatureGossipSelectCode(Player *, Creature *, uint32, uint32, const char *)
This hook called when a player selects a gossip with a code in the creature's gossip menu.
Definition: AllCreatureScript.h:92

References ASSERT, AllCreatureScript::CanCreatureGossipSelectCode(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnGossipSelectCode() [2/4]

bool ScriptMgr::OnGossipSelectCode ( Player player,
GameObject go,
uint32  sender,
uint32  action,
const char *  code 
)
64{
65 ASSERT(player);
66 ASSERT(go);
67 ASSERT(code);
68
69 auto ret = IsValidBoolScript<AllGameObjectScript>([&](AllGameObjectScript* script)
70 {
71 return script->CanGameObjectGossipSelectCode(player, go, sender, action, code);
72 });
73
74 if (ret && *ret)
75 {
76 return true;
77 }
78
80 return tempScript ? tempScript->OnGossipSelectCode(player, go, sender, action, code) : false;
81}
virtual bool CanGameObjectGossipSelectCode(Player *, GameObject *, uint32, uint32, const char *)
Definition: AllGameObjectScript.h:62

References ASSERT, AllGameObjectScript::CanGameObjectGossipSelectCode(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ OnGossipSelectCode() [3/4]

void ScriptMgr::OnGossipSelectCode ( Player player,
Item item,
uint32  sender,
uint32  action,
const char *  code 
)
130{
131 ASSERT(player);
132 ASSERT(item);
133
134 ExecuteScript<AllItemScript>([&](AllItemScript* script)
135 {
136 script->OnItemGossipSelectCode(player, item, sender, action, code);
137 });
138
139 if (auto tempScript = ScriptRegistry<ItemScript>::GetScriptById(item->GetScriptId()))
140 {
141 tempScript->OnGossipSelectCode(player, item, sender, action, code);
142 }
143}
virtual void OnItemGossipSelectCode(Player *, Item *, uint32, uint32, const char *)
Definition: AllItemScript.h:45

References ASSERT, Item::GetScriptId(), and AllItemScript::OnItemGossipSelectCode().

◆ OnGossipSelectCode() [4/4]

void ScriptMgr::OnGossipSelectCode ( Player player,
uint32  menu_id,
uint32  sender,
uint32  action,
const char *  code 
)
33{
34 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GOSSIP_SELECT_CODE, script->OnGossipSelectCode(player, menu_id, sender, action, code));
35}
@ PLAYERHOOK_ON_GOSSIP_SELECT_CODE
Definition: PlayerScript.h:90

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GOSSIP_SELECT_CODE.

◆ OnGrayLevelCalculation()

void ScriptMgr::OnGrayLevelCalculation ( uint8 grayLevel,
uint8  playerLevel 
)
28{
29 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_GRAY_LEVEL_CALCULATION, script->OnGrayLevelCalculation(grayLevel, playerLevel));
30}
@ FORMULAHOOK_ON_GRAY_LEVEL_CALCULATION
Definition: FormulaScript.h:27

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_GRAY_LEVEL_CALCULATION.

◆ OnGroupAddMember()

void ScriptMgr::OnGroupAddMember ( Group group,
ObjectGuid  guid 
)
23{
24 ASSERT(group);
25
26 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_ADD_MEMBER, script->OnAddMember(group, guid));
27}
@ GROUPHOOK_ON_ADD_MEMBER
Definition: GroupScript.h:27

References ASSERT, CALL_ENABLED_HOOKS, and GROUPHOOK_ON_ADD_MEMBER.

◆ OnGroupChangeLeader()

void ScriptMgr::OnGroupChangeLeader ( Group group,
ObjectGuid  newLeaderGuid,
ObjectGuid  oldLeaderGuid 
)
44{
45 ASSERT(group);
46
47 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_CHANGE_LEADER, script->OnChangeLeader(group, newLeaderGuid, oldLeaderGuid));
48}
@ GROUPHOOK_ON_CHANGE_LEADER
Definition: GroupScript.h:30

References ASSERT, CALL_ENABLED_HOOKS, and GROUPHOOK_ON_CHANGE_LEADER.

◆ OnGroupDisband()

void ScriptMgr::OnGroupDisband ( Group group)
51{
52 ASSERT(group);
53
54 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_DISBAND, script->OnDisband(group));
55}
@ GROUPHOOK_ON_DISBAND
Definition: GroupScript.h:31

References ASSERT, CALL_ENABLED_HOOKS, and GROUPHOOK_ON_DISBAND.

◆ OnGroupInviteMember()

void ScriptMgr::OnGroupInviteMember ( Group group,
ObjectGuid  guid 
)
30{
31 ASSERT(group);
32
33 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_INVITE_MEMBER, script->OnInviteMember(group, guid));
34}
@ GROUPHOOK_ON_INVITE_MEMBER
Definition: GroupScript.h:28

References ASSERT, CALL_ENABLED_HOOKS, and GROUPHOOK_ON_INVITE_MEMBER.

◆ OnGroupRateCalculation()

void ScriptMgr::OnGroupRateCalculation ( float &  rate,
uint32  count,
bool  isRaid 
)
56{
57 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_GROUP_RATE_CALCULATION, script->OnGroupRateCalculation(rate, count, isRaid));
58}
@ FORMULAHOOK_ON_GROUP_RATE_CALCULATION
Definition: FormulaScript.h:32

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_GROUP_RATE_CALCULATION.

◆ OnGroupRemoveMember()

void ScriptMgr::OnGroupRemoveMember ( Group group,
ObjectGuid  guid,
RemoveMethod  method,
ObjectGuid  kicker,
const char *  reason 
)
37{
38 ASSERT(group);
39
40 CALL_ENABLED_HOOKS(GroupScript, GROUPHOOK_ON_REMOVE_MEMBER, script->OnRemoveMember(group, guid, method, kicker, reason));
41}
@ GROUPHOOK_ON_REMOVE_MEMBER
Definition: GroupScript.h:29

References ASSERT, CALL_ENABLED_HOOKS, and GROUPHOOK_ON_REMOVE_MEMBER.

◆ OnGroupRollRewardItem()

void ScriptMgr::OnGroupRollRewardItem ( Player player,
Item item,
uint32  count,
RollVote  voteType,
Roll roll 
)
398{
399 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GROUP_ROLL_REWARD_ITEM, script->OnGroupRollRewardItem(player, item, count, voteType, roll));
400}
@ PLAYERHOOK_ON_GROUP_ROLL_REWARD_ITEM
Definition: PlayerScript.h:106

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_GROUP_ROLL_REWARD_ITEM.

◆ OnGuildAddMember()

void ScriptMgr::OnGuildAddMember ( Guild guild,
Player player,
uint8 plRank 
)
23{
24 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_ADD_MEMBER, script->OnAddMember(guild, player, plRank));
25}
@ GUILDHOOK_ON_ADD_MEMBER
Definition: GuildScript.h:27

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_ADD_MEMBER.

◆ OnGuildBankEvent()

void ScriptMgr::OnGuildBankEvent ( Guild guild,
uint8  eventType,
uint8  tabId,
ObjectGuid::LowType  playerGuid,
uint32  itemOrMoney,
uint16  itemStackCount,
uint8  destTabId 
)
73{
74 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_BANK_EVENT, script->OnBankEvent(guild, eventType, tabId, playerGuid, itemOrMoney, itemStackCount, destTabId));
75}
@ GUILDHOOK_ON_BANK_EVENT
Definition: GuildScript.h:37

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_BANK_EVENT.

◆ OnGuildCreate()

void ScriptMgr::OnGuildCreate ( Guild guild,
Player leader,
const std::string &  name 
)
43{
44 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_CREATE, script->OnCreate(guild, leader, name));
45}
@ GUILDHOOK_ON_CREATE
Definition: GuildScript.h:31

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_CREATE.

◆ OnGuildDisband()

void ScriptMgr::OnGuildDisband ( Guild guild)
48{
49 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_DISBAND, script->OnDisband(guild));
50}
@ GUILDHOOK_ON_DISBAND
Definition: GuildScript.h:32

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_DISBAND.

◆ OnGuildEvent()

void ScriptMgr::OnGuildEvent ( Guild guild,
uint8  eventType,
ObjectGuid::LowType  playerGuid1,
ObjectGuid::LowType  playerGuid2,
uint8  newRank 
)
68{
69 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_EVENT, script->OnEvent(guild, eventType, playerGuid1, playerGuid2, newRank));
70}
@ GUILDHOOK_ON_EVENT
Definition: GuildScript.h:36

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_EVENT.

◆ OnGuildInfoChanged()

void ScriptMgr::OnGuildInfoChanged ( Guild guild,
const std::string &  newInfo 
)
38{
39 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_INFO_CHANGED, script->OnInfoChanged(guild, newInfo));
40}
@ GUILDHOOK_ON_INFO_CHANGED
Definition: GuildScript.h:30

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_INFO_CHANGED.

◆ OnGuildItemMove()

void ScriptMgr::OnGuildItemMove ( Guild guild,
Player player,
Item pItem,
bool  isSrcBank,
uint8  srcContainer,
uint8  srcSlotId,
bool  isDestBank,
uint8  destContainer,
uint8  destSlotId 
)
63{
64 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_ITEM_MOVE, script->OnItemMove(guild, player, pItem, isSrcBank, srcContainer, srcSlotId, isDestBank, destContainer, destSlotId));
65}
@ GUILDHOOK_ON_ITEM_MOVE
Definition: GuildScript.h:35

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_ITEM_MOVE.

◆ OnGuildMemberDepositMoney()

void ScriptMgr::OnGuildMemberDepositMoney ( Guild guild,
Player player,
uint32 amount 
)
58{
59 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_MEMBER_DEPOSIT_MONEY, script->OnMemberDepositMoney(guild, player, amount));
60}
@ GUILDHOOK_ON_MEMBER_DEPOSIT_MONEY
Definition: GuildScript.h:34

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_MEMBER_DEPOSIT_MONEY.

◆ OnGuildMemberWitdrawMoney()

void ScriptMgr::OnGuildMemberWitdrawMoney ( Guild guild,
Player player,
uint32 amount,
bool  isRepair 
)
53{
54 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_MEMBER_WITDRAW_MONEY, script->OnMemberWitdrawMoney(guild, player, amount, isRepair));
55}
@ GUILDHOOK_ON_MEMBER_WITDRAW_MONEY
Definition: GuildScript.h:33

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_MEMBER_WITDRAW_MONEY.

◆ OnGuildMOTDChanged()

void ScriptMgr::OnGuildMOTDChanged ( Guild guild,
const std::string &  newMotd 
)
33{
34 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_MOTD_CHANGED, script->OnMOTDChanged(guild, newMotd));
35}
@ GUILDHOOK_ON_MOTD_CHANGED
Definition: GuildScript.h:29

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_MOTD_CHANGED.

◆ OnGuildRemoveMember()

void ScriptMgr::OnGuildRemoveMember ( Guild guild,
Player player,
bool  isDisbanding,
bool  isKicked 
)
28{
29 CALL_ENABLED_HOOKS(GuildScript, GUILDHOOK_ON_REMOVE_MEMBER, script->OnRemoveMember(guild, player, isDisbanding, isKicked));
30}
@ GUILDHOOK_ON_REMOVE_MEMBER
Definition: GuildScript.h:28

References CALL_ENABLED_HOOKS, and GUILDHOOK_ON_REMOVE_MEMBER.

◆ OnHandleDevCommand()

void ScriptMgr::OnHandleDevCommand ( Player player,
bool &  enable 
)
23{
24 CALL_ENABLED_HOOKS(AllCommandScript, ALLCOMMANDHOOK_ON_HANDLE_DEV_COMMAND, script->OnHandleDevCommand(player, enable));
25}
@ ALLCOMMANDHOOK_ON_HANDLE_DEV_COMMAND
Definition: AllCommandScript.h:26
Definition: AllCommandScript.h:32

References ALLCOMMANDHOOK_ON_HANDLE_DEV_COMMAND, and CALL_ENABLED_HOOKS.

◆ OnHeal()

void ScriptMgr::OnHeal ( Unit healer,
Unit reciever,
uint32 gain 
)
23{
24 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_HEAL, script->OnHeal(healer, reciever, gain));
25}
@ UNITHOOK_ON_HEAL
Definition: UnitScript.h:26

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_HEAL.

◆ OnHonorCalculation()

void ScriptMgr::OnHonorCalculation ( float &  honor,
uint8  level,
float  multiplier 
)
23{
24 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_HONOR_CALCULATION, script->OnHonorCalculation(honor, level, multiplier));
25}
@ FORMULAHOOK_ON_HONOR_CALCULATION
Definition: FormulaScript.h:26

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_HONOR_CALCULATION.

◆ OnInitializeLockedDungeons()

void ScriptMgr::OnInitializeLockedDungeons ( Player player,
uint8 level,
uint32 lockData,
lfg::LFGDungeonData const *  dungeon 
)
63{
64 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_INITIALIZE_LOCKED_DUNGEONS, script->OnInitializeLockedDungeons(player, level, lockData, dungeon));
65}
@ GLOBALHOOK_ON_INITIALIZE_LOCKED_DUNGEONS
Definition: GlobalScript.h:36

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_INITIALIZE_LOCKED_DUNGEONS.

◆ OnInitStatsForLevel()

void ScriptMgr::OnInitStatsForLevel ( Guardian guardian,
uint8  petlevel 
)
23{
24 CALL_ENABLED_HOOKS(PetScript, PETHOOK_ON_INIT_STATS_FOR_LEVEL, script->OnInitStatsForLevel(guardian, petlevel));
25}
@ PETHOOK_ON_INIT_STATS_FOR_LEVEL
Definition: PetScript.h:26

References CALL_ENABLED_HOOKS, and PETHOOK_ON_INIT_STATS_FOR_LEVEL.

◆ OnInstall()

void ScriptMgr::OnInstall ( Vehicle veh)
23{
24 ASSERT(veh);
25 ASSERT(veh->GetBase()->IsCreature());
26
28 {
29 tempScript->OnInstall(veh);
30 }
31}

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnInstallAccessory()

void ScriptMgr::OnInstallAccessory ( Vehicle veh,
Creature accessory 
)
56{
57 ASSERT(veh);
58 ASSERT(veh->GetBase()->IsCreature());
59 ASSERT(accessory);
60
62 {
63 tempScript->OnInstallAccessory(veh, accessory);
64 }
65}

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnInstanceIdRemoved()

void ScriptMgr::OnInstanceIdRemoved ( uint32  instanceId)

Called when an instance Id is deleted, usually because it expired or no players are bound to it anymore.

Parameters
instanceIdThe unique id of the instance
118{
119 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_INSTANCEID_REMOVED, script->OnInstanceIdRemoved(instanceId));
120}
@ GLOBALHOOK_ON_INSTANCEID_REMOVED
Definition: GlobalScript.h:46

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_INSTANCEID_REMOVED.

◆ OnInstanceSave()

void ScriptMgr::OnInstanceSave ( InstanceSave instanceSave)
103{
104 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_INSTANCE_SAVE, script->OnInstanceSave(instanceSave));
105}
@ MISCHOOK_ON_INSTANCE_SAVE
Definition: MiscScript.h:43

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_INSTANCE_SAVE.

◆ OnIsAffectedBySpellModCheck()

bool ScriptMgr::OnIsAffectedBySpellModCheck ( SpellInfo const *  affectSpell,
SpellInfo const *  checkSpell,
SpellModifier const *  mod 
)
88{
89 CALL_ENABLED_BOOLEAN_HOOKS(GlobalScript, GLOBALHOOK_ON_IS_AFFECTED_BY_SPELL_MOD_CHECK, !script->OnIsAffectedBySpellModCheck(affectSpell, checkSpell, mod));
90}
@ GLOBALHOOK_ON_IS_AFFECTED_BY_SPELL_MOD_CHECK
Definition: GlobalScript.h:41

References CALL_ENABLED_BOOLEAN_HOOKS, and GLOBALHOOK_ON_IS_AFFECTED_BY_SPELL_MOD_CHECK.

◆ OnIsFFAPvP()

void ScriptMgr::OnIsFFAPvP ( Player player,
bool &  result 
)
748{
749 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_IS_FFA_PVP, script->OnIsFFAPvP(player, result));
750}
@ PLAYERHOOK_ON_IS_FFA_PVP
Definition: PlayerScript.h:171

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_IS_FFA_PVP.

◆ OnIsPvP()

void ScriptMgr::OnIsPvP ( Player player,
bool &  result 
)
758{
759 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_IS_PVP, script->OnIsPvP(player, result));
760}
@ PLAYERHOOK_ON_IS_PVP
Definition: PlayerScript.h:173

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_IS_PVP.

◆ OnItemCreate()

void ScriptMgr::OnItemCreate ( Item item,
ItemTemplate const *  itemProto,
Player const *  owner 
)
63{
64 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_ITEM_CREATE, script->OnItemCreate(item, itemProto, owner));
65}
@ MISCHOOK_ON_ITEM_CREATE
Definition: MiscScript.h:35

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_ITEM_CREATE.

◆ OnItemExpire()

bool ScriptMgr::OnItemExpire ( Player player,
ItemTemplate const *  proto 
)
65{
66 ASSERT(player);
67 ASSERT(proto);
68
69 auto ret = IsValidBoolScript<AllItemScript>([&](AllItemScript* script)
70 {
71 return !script->CanItemExpire(player, proto);
72 });
73
74 if (ret && *ret)
75 {
76 return false;
77 }
78
79 auto tempScript = ScriptRegistry<ItemScript>::GetScriptById(proto->ScriptId);
80 return tempScript ? tempScript->OnExpire(player, proto) : false;
81}
virtual bool CanItemExpire(Player *, ItemTemplate const *)
Definition: AllItemScript.h:39

References ASSERT, AllItemScript::CanItemExpire(), ScriptRegistry< TScript >::GetScriptById(), and ItemTemplate::ScriptId.

◆ OnItemRemove()

bool ScriptMgr::OnItemRemove ( Player player,
Item item 
)
84{
85 ASSERT(player);
86 ASSERT(item);
87
88 auto ret = IsValidBoolScript<AllItemScript>([&](AllItemScript* script)
89 {
90 return !script->CanItemRemove(player, item);
91 });
92
93 if (ret && *ret)
94 {
95 return false;
96 }
97
99 return tempScript ? tempScript->OnRemove(player, item) : false;
100}
virtual bool CanItemRemove(Player *, Item *)
Definition: AllItemScript.h:36

References ASSERT, AllItemScript::CanItemRemove(), ScriptRegistry< TScript >::GetScriptById(), and Item::GetScriptId().

◆ OnItemRoll()

bool ScriptMgr::OnItemRoll ( Player const *  player,
LootStoreItem const *  LootStoreItem,
float &  chance,
Loot loot,
LootStore const &  store 
)
53{
54 CALL_ENABLED_BOOLEAN_HOOKS(GlobalScript, GLOBALHOOK_ON_ITEM_ROLL, !script->OnItemRoll(player, lootStoreItem, chance, loot, store));
55}
@ GLOBALHOOK_ON_ITEM_ROLL
Definition: GlobalScript.h:34

References CALL_ENABLED_BOOLEAN_HOOKS, and GLOBALHOOK_ON_ITEM_ROLL.

◆ OnItemUse()

bool ScriptMgr::OnItemUse ( Player player,
Item item,
SpellCastTargets const &  targets 
)
46{
47 ASSERT(player);
48 ASSERT(item);
49
50 auto ret = IsValidBoolScript<AllItemScript>([&](AllItemScript* script)
51 {
52 return script->CanItemUse(player, item, targets);
53 });
54
55 if (ret && *ret)
56 {
57 return true;
58 }
59
61 return tempScript ? tempScript->OnUse(player, item, targets) : false;
62}
virtual bool CanItemUse(Player *, Item *, SpellCastTargets const &)
Definition: AllItemScript.h:33

References ASSERT, AllItemScript::CanItemUse(), ScriptRegistry< TScript >::GetScriptById(), and Item::GetScriptId().

◆ OnLastIpUpdate()

void ScriptMgr::OnLastIpUpdate ( uint32  accountId,
std::string  ip 
)
33{
34 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_LAST_IP_UPDATE, script->OnLastIpUpdate(accountId, ip));
35}
@ ACCOUNTHOOK_ON_LAST_IP_UPDATE
Definition: AccountScript.h:28

References ACCOUNTHOOK_ON_LAST_IP_UPDATE, and CALL_ENABLED_HOOKS.

◆ OnLoadCustomDatabaseTable()

void ScriptMgr::OnLoadCustomDatabaseTable ( )
33{
34 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_LOAD_CUSTOM_DATABASE_TABLE, script->OnLoadCustomDatabaseTable());
35}
@ WORLDHOOK_ON_LOAD_CUSTOM_DATABASE_TABLE
Definition: WorldScript.h:28

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_LOAD_CUSTOM_DATABASE_TABLE.

◆ OnLoadGridMap()

void ScriptMgr::OnLoadGridMap ( Map map,
GridMap gmap,
uint32  gx,
uint32  gy 
)
138{
139 ASSERT(map);
140 ASSERT(gmap);
141
142 ForeachMaps<WorldMapScript>(map,
143 [&](WorldMapScript* script)
144 {
145 script->OnLoadGridMap(map, gmap, gx, gy);
146 });
147
148 ForeachMaps<InstanceMapScript>(map,
149 [&](InstanceMapScript* script)
150 {
151 script->OnLoadGridMap((InstanceMap*)map, gmap, gx, gy);
152 });
153
154 ForeachMaps<BattlegroundMapScript>(map,
155 [&](BattlegroundMapScript* script)
156 {
157 script->OnLoadGridMap((BattlegroundMap*)map, gmap, gx, gy);
158 });
159}
virtual void OnLoadGridMap(TMap *, GridMap *, uint32, uint32)
Definition: ScriptObject.h:102

References ASSERT, and MapScript< TMap >::OnLoadGridMap().

◆ OnLoadSpellCustomAttr()

void ScriptMgr::OnLoadSpellCustomAttr ( SpellInfo spell)
98{
99 CALL_ENABLED_HOOKS(GlobalScript, GLOBALHOOK_ON_LOAD_SPELL_CUSTOM_ATTR, script->OnLoadSpellCustomAttr(spell));
100}
@ GLOBALHOOK_ON_LOAD_SPELL_CUSTOM_ATTR
Definition: GlobalScript.h:43

References CALL_ENABLED_HOOKS, and GLOBALHOOK_ON_LOAD_SPELL_CUSTOM_ATTR.

◆ OnLootItem()

void ScriptMgr::OnLootItem ( Player player,
Item item,
uint32  count,
ObjectGuid  lootguid 
)
368{
369 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LOOT_ITEM, script->OnLootItem(player, item, count, lootguid));
370}
@ PLAYERHOOK_ON_LOOT_ITEM
Definition: PlayerScript.h:100

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LOOT_ITEM.

◆ OnLootMoney()

void ScriptMgr::OnLootMoney ( Player player,
uint32  gold 
)
23{
24 ASSERT(player);
25
26 CALL_ENABLED_HOOKS(LootScript, LOOTHOOK_ON_LOOT_MONEY, script->OnLootMoney(player, gold));
27}
@ LOOTHOOK_ON_LOOT_MONEY
Definition: LootScript.h:26
Definition: LootScript.h:31

References ASSERT, CALL_ENABLED_HOOKS, and LOOTHOOK_ON_LOOT_MONEY.

◆ OnMapUpdate()

void ScriptMgr::OnMapUpdate ( Map map,
uint32  diff 
)
243{
244 ASSERT(map);
245
246 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_MAP_UPDATE, script->OnMapUpdate(map, diff));
247
248 ForeachMaps<WorldMapScript>(map,
249 [&](WorldMapScript* script)
250 {
251 script->OnUpdate(map, diff);
252 });
253
254 ForeachMaps<InstanceMapScript>(map,
255 [&](InstanceMapScript* script)
256 {
257 script->OnUpdate((InstanceMap*)map, diff);
258 });
259
260 ForeachMaps<BattlegroundMapScript>(map,
261 [&](BattlegroundMapScript* script)
262 {
263 script->OnUpdate((BattlegroundMap*)map, diff);
264 });
265}
@ ALLMAPHOOK_ON_MAP_UPDATE
Definition: AllMapScript.h:32
void OnUpdate(TMap *, uint32) override
Definition: ScriptObject.h:114

References ALLMAPHOOK_ON_MAP_UPDATE, ASSERT, CALL_ENABLED_HOOKS, and MapScript< TMap >::OnUpdate().

◆ OnMotdChange()

void ScriptMgr::OnMotdChange ( std::string &  newMotd)
43{
44 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_MOTD_CHANGE, script->OnMotdChange(newMotd));
45}
@ WORLDHOOK_ON_MOTD_CHANGE
Definition: WorldScript.h:30

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_MOTD_CHANGE.

◆ OnNetworkStart()

void ScriptMgr::OnNetworkStart ( )
23{
25}
@ SERVERHOOK_ON_NETWORK_START
Definition: ServerScript.h:26

References CALL_ENABLED_HOOKS, and SERVERHOOK_ON_NETWORK_START.

◆ OnNetworkStop()

void ScriptMgr::OnNetworkStop ( )
28{
30}
@ SERVERHOOK_ON_NETWORK_STOP
Definition: ServerScript.h:27

References CALL_ENABLED_HOOKS, and SERVERHOOK_ON_NETWORK_STOP.

◆ OnOpenStateChange()

void ScriptMgr::OnOpenStateChange ( bool  open)
23{
24 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_OPEN_STATE_CHANGE, script->OnOpenStateChange(open));
25}
@ WORLDHOOK_ON_OPEN_STATE_CHANGE
Definition: WorldScript.h:26

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_OPEN_STATE_CHANGE.

◆ OnPasswordChange()

void ScriptMgr::OnPasswordChange ( uint32  accountId)
53{
54 CALL_ENABLED_HOOKS(AccountScript, ACCOUNTHOOK_ON_PASSWORD_CHANGE, script->OnPasswordChange(accountId));
55}
@ ACCOUNTHOOK_ON_PASSWORD_CHANGE
Definition: AccountScript.h:32

References ACCOUNTHOOK_ON_PASSWORD_CHANGE, and CALL_ENABLED_HOOKS.

◆ OnPatchValuesUpdate()

void ScriptMgr::OnPatchValuesUpdate ( Unit const *  unit,
ByteBuffer valuesUpdateBuf,
BuildValuesCachePosPointers posPointers,
Player target 
)
122{
123 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_PATCH_VALUES_UPDATE, script->OnPatchValuesUpdate(unit, valuesUpdateBuf, posPointers, target));
124}
@ UNITHOOK_ON_PATCH_VALUES_UPDATE
Definition: UnitScript.h:42

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_PATCH_VALUES_UPDATE.

◆ OnPetAddToWorld()

void ScriptMgr::OnPetAddToWorld ( Pet pet)
48{
49 ASSERT(pet);
50
51 CALL_ENABLED_HOOKS(PetScript, PETHOOK_ON_PET_ADD_TO_WORLD, script->OnPetAddToWorld(pet));
52}
@ PETHOOK_ON_PET_ADD_TO_WORLD
Definition: PetScript.h:31

References ASSERT, CALL_ENABLED_HOOKS, and PETHOOK_ON_PET_ADD_TO_WORLD.

◆ OnPlayerAddToBattleground()

void ScriptMgr::OnPlayerAddToBattleground ( Player player,
Battleground bg 
)
288{
289 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_ADD_TO_BATTLEGROUND, script->OnAddToBattleground(player, bg));
290}
@ PLAYERHOOK_ON_ADD_TO_BATTLEGROUND
Definition: PlayerScript.h:80

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_ADD_TO_BATTLEGROUND.

◆ OnPlayerBeingCharmed()

void ScriptMgr::OnPlayerBeingCharmed ( Player player,
Unit charmer,
uint32  oldFactionId,
uint32  newFactionId 
)
333{
334 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BEING_CHARMED, script->OnBeingCharmed(player, charmer, oldFactionId, newFactionId));
335}
@ PLAYERHOOK_ON_BEING_CHARMED
Definition: PlayerScript.h:91

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BEING_CHARMED.

◆ OnPlayerBindToInstance()

void ScriptMgr::OnPlayerBindToInstance ( Player player,
Difficulty  difficulty,
uint32  mapid,
bool  permanent 
)
263{
264 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_BIND_TO_INSTANCE, script->OnBindToInstance(player, difficulty, mapid, permanent));
265}
@ PLAYERHOOK_ON_BIND_TO_INSTANCE
Definition: PlayerScript.h:74

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_BIND_TO_INSTANCE.

◆ OnPlayerChat() [1/5]

void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg 
)
168{
169 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT, script->OnChat(player, type, lang, msg));
170}
@ PLAYERHOOK_ON_CHAT
Definition: PlayerScript.h:57

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CHAT.

◆ OnPlayerChat() [2/5]

void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Channel channel 
)
193{
194 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_CHANNEL, script->OnChat(player, type, lang, msg, channel));
195}
@ PLAYERHOOK_ON_CHAT_WITH_CHANNEL
Definition: PlayerScript.h:62

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CHAT_WITH_CHANNEL.

◆ OnPlayerChat() [3/5]

void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Group group 
)
183{
184 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_GROUP, script->OnChat(player, type, lang, msg, group));
185}
@ PLAYERHOOK_ON_CHAT_WITH_GROUP
Definition: PlayerScript.h:60

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CHAT_WITH_GROUP.

◆ OnPlayerChat() [4/5]

void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Guild guild 
)
188{
189 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_GUILD, script->OnChat(player, type, lang, msg, guild));
190}
@ PLAYERHOOK_ON_CHAT_WITH_GUILD
Definition: PlayerScript.h:61

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CHAT_WITH_GUILD.

◆ OnPlayerChat() [5/5]

void ScriptMgr::OnPlayerChat ( Player player,
uint32  type,
uint32  lang,
std::string &  msg,
Player receiver 
)
178{
179 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CHAT_WITH_RECEIVER, script->OnChat(player, type, lang, msg, receiver));
180}
@ PLAYERHOOK_ON_CHAT_WITH_RECEIVER
Definition: PlayerScript.h:59

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CHAT_WITH_RECEIVER.

◆ OnPlayerCompleteQuest()

void ScriptMgr::OnPlayerCompleteQuest ( Player player,
Quest const *  quest 
)
38{
39 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_COMPLETE_QUEST, script->OnPlayerCompleteQuest(player, quest));
40}
@ PLAYERHOOK_ON_PLAYER_COMPLETE_QUEST
Definition: PlayerScript.h:35

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_COMPLETE_QUEST.

◆ OnPlayerCreate()

void ScriptMgr::OnPlayerCreate ( Player player)
243{
244 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CREATE, script->OnCreate(player));
245}
@ PLAYERHOOK_ON_CREATE
Definition: PlayerScript.h:70

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_CREATE.

◆ OnPlayerDelete()

void ScriptMgr::OnPlayerDelete ( ObjectGuid  guid,
uint32  accountId 
)
253{
254 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DELETE, script->OnDelete(guid, accountId));
255}
@ PLAYERHOOK_ON_DELETE
Definition: PlayerScript.h:71

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_DELETE.

◆ OnPlayerDuelEnd()

void ScriptMgr::OnPlayerDuelEnd ( Player winner,
Player loser,
DuelCompleteType  type 
)
163{
164 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DUEL_END, script->OnDuelEnd(winner, loser, type));
165}
@ PLAYERHOOK_ON_DUEL_END
Definition: PlayerScript.h:56

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_DUEL_END.

◆ OnPlayerDuelRequest()

void ScriptMgr::OnPlayerDuelRequest ( Player target,
Player challenger 
)
153{
154 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DUEL_REQUEST, script->OnDuelRequest(target, challenger));
155}
@ PLAYERHOOK_ON_DUEL_REQUEST
Definition: PlayerScript.h:54

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_DUEL_REQUEST.

◆ OnPlayerDuelStart()

void ScriptMgr::OnPlayerDuelStart ( Player player1,
Player player2 
)
158{
159 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_DUEL_START, script->OnDuelStart(player1, player2));
160}
@ PLAYERHOOK_ON_DUEL_START
Definition: PlayerScript.h:55

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_DUEL_START.

◆ OnPlayerEmote()

void ScriptMgr::OnPlayerEmote ( Player player,
uint32  emote 
)
198{
199 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_EMOTE, script->OnEmote(player, emote));
200}
@ PLAYERHOOK_ON_EMOTE
Definition: PlayerScript.h:63

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_EMOTE.

◆ OnPlayerEnterCombat()

void ScriptMgr::OnPlayerEnterCombat ( Player player,
Unit enemy 
)
843{
844 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_ENTER_COMBAT, script->OnPlayerEnterCombat(player, enemy));
845}
@ PLAYERHOOK_ON_PLAYER_ENTER_COMBAT
Definition: PlayerScript.h:190

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_ENTER_COMBAT.

◆ OnPlayerEnterMap()

void ScriptMgr::OnPlayerEnterMap ( Map map,
Player player 
)
186{
187 ASSERT(map);
188 ASSERT(player);
189
190 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_PLAYER_ENTER_ALL, script->OnPlayerEnterAll(map, player));
191
192 ExecuteScript<PlayerScript>([=](PlayerScript* script)
193 {
194 script->OnMapChanged(player);
195 });
196
197 ForeachMaps<WorldMapScript>(map,
198 [&](WorldMapScript* script)
199 {
200 script->OnPlayerEnter(map, player);
201 });
202
203 ForeachMaps<InstanceMapScript>(map,
204 [&](InstanceMapScript* script)
205 {
206 script->OnPlayerEnter((InstanceMap*)map, player);
207 });
208
209 ForeachMaps<BattlegroundMapScript>(map,
210 [&](BattlegroundMapScript* script)
211 {
212 script->OnPlayerEnter((BattlegroundMap*)map, player);
213 });
214}
@ ALLMAPHOOK_ON_PLAYER_ENTER_ALL
Definition: AllMapScript.h:26
virtual void OnMapChanged(Player *)
Definition: PlayerScript.h:348
virtual void OnPlayerEnter(TMap *, Player *)
Definition: ScriptObject.h:108

References ALLMAPHOOK_ON_PLAYER_ENTER_ALL, ASSERT, CALL_ENABLED_HOOKS, and PlayerScript::OnMapChanged().

◆ OnPlayerFailedDelete()

void ScriptMgr::OnPlayerFailedDelete ( ObjectGuid  guid,
uint32  accountId 
)
258{
259 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_FAILED_DELETE, script->OnFailedDelete(guid, accountId));
260}
@ PLAYERHOOK_ON_FAILED_DELETE
Definition: PlayerScript.h:72

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_FAILED_DELETE.

◆ OnPlayerForgotSpell()

void ScriptMgr::OnPlayerForgotSpell ( Player player,
uint32  spellID 
)
148{
149 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_FORGOT_SPELL, script->OnForgotSpell(player, spellID));
150}
@ PLAYERHOOK_ON_FORGOT_SPELL
Definition: PlayerScript.h:53

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_FORGOT_SPELL.

◆ OnPlayerFreeTalentPointsChanged()

void ScriptMgr::OnPlayerFreeTalentPointsChanged ( Player player,
uint32  newPoints 
)
103{
104 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_FREE_TALENT_POINTS_CHANGED, script->OnFreeTalentPointsChanged(player, points));
105}
@ PLAYERHOOK_ON_FREE_TALENT_POINTS_CHANGED
Definition: PlayerScript.h:42

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_FREE_TALENT_POINTS_CHANGED.

◆ OnPlayerHasActivePowerType()

bool ScriptMgr::OnPlayerHasActivePowerType ( Player const *  player,
Powers  power 
)
593{
595}
@ PLAYERHOOK_ON_PLAYER_HAS_ACTIVE_POWER_TYPE
Definition: PlayerScript.h:141

References CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE, and PLAYERHOOK_ON_PLAYER_HAS_ACTIVE_POWER_TYPE.

◆ OnPlayerIsClass()

Optional< bool > ScriptMgr::OnPlayerIsClass ( Player const *  player,
Classes  playerClass,
ClassContext  context 
)
573{
575 return {};
576
578 {
579 Optional<bool> scriptResult = script->OnPlayerIsClass(player, unitClass, context);
580 if (scriptResult)
581 return scriptResult;
582 }
583
584 return {};
585}
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:24
@ PLAYERHOOK_ON_PLAYER_IS_CLASS
Definition: PlayerScript.h:139

References PLAYERHOOK_ON_PLAYER_IS_CLASS.

◆ OnPlayerJoinArena()

void ScriptMgr::OnPlayerJoinArena ( Player player)
358{
359 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_JOIN_ARENA, script->OnPlayerJoinArena(player));
360}
@ PLAYERHOOK_ON_PLAYER_JOIN_ARENA
Definition: PlayerScript.h:96

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_JOIN_ARENA.

◆ OnPlayerJoinBG()

void ScriptMgr::OnPlayerJoinBG ( Player player)
353{
354 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_JOIN_BG, script->OnPlayerJoinBG(player));
355}
@ PLAYERHOOK_ON_PLAYER_JOIN_BG
Definition: PlayerScript.h:95

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_JOIN_BG.

◆ OnPlayerJustDied()

void ScriptMgr::OnPlayerJustDied ( Player player)
53{
54 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_JUST_DIED, script->OnPlayerJustDied(player));
55}
@ PLAYERHOOK_ON_PLAYER_JUST_DIED
Definition: PlayerScript.h:30

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_JUST_DIED.

◆ OnPlayerKilledByCreature()

void ScriptMgr::OnPlayerKilledByCreature ( Creature killer,
Player killed 
)
93{
94 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_KILLED_BY_CREATURE, script->OnPlayerKilledByCreature(killer, killed));
95}
@ PLAYERHOOK_ON_PLAYER_KILLED_BY_CREATURE
Definition: PlayerScript.h:40

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_KILLED_BY_CREATURE.

◆ OnPlayerLearnSpell()

void ScriptMgr::OnPlayerLearnSpell ( Player player,
uint32  spellID 
)
143{
144 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LEARN_SPELL, script->OnLearnSpell(player, spellID));
145}
@ PLAYERHOOK_ON_LEARN_SPELL
Definition: PlayerScript.h:52

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LEARN_SPELL.

◆ OnPlayerLearnTalents()

void ScriptMgr::OnPlayerLearnTalents ( Player player,
uint32  talentId,
uint32  talentRank,
uint32  spellid 
)
838{
839 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_LEARN_TALENTS, script->OnPlayerLearnTalents(player, talentId, talentRank, spellid));
840}
@ PLAYERHOOK_ON_PLAYER_LEARN_TALENTS
Definition: PlayerScript.h:189

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_LEARN_TALENTS.

◆ OnPlayerLeaveCombat()

void ScriptMgr::OnPlayerLeaveCombat ( Player player)
848{
849 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_LEAVE_COMBAT, script->OnPlayerLeaveCombat(player));
850}
@ PLAYERHOOK_ON_PLAYER_LEAVE_COMBAT
Definition: PlayerScript.h:191

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_LEAVE_COMBAT.

◆ OnPlayerLeaveMap()

void ScriptMgr::OnPlayerLeaveMap ( Map map,
Player player 
)
217{
218 ASSERT(map);
219 ASSERT(player);
220
221 CALL_ENABLED_HOOKS(AllMapScript, ALLMAPHOOK_ON_PLAYER_LEAVE_ALL, script->OnPlayerLeaveAll(map, player));
222
223 ForeachMaps<WorldMapScript>(map,
224 [&](WorldMapScript* script)
225 {
226 script->OnPlayerLeave(map, player);
227 });
228
229 ForeachMaps<InstanceMapScript>(map,
230 [&](InstanceMapScript* script)
231 {
232 script->OnPlayerLeave((InstanceMap*)map, player);
233 });
234
235 ForeachMaps<BattlegroundMapScript>(map,
236 [&](BattlegroundMapScript* script)
237 {
238 script->OnPlayerLeave((BattlegroundMap*)map, player);
239 });
240}
@ ALLMAPHOOK_ON_PLAYER_LEAVE_ALL
Definition: AllMapScript.h:27
virtual void OnPlayerLeave(TMap *, Player *)
Definition: ScriptObject.h:111

References ALLMAPHOOK_ON_PLAYER_LEAVE_ALL, ASSERT, CALL_ENABLED_HOOKS, and MapScript< TMap >::OnPlayerLeave().

◆ OnPlayerLevelChanged()

void ScriptMgr::OnPlayerLevelChanged ( Player player,
uint8  oldLevel 
)
98{
99 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LEVEL_CHANGED, script->OnLevelChanged(player, oldLevel));
100}
@ PLAYERHOOK_ON_LEVEL_CHANGED
Definition: PlayerScript.h:41

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LEVEL_CHANGED.

◆ OnPlayerLoadFromDB()

void ScriptMgr::OnPlayerLoadFromDB ( Player player)
228{
229 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LOAD_FROM_DB, script->OnLoadFromDB(player));
230}
@ PLAYERHOOK_ON_LOAD_FROM_DB
Definition: PlayerScript.h:66

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LOAD_FROM_DB.

◆ OnPlayerLogin()

void ScriptMgr::OnPlayerLogin ( Player player)
223{
224 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LOGIN, script->OnLogin(player));
225}
@ PLAYERHOOK_ON_LOGIN
Definition: PlayerScript.h:67

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LOGIN.

◆ OnPlayerLogout()

void ScriptMgr::OnPlayerLogout ( Player player)
238{
239 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LOGOUT, script->OnLogout(player));
240}
@ PLAYERHOOK_ON_LOGOUT
Definition: PlayerScript.h:69

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_LOGOUT.

◆ OnPlayerMoneyChanged()

void ScriptMgr::OnPlayerMoneyChanged ( Player player,
int32 amount 
)
118{
119 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_MONEY_CHANGED, script->OnMoneyChanged(player, amount));
120}
@ PLAYERHOOK_ON_MONEY_CHANGED
Definition: PlayerScript.h:47

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_MONEY_CHANGED.

◆ OnPlayerMove()

void ScriptMgr::OnPlayerMove ( Player player,
MovementInfo  movementInfo,
uint32  opcode 
)
23{
24 CALL_ENABLED_HOOKS(MovementHandlerScript, MOVEMENTHOOK_ON_PLAYER_MOVE, script->OnPlayerMove(player, movementInfo, opcode));
25}
@ MOVEMENTHOOK_ON_PLAYER_MOVE
Definition: MovementHandlerScript.h:27
Definition: MovementHandlerScript.h:32

References CALL_ENABLED_HOOKS, and MOVEMENTHOOK_ON_PLAYER_MOVE.

◆ OnPlayerPVPFlagChange()

void ScriptMgr::OnPlayerPVPFlagChange ( Player player,
bool  state 
)
78{
79 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_PVP_FLAG_CHANGE, script->OnPlayerPVPFlagChange(player, state));
80}
@ PLAYERHOOK_ON_PLAYER_PVP_FLAG_CHANGE
Definition: PlayerScript.h:37

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_PVP_FLAG_CHANGE.

◆ OnPlayerQueueRandomDungeon()

void ScriptMgr::OnPlayerQueueRandomDungeon ( Player player,
uint32 rDungeonId 
)
293{
294 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEUE_RANDOM_DUNGEON, script->OnQueueRandomDungeon(player, rDungeonId));
295}
@ PLAYERHOOK_ON_QUEUE_RANDOM_DUNGEON
Definition: PlayerScript.h:81

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_QUEUE_RANDOM_DUNGEON.

◆ OnPlayerReleasedGhost()

void ScriptMgr::OnPlayerReleasedGhost ( Player player)
63{
64 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_RELEASED_GHOST, script->OnPlayerReleasedGhost(player));
65}
@ PLAYERHOOK_ON_PLAYER_RELEASED_GHOST
Definition: PlayerScript.h:32

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_RELEASED_GHOST.

◆ OnPlayerRemoveFromBattleground()

void ScriptMgr::OnPlayerRemoveFromBattleground ( Player player,
Battleground bg 
)
298{
299 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_REMOVE_FROM_BATTLEGROUND, script->OnRemoveFromBattleground(player, bg));
300}
@ PLAYERHOOK_ON_REMOVE_FROM_BATTLEGROUND
Definition: PlayerScript.h:82

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_REMOVE_FROM_BATTLEGROUND.

◆ OnPlayerReputationChange()

bool ScriptMgr::OnPlayerReputationChange ( Player player,
uint32  factionID,
int32 standing,
bool  incremental 
)
133{
134 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_REPUTATION_CHANGE, !script->OnReputationChange(player, factionID, standing, incremental));
135}
@ PLAYERHOOK_ON_REPUTATION_CHANGE
Definition: PlayerScript.h:50

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_REPUTATION_CHANGE.

◆ OnPlayerReputationRankChange()

void ScriptMgr::OnPlayerReputationRankChange ( Player player,
uint32  factionID,
ReputationRank  newRank,
ReputationRank  oldRank,
bool  increased 
)
138{
139 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_REPUTATION_RANK_CHANGE, script->OnReputationRankChange(player, factionID, newRank, oldRank, increased));
140}
@ PLAYERHOOK_ON_REPUTATION_RANK_CHANGE
Definition: PlayerScript.h:51

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_REPUTATION_RANK_CHANGE.

◆ OnPlayerResurrect()

void ScriptMgr::OnPlayerResurrect ( Player player,
float  restore_percent,
bool  applySickness 
)
803{
804 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_RESURRECT, script->OnPlayerResurrect(player, restore_percent, applySickness));
805}
@ PLAYERHOOK_ON_PLAYER_RESURRECT
Definition: PlayerScript.h:182

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PLAYER_RESURRECT.

◆ OnPlayerSave()

void ScriptMgr::OnPlayerSave ( Player player)
248{
249 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SAVE, script->OnSave(player));
250}
@ PLAYERHOOK_ON_SAVE
Definition: PlayerScript.h:73

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SAVE.

◆ OnPlayerSetPhase()

void ScriptMgr::OnPlayerSetPhase ( const AuraEffect auraEff,
AuraApplication const *  aurApp,
uint8  mode,
bool  apply,
uint32 newPhase 
)
98{
99 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_ON_PLAYER_SET_PHASE, script->OnPlayerSetPhase(auraEff, aurApp, mode, apply, newPhase));
100}
@ MISCHOOK_ON_PLAYER_SET_PHASE
Definition: MiscScript.h:42

References CALL_ENABLED_HOOKS, and MISCHOOK_ON_PLAYER_SET_PHASE.

◆ OnPlayerSpellCast()

void ScriptMgr::OnPlayerSpellCast ( Player player,
Spell spell,
bool  skipCheck 
)
208{
209 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SPELL_CAST, script->OnSpellCast(player, spell, skipCheck));
210}
@ PLAYERHOOK_ON_SPELL_CAST
Definition: PlayerScript.h:65

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SPELL_CAST.

◆ OnPlayerTalentsReset()

void ScriptMgr::OnPlayerTalentsReset ( Player player,
bool  noCost 
)
108{
109 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_TALENTS_RESET, script->OnTalentsReset(player, noCost));
110}
@ PLAYERHOOK_ON_TALENTS_RESET
Definition: PlayerScript.h:43

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_TALENTS_RESET.

◆ OnPlayerTextEmote()

void ScriptMgr::OnPlayerTextEmote ( Player player,
uint32  textEmote,
uint32  emoteNum,
ObjectGuid  guid 
)
203{
204 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_TEXT_EMOTE, script->OnTextEmote(player, textEmote, emoteNum, guid));
205}
@ PLAYERHOOK_ON_TEXT_EMOTE
Definition: PlayerScript.h:64

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_TEXT_EMOTE.

◆ OnPlayerUpdate()

void ScriptMgr::OnPlayerUpdate ( Player player,
uint32  p_time 
)
218{
219 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE, script->OnUpdate(player, p_time));
220}
@ PLAYERHOOK_ON_UPDATE
Definition: PlayerScript.h:46

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE.

◆ OnPlayerUpdateArea()

void ScriptMgr::OnPlayerUpdateArea ( Player player,
uint32  oldArea,
uint32  newArea 
)
273{
274 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_AREA, script->OnUpdateArea(player, oldArea, newArea));
275}
@ PLAYERHOOK_ON_UPDATE_AREA
Definition: PlayerScript.h:76

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE_AREA.

◆ OnPlayerUpdateFaction()

void ScriptMgr::OnPlayerUpdateFaction ( Player player)
283{
284 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_FACTION, script->OnUpdateFaction(player));
285}
@ PLAYERHOOK_ON_UPDATE_FACTION
Definition: PlayerScript.h:79

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE_FACTION.

◆ OnPlayerUpdateZone()

void ScriptMgr::OnPlayerUpdateZone ( Player player,
uint32  newZone,
uint32  newArea 
)
268{
269 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_ZONE, script->OnUpdateZone(player, newZone, newArea));
270}
@ PLAYERHOOK_ON_UPDATE_ZONE
Definition: PlayerScript.h:75

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE_ZONE.

◆ OnPVPKill()

void ScriptMgr::OnPVPKill ( Player killer,
Player killed 
)
73{
74 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PVP_KILL, script->OnPVPKill(killer, killed));
75}
@ PLAYERHOOK_ON_PVP_KILL
Definition: PlayerScript.h:36

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_PVP_KILL.

◆ OnQuestAbandon()

void ScriptMgr::OnQuestAbandon ( Player player,
uint32  questId 
)
853{
854 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEST_ABANDON, script->OnQuestAbandon(player, questId));
855}
@ PLAYERHOOK_ON_QUEST_ABANDON
Definition: PlayerScript.h:192

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_QUEST_ABANDON.

◆ OnQuestAccept() [1/3]

bool ScriptMgr::OnQuestAccept ( Player player,
Creature creature,
Quest const *  quest 
)
84{
85 ASSERT(player);
86 ASSERT(creature);
87 ASSERT(quest);
88
89 auto ret = IsValidBoolScript<AllCreatureScript>([&](AllCreatureScript* script)
90 {
91 return script->CanCreatureQuestAccept(player, creature, quest);
92 });
93
94 if (ret && *ret)
95 {
96 return true;
97 }
98
100 ClearGossipMenuFor(player);
101 return tempScript ? tempScript->OnQuestAccept(player, creature, quest) : false;
102}
virtual bool CanCreatureQuestAccept(Player *, Creature *, Quest const *)
Definition: AllCreatureScript.h:95

References ASSERT, AllCreatureScript::CanCreatureQuestAccept(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnQuestAccept() [2/3]

bool ScriptMgr::OnQuestAccept ( Player player,
GameObject go,
Quest const *  quest 
)
84{
85 ASSERT(player);
86 ASSERT(go);
87 ASSERT(quest);
88
89 auto ret = IsValidBoolScript<AllGameObjectScript>([&](AllGameObjectScript* script)
90 {
91 return script->CanGameObjectQuestAccept(player, go, quest);
92 });
93
94 if (ret && *ret)
95 {
96 return true;
97 }
98
100 ClearGossipMenuFor(player);
101 return tempScript ? tempScript->OnQuestAccept(player, go, quest) : false;
102}
virtual bool CanGameObjectQuestAccept(Player *, GameObject *, Quest const *)
Definition: AllGameObjectScript.h:65

References ASSERT, AllGameObjectScript::CanGameObjectQuestAccept(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ OnQuestAccept() [3/3]

bool ScriptMgr::OnQuestAccept ( Player player,
Item item,
Quest const *  quest 
)
25{
26 ASSERT(player);
27 ASSERT(item);
28 ASSERT(quest);
29
30 auto ret = IsValidBoolScript<AllItemScript>([&](AllItemScript* script)
31 {
32 return !script->CanItemQuestAccept(player, item, quest);
33 });
34
35 if (ret && *ret)
36 {
37 return false;
38 }
39
41 ClearGossipMenuFor(player);
42 return tempScript ? tempScript->OnQuestAccept(player, item, quest) : false;
43}
virtual bool CanItemQuestAccept(Player *, Item *, Quest const *)
Definition: AllItemScript.h:30

References ASSERT, AllItemScript::CanItemQuestAccept(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Item::GetScriptId().

◆ OnQuestComplete()

bool ScriptMgr::OnQuestComplete ( Player player,
Creature creature,
Quest const *  quest 
)
116{
117 ASSERT(player);
118 ASSERT(creature);
119 ASSERT(quest);
120
121 auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId());
122 ClearGossipMenuFor(player);
123 return tempScript ? tempScript->OnQuestComplete(player, creature, quest) : false;
124}

References ASSERT, ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnQuestComputeXP()

void ScriptMgr::OnQuestComputeXP ( Player player,
Quest const *  quest,
uint32 xpValue 
)
488{
489 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEST_COMPUTE_EXP, script->OnQuestComputeXP(player, quest, xpValue));
490}
@ PLAYERHOOK_ON_QUEST_COMPUTE_EXP
Definition: PlayerScript.h:109

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_QUEST_COMPUTE_EXP.

◆ OnQuestReward() [1/2]

bool ScriptMgr::OnQuestReward ( Player player,
Creature creature,
Quest const *  quest,
uint32  opt 
)
127{
128 ASSERT(player);
129 ASSERT(creature);
130 ASSERT(quest);
131
132 auto ret = IsValidBoolScript<AllCreatureScript>([&](AllCreatureScript* script)
133 {
134 return script->CanCreatureQuestReward(player, creature, quest, opt);
135 });
136
137 if (ret && *ret)
138 {
139 return false;
140 }
141
142 auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId());
143 ClearGossipMenuFor(player);
144 return tempScript ? tempScript->OnQuestReward(player, creature, quest, opt) : false;
145}
virtual bool CanCreatureQuestReward(Player *, Creature *, Quest const *, uint32)
Definition: AllCreatureScript.h:98

References ASSERT, AllCreatureScript::CanCreatureQuestReward(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnQuestReward() [2/2]

bool ScriptMgr::OnQuestReward ( Player player,
GameObject go,
Quest const *  quest,
uint32  opt 
)
105{
106 ASSERT(player);
107 ASSERT(go);
108 ASSERT(quest);
109
110 auto ret = IsValidBoolScript<AllGameObjectScript>([&](AllGameObjectScript* script)
111 {
112 return script->CanGameObjectQuestReward(player, go, quest, opt);
113 });
114
115 if (ret && *ret)
116 {
117 return false;
118 }
119
121 ClearGossipMenuFor(player);
122 return tempScript ? tempScript->OnQuestReward(player, go, quest, opt) : false;
123}
virtual bool CanGameObjectQuestReward(Player *, GameObject *, Quest const *, uint32)
Definition: AllGameObjectScript.h:68

References ASSERT, AllGameObjectScript::CanGameObjectQuestReward(), ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and GameObject::GetScriptId().

◆ OnQuestRewardItem()

void ScriptMgr::OnQuestRewardItem ( Player player,
Item item,
uint32  count 
)
388{
389 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEST_REWARD_ITEM, script->OnQuestRewardItem(player, item, count));
390}
@ PLAYERHOOK_ON_QUEST_REWARD_ITEM
Definition: PlayerScript.h:104

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_QUEST_REWARD_ITEM.

◆ OnQuestSelect()

bool ScriptMgr::OnQuestSelect ( Player player,
Creature creature,
Quest const *  quest 
)
105{
106 ASSERT(player);
107 ASSERT(creature);
108 ASSERT(quest);
109
110 auto tempScript = ScriptRegistry<CreatureScript>::GetScriptById(creature->GetScriptId());
111 ClearGossipMenuFor(player);
112 return tempScript ? tempScript->OnQuestSelect(player, creature, quest) : false;
113}

References ASSERT, ClearGossipMenuFor(), ScriptRegistry< TScript >::GetScriptById(), and Creature::GetScriptId().

◆ OnQueueUpdate()

void ScriptMgr::OnQueueUpdate ( BattlegroundQueue queue,
uint32  diff,
BattlegroundTypeId  bgTypeId,
BattlegroundBracketId  bracket_id,
uint8  arenaType,
bool  isRated,
uint32  arenaRating 
)
53{
54 CALL_ENABLED_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE, script->OnQueueUpdate(queue, diff, bgTypeId, bracket_id, arenaType, isRated, arenaRating));
55}
@ ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE
Definition: AllBattlegroundScript.h:32

References ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE, and CALL_ENABLED_HOOKS.

◆ OnQueueUpdateValidity()

bool ScriptMgr::OnQueueUpdateValidity ( BattlegroundQueue queue,
uint32  diff,
BattlegroundTypeId  bgTypeId,
BattlegroundBracketId  bracket_id,
uint8  arenaType,
bool  isRated,
uint32  arenaRating 
)
58{
59 CALL_ENABLED_BOOLEAN_HOOKS(AllBattlegroundScript, ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE_VALIDITY, !script->OnQueueUpdateValidity(queue, diff, bgTypeId, bracket_id, arenaType, isRated, arenaRating));
60}
@ ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE_VALIDITY
Definition: AllBattlegroundScript.h:33

References ALLBATTLEGROUNDHOOK_ON_QUEUE_UPDATE_VALIDITY, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ OnRelocate()

void ScriptMgr::OnRelocate ( Transport transport,
uint32  waypointId,
uint32  mapId,
float  x,
float  y,
float  z 
)
66{
67 if (auto tempScript = ScriptRegistry<TransportScript>::GetScriptById(transport->GetScriptId()))
68 {
69 tempScript->OnRelocate(transport, waypointId, mapId, x, y, z);
70 }
71}

References GameObject::GetScriptId().

◆ OnRemoveAuraScaleTargets()

void ScriptMgr::OnRemoveAuraScaleTargets ( Spell spell,
TargetInfo targetInfo,
uint8  auraScaleMask,
bool &  needErase 
)
63{
64 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_REMOVE_AURA_SCALE_TARGETS, script->OnRemoveAuraScaleTargets(spell, targetInfo, auraScaleMask, needErase));
65}
@ ALLSPELLHOOK_ON_REMOVE_AURA_SCALE_TARGETS
Definition: AllSpellScript.h:34

References ALLSPELLHOOK_ON_REMOVE_AURA_SCALE_TARGETS, and CALL_ENABLED_HOOKS.

◆ OnRemovePassenger() [1/2]

void ScriptMgr::OnRemovePassenger ( Transport transport,
Player player 
)
45{
46 ASSERT(transport);
47 ASSERT(player);
48
49 if (auto tempScript = ScriptRegistry<TransportScript>::GetScriptById(transport->GetScriptId()))
50 {
51 tempScript->OnRemovePassenger(transport, player);
52 }
53}

References ASSERT, and GameObject::GetScriptId().

◆ OnRemovePassenger() [2/2]

void ScriptMgr::OnRemovePassenger ( Vehicle veh,
Unit passenger 
)
80{
81 ASSERT(veh);
82 ASSERT(veh->GetBase()->IsCreature());
83 ASSERT(passenger);
84
86 {
87 tempScript->OnRemovePassenger(veh, passenger);
88 }
89}

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnReset()

void ScriptMgr::OnReset ( Vehicle veh)
45{
46 ASSERT(veh);
47 ASSERT(veh->GetBase()->IsCreature());
48
50 {
51 tempScript->OnReset(veh);
52 }
53}

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnRewardKillRewarder()

void ScriptMgr::OnRewardKillRewarder ( Player player,
KillRewarder rewarder,
bool  isDungeon,
float &  rate 
)
553{
554 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_REWARD_KILL_REWARDER, script->OnRewardKillRewarder(player, rewarder, isDungeon, rate));
555}
@ PLAYERHOOK_ON_REWARD_KILL_REWARDER
Definition: PlayerScript.h:135

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_REWARD_KILL_REWARDER.

◆ OnScaleAuraUnitAdd()

void ScriptMgr::OnScaleAuraUnitAdd ( Spell spell,
Unit target,
uint32  effectMask,
bool  checkIfValid,
bool  implicit,
uint8  auraScaleMask,
TargetInfo targetInfo 
)
58{
59 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_SCALE_AURA_UNIT_ADD, script->OnScaleAuraUnitAdd(spell, target, effectMask, checkIfValid, implicit, auraScaleMask, targetInfo));
60}
@ ALLSPELLHOOK_ON_SCALE_AURA_UNIT_ADD
Definition: AllSpellScript.h:33

References ALLSPELLHOOK_ON_SCALE_AURA_UNIT_ADD, and CALL_ENABLED_HOOKS.

◆ OnSendInitialPacketsBeforeAddToMap()

void ScriptMgr::OnSendInitialPacketsBeforeAddToMap ( Player player,
WorldPacket data 
)
43{
44 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SEND_INITIAL_PACKETS_BEFORE_ADD_TO_MAP, script->OnSendInitialPacketsBeforeAddToMap(player, data));
45}
@ PLAYERHOOK_ON_SEND_INITIAL_PACKETS_BEFORE_ADD_TO_MAP
Definition: PlayerScript.h:33

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SEND_INITIAL_PACKETS_BEFORE_ADD_TO_MAP.

◆ OnSetArenaMaxPlayersPerTeam()

void ScriptMgr::OnSetArenaMaxPlayersPerTeam ( const uint8  arenaType,
uint32 maxPlayerPerTeam 
)
43{
44 CALL_ENABLED_HOOKS(ArenaTeamScript, ARENATEAMHOOK_ON_SET_ARENA_MAX_PLAYERS_PER_TEAM, script->OnSetArenaMaxPlayersPerTeam(arenaType, maxPlayerPerTeam));
45}
@ ARENATEAMHOOK_ON_SET_ARENA_MAX_PLAYERS_PER_TEAM
Definition: ArenaTeamScript.h:31

References ARENATEAMHOOK_ON_SET_ARENA_MAX_PLAYERS_PER_TEAM, and CALL_ENABLED_HOOKS.

◆ OnSetMaxLevel()

void ScriptMgr::OnSetMaxLevel ( Player player,
uint32 maxPlayerLevel 
)
413{
414 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SET_MAX_LEVEL, script->OnSetMaxLevel(player, maxPlayerLevel));
415}
@ PLAYERHOOK_ON_SET_MAX_LEVEL
Definition: PlayerScript.h:120

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SET_MAX_LEVEL.

◆ OnSetServerSideVisibility()

void ScriptMgr::OnSetServerSideVisibility ( Player player,
ServerSideVisibilityType type,
AccountTypes sec 
)
793{
794 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY, script->OnSetServerSideVisibility(player, type, sec));
795}
@ PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY
Definition: PlayerScript.h:180

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY.

◆ OnSetServerSideVisibilityDetect()

void ScriptMgr::OnSetServerSideVisibilityDetect ( Player player,
ServerSideVisibilityType type,
AccountTypes sec 
)
798{
799 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY_DETECT, script->OnSetServerSideVisibilityDetect(player, type, sec));
800}
@ PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY_DETECT
Definition: PlayerScript.h:181

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_SET_SERVER_SIDE_VISIBILITY_DETECT.

◆ OnShutdown()

void ScriptMgr::OnShutdown ( )
68{
70}
@ WORLDHOOK_ON_SHUTDOWN
Definition: WorldScript.h:35

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_SHUTDOWN.

◆ OnShutdownCancel()

void ScriptMgr::OnShutdownCancel ( )
53{
55}
@ WORLDHOOK_ON_SHUTDOWN_CANCEL
Definition: WorldScript.h:32

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_SHUTDOWN_CANCEL.

◆ OnShutdownInitiate()

void ScriptMgr::OnShutdownInitiate ( ShutdownExitCode  code,
ShutdownMask  mask 
)
48{
49 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_SHUTDOWN_INITIATE, script->OnShutdownInitiate(code, mask));
50}
@ WORLDHOOK_ON_SHUTDOWN_INITIATE
Definition: WorldScript.h:31

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_SHUTDOWN_INITIATE.

◆ OnSocketClose()

void ScriptMgr::OnSocketClose ( std::shared_ptr< WorldSocket socket)
40{
41 ASSERT(socket);
42
43 CALL_ENABLED_HOOKS(ServerScript, SERVERHOOK_ON_SOCKET_CLOSE, script->OnSocketClose(socket));
44}
@ SERVERHOOK_ON_SOCKET_CLOSE
Definition: ServerScript.h:29

References ASSERT, CALL_ENABLED_HOOKS, and SERVERHOOK_ON_SOCKET_CLOSE.

◆ OnSocketOpen()

void ScriptMgr::OnSocketOpen ( std::shared_ptr< WorldSocket socket)
33{
34 ASSERT(socket);
35
36 CALL_ENABLED_HOOKS(ServerScript, SERVERHOOK_ON_SOCKET_OPEN, script->OnSocketOpen(socket));
37}
@ SERVERHOOK_ON_SOCKET_OPEN
Definition: ServerScript.h:28

References ASSERT, CALL_ENABLED_HOOKS, and SERVERHOOK_ON_SOCKET_OPEN.

◆ OnSpellCheckCast()

void ScriptMgr::OnSpellCheckCast ( Spell spell,
bool  strict,
SpellCastResult res 
)
38{
39 CALL_ENABLED_HOOKS(AllSpellScript, ALLSPELLHOOK_ON_SPELL_CHECK_CAST, script->OnSpellCheckCast(spell, strict, res));
40}
@ ALLSPELLHOOK_ON_SPELL_CHECK_CAST
Definition: AllSpellScript.h:29

References ALLSPELLHOOK_ON_SPELL_CHECK_CAST, and CALL_ENABLED_HOOKS.

◆ OnSpellHealingBonusTakenNegativeModifiers()

bool ScriptMgr::OnSpellHealingBonusTakenNegativeModifiers ( Unit const *  target,
Unit const *  caster,
SpellInfo const *  spellInfo,
float &  val 
)
93{
94 CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(GlobalScript, GLOBALHOOK_ON_SPELL_HEALING_BONUS_TAKEN_NEGATIVE_MODIFIERS, script->OnSpellHealingBonusTakenNegativeModifiers(target, caster, spellInfo, val));
95}
@ GLOBALHOOK_ON_SPELL_HEALING_BONUS_TAKEN_NEGATIVE_MODIFIERS
Definition: GlobalScript.h:42

References CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE, and GLOBALHOOK_ON_SPELL_HEALING_BONUS_TAKEN_NEGATIVE_MODIFIERS.

◆ OnStartup()

void ScriptMgr::OnStartup ( )
63{
65}
@ WORLDHOOK_ON_STARTUP
Definition: WorldScript.h:34

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_STARTUP.

◆ OnStoreNewItem()

void ScriptMgr::OnStoreNewItem ( Player player,
Item item,
uint32  count 
)
378{
379 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_STORE_NEW_ITEM, script->OnStoreNewItem(player, item, count));
380}
@ PLAYERHOOK_ON_STORE_NEW_ITEM
Definition: PlayerScript.h:102

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_STORE_NEW_ITEM.

◆ OnTransportUpdate()

void ScriptMgr::OnTransportUpdate ( Transport transport,
uint32  diff 
)
56{
57 ASSERT(transport);
58
59 if (auto tempScript = ScriptRegistry<TransportScript>::GetScriptById(transport->GetScriptId()))
60 {
61 tempScript->OnUpdate(transport, diff);
62 }
63}

References ASSERT, and GameObject::GetScriptId().

◆ OnTryExecuteCommand()

bool ScriptMgr::OnTryExecuteCommand ( ChatHandler handler,
std::string_view  cmdStr 
)
28{
29 CALL_ENABLED_BOOLEAN_HOOKS(AllCommandScript, ALLCOMMANDHOOK_ON_TRY_EXECUTE_COMMAND, !script->OnTryExecuteCommand(handler, cmdStr));
30}
@ ALLCOMMANDHOOK_ON_TRY_EXECUTE_COMMAND
Definition: AllCommandScript.h:27

References ALLCOMMANDHOOK_ON_TRY_EXECUTE_COMMAND, and CALL_ENABLED_BOOLEAN_HOOKS.

◆ OnUninstall()

void ScriptMgr::OnUninstall ( Vehicle veh)
34{
35 ASSERT(veh);
36 ASSERT(veh->GetBase()->IsCreature());
37
39 {
40 tempScript->OnUninstall(veh);
41 }
42}

References ASSERT, Vehicle::GetBase(), Creature::GetScriptId(), Object::IsCreature(), and Object::ToCreature().

◆ OnUnitDeath()

void ScriptMgr::OnUnitDeath ( Unit unit,
Unit killer 
)
147{
148 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_UNIT_DEATH, script->OnUnitDeath(unit, killer));
149}
@ UNITHOOK_ON_UNIT_DEATH
Definition: UnitScript.h:47

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_UNIT_DEATH.

◆ OnUnitEnterCombat()

void ScriptMgr::OnUnitEnterCombat ( Unit unit,
Unit victim 
)
142{
143 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_UNIT_ENTER_COMBAT, script->OnUnitEnterCombat(unit, victim));
144}
@ UNITHOOK_ON_UNIT_ENTER_COMBAT
Definition: UnitScript.h:46

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_UNIT_ENTER_COMBAT.

◆ OnUnitEnterEvadeMode()

void ScriptMgr::OnUnitEnterEvadeMode ( Unit unit,
uint8  why 
)
137{
138 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_UNIT_ENTER_EVADE_MODE, script->OnUnitEnterEvadeMode(unit, evadeReason));
139}
@ UNITHOOK_ON_UNIT_ENTER_EVADE_MODE
Definition: UnitScript.h:45

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_UNIT_ENTER_EVADE_MODE.

◆ OnUnitUpdate()

void ScriptMgr::OnUnitUpdate ( Unit unit,
uint32  diff 
)
127{
128 CALL_ENABLED_HOOKS(UnitScript, UNITHOOK_ON_UNIT_UPDATE, script->OnUnitUpdate(unit, diff));
129}
@ UNITHOOK_ON_UNIT_UPDATE
Definition: UnitScript.h:43

References CALL_ENABLED_HOOKS, and UNITHOOK_ON_UNIT_UPDATE.

◆ OnUnloadGridMap()

void ScriptMgr::OnUnloadGridMap ( Map map,
GridMap gmap,
uint32  gx,
uint32  gy 
)
162{
163 ASSERT(map);
164 ASSERT(gmap);
165
166 ForeachMaps<WorldMapScript>(map,
167 [&](WorldMapScript* script)
168 {
169 script->OnUnloadGridMap(map, gmap, gx, gy);
170 });
171
172 ForeachMaps<InstanceMapScript>(map,
173 [&](InstanceMapScript* script)
174 {
175 script->OnUnloadGridMap((InstanceMap*)map, gmap, gx, gy);
176 });
177
178 ForeachMaps<BattlegroundMapScript>(map,
179 [&](BattlegroundMapScript* script)
180 {
181 script->OnUnloadGridMap((BattlegroundMap*)map, gmap, gx, gy);
182 });
183}
virtual void OnUnloadGridMap(TMap *, GridMap *, uint32, uint32)
Definition: ScriptObject.h:105

References ASSERT, and MapScript< TMap >::OnUnloadGridMap().

◆ OnUpdateCraftingSkill()

void ScriptMgr::OnUpdateCraftingSkill ( Player player,
SkillLineAbilityEntry const *  skill,
uint32  currentLevel,
uint32 gain 
)
603{
604 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_CRAFTING_SKILL, script->OnUpdateCraftingSkill(player, skill, currentLevel, gain));
605}
@ PLAYERHOOK_ON_UPDATE_CRAFTING_SKILL
Definition: PlayerScript.h:143

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE_CRAFTING_SKILL.

◆ OnUpdateFishingSkill()

bool ScriptMgr::OnUpdateFishingSkill ( Player player,
int32  skill,
int32  zone_skill,
int32  chance,
int32  roll 
)
608{
609 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_FISHING_SKILL, !script->OnUpdateFishingSkill(player, skill, zone_skill, chance, roll));
610}
@ PLAYERHOOK_ON_UPDATE_FISHING_SKILL
Definition: PlayerScript.h:144

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_ON_UPDATE_FISHING_SKILL.

◆ OnUpdateGatheringSkill()

void ScriptMgr::OnUpdateGatheringSkill ( Player player,
uint32  skillId,
uint32  currentLevel,
uint32  gray,
uint32  green,
uint32  yellow,
uint32 gain 
)
598{
599 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UPDATE_GATHERING_SKILL, script->OnUpdateGatheringSkill(player, skillId, currentLevel, gray, green, yellow, gain));
600}
@ PLAYERHOOK_ON_UPDATE_GATHERING_SKILL
Definition: PlayerScript.h:142

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_UPDATE_GATHERING_SKILL.

◆ OnVictimRewardAfter()

void ScriptMgr::OnVictimRewardAfter ( Player player,
Player victim,
uint32 killer_title,
uint32 victim_rank,
float &  honor_f 
)
623{
624 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_VICTIM_REWARD_AFTER, script->OnVictimRewardAfter(player, victim, killer_title, victim_rank, honor_f));
625}
@ PLAYERHOOK_ON_VICTIM_REWARD_AFTER
Definition: PlayerScript.h:147

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_VICTIM_REWARD_AFTER.

◆ OnVictimRewardBefore()

void ScriptMgr::OnVictimRewardBefore ( Player player,
Player victim,
uint32 killer_title,
uint32 victim_title 
)
618{
619 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_VICTIM_REWARD_BEFORE, script->OnVictimRewardBefore(player, victim, killer_title, victim_title));
620}
@ PLAYERHOOK_ON_VICTIM_REWARD_BEFORE
Definition: PlayerScript.h:146

References CALL_ENABLED_HOOKS, and PLAYERHOOK_ON_VICTIM_REWARD_BEFORE.

◆ OnWeatherChange()

void ScriptMgr::OnWeatherChange ( Weather weather,
WeatherState  state,
float  grade 
)
24{
25 ASSERT(weather);
26
27 ExecuteScript<ElunaScript>([&](ElunaScript* script)
28 {
29 script->OnWeatherChange(weather, state, grade);
30 });
31
32 if (auto tempScript = ScriptRegistry<WeatherScript>::GetScriptById(weather->GetScriptId()))
33 {
34 tempScript->OnChange(weather, state, grade);
35 }
36}
uint32 GetScriptId() const
Definition: Weather.h:79
virtual void OnWeatherChange(Weather *, WeatherState, float)
This hook called when the weather changes in the zone this script is associated with.
Definition: ElunaScript.h:36

References ASSERT, Weather::GetScriptId(), and ElunaScript::OnWeatherChange().

◆ OnWeatherUpdate()

void ScriptMgr::OnWeatherUpdate ( Weather weather,
uint32  diff 
)
39{
40 ASSERT(weather);
41
42 if (auto tempScript = ScriptRegistry<WeatherScript>::GetScriptById(weather->GetScriptId()))
43 {
44 tempScript->OnUpdate(weather, diff);
45 }
46}

References ASSERT, and Weather::GetScriptId().

◆ OnWorldObjectCreate()

void ScriptMgr::OnWorldObjectCreate ( WorldObject object)
30{
31 ASSERT(object);
32
34}
@ WORLDOBJECTHOOK_ON_WORLD_OBJECT_CREATE
Definition: WorldObjectScript.h:27
Definition: WorldObjectScript.h:35

References ASSERT, CALL_ENABLED_HOOKS, and WORLDOBJECTHOOK_ON_WORLD_OBJECT_CREATE.

◆ OnWorldObjectDestroy()

void ScriptMgr::OnWorldObjectDestroy ( WorldObject object)
23{
24 ASSERT(object);
25
27}
@ WORLDOBJECTHOOK_ON_WORLD_OBJECT_DESTROY
Definition: WorldObjectScript.h:26

References ASSERT, CALL_ENABLED_HOOKS, and WORLDOBJECTHOOK_ON_WORLD_OBJECT_DESTROY.

◆ OnWorldObjectResetMap()

void ScriptMgr::OnWorldObjectResetMap ( WorldObject object)
44{
45 ASSERT(object);
46
48}
@ WORLDOBJECTHOOK_ON_WORLD_OBJECT_RESET_MAP
Definition: WorldObjectScript.h:29

References ASSERT, CALL_ENABLED_HOOKS, and WORLDOBJECTHOOK_ON_WORLD_OBJECT_RESET_MAP.

◆ OnWorldObjectSetMap()

void ScriptMgr::OnWorldObjectSetMap ( WorldObject object,
Map map 
)
37{
38 ASSERT(object);
39
40 CALL_ENABLED_HOOKS(WorldObjectScript, WORLDOBJECTHOOK_ON_WORLD_OBJECT_SET_MAP, script->OnWorldObjectSetMap(object, map));
41}
@ WORLDOBJECTHOOK_ON_WORLD_OBJECT_SET_MAP
Definition: WorldObjectScript.h:28

References ASSERT, CALL_ENABLED_HOOKS, and WORLDOBJECTHOOK_ON_WORLD_OBJECT_SET_MAP.

◆ OnWorldObjectUpdate()

void ScriptMgr::OnWorldObjectUpdate ( WorldObject object,
uint32  diff 
)
51{
52 ASSERT(object);
53
54 CALL_ENABLED_HOOKS(WorldObjectScript, WORLDOBJECTHOOK_ON_WORLD_OBJECT_UPDATE, script->OnWorldObjectUpdate(object, diff));
55}
@ WORLDOBJECTHOOK_ON_WORLD_OBJECT_UPDATE
Definition: WorldObjectScript.h:30

References ASSERT, CALL_ENABLED_HOOKS, and WORLDOBJECTHOOK_ON_WORLD_OBJECT_UPDATE.

◆ OnWorldUpdate()

void ScriptMgr::OnWorldUpdate ( uint32  diff)
58{
59 CALL_ENABLED_HOOKS(WorldScript, WORLDHOOK_ON_UPDATE, script->OnUpdate(diff));
60}
@ WORLDHOOK_ON_UPDATE
Definition: WorldScript.h:33

References CALL_ENABLED_HOOKS, and WORLDHOOK_ON_UPDATE.

◆ OnZeroDifferenceCalculation()

void ScriptMgr::OnZeroDifferenceCalculation ( uint8 diff,
uint8  playerLevel 
)
38{
39 CALL_ENABLED_HOOKS(FormulaScript, FORMULAHOOK_ON_ZERO_DIFFERENCE_CALCULATION, script->OnZeroDifferenceCalculation(diff, playerLevel));
40}
@ FORMULAHOOK_ON_ZERO_DIFFERENCE_CALCULATION
Definition: FormulaScript.h:29

References CALL_ENABLED_HOOKS, and FORMULAHOOK_ON_ZERO_DIFFERENCE_CALCULATION.

◆ PassedQuestKilledMonsterCredit()

bool ScriptMgr::PassedQuestKilledMonsterCredit ( Player player,
Quest const *  qinfo,
uint32  entry,
uint32  real_entry,
ObjectGuid  guid 
)
718{
719 CALL_ENABLED_BOOLEAN_HOOKS(PlayerScript, PLAYERHOOK_PASSED_QUEST_KILLED_MONSTER_CREDIT, !script->PassedQuestKilledMonsterCredit(player, qinfo, entry, real_entry, guid));
720}
@ PLAYERHOOK_PASSED_QUEST_KILLED_MONSTER_CREDIT
Definition: PlayerScript.h:165

References CALL_ENABLED_BOOLEAN_HOOKS, and PLAYERHOOK_PASSED_QUEST_KILLED_MONSTER_CREDIT.

◆ PetitionBuy()

void ScriptMgr::PetitionBuy ( Player player,
Creature creature,
uint32 charterid,
uint32 cost,
uint32 type 
)
543{
544 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_PETITION_BUY, script->PetitionBuy(player, creature, charterid, cost, type));
545}
@ PLAYERHOOK_PETITION_BUY
Definition: PlayerScript.h:133

References CALL_ENABLED_HOOKS, and PLAYERHOOK_PETITION_BUY.

◆ PetitionShowList()

void ScriptMgr::PetitionShowList ( Player player,
Creature creature,
uint32 CharterEntry,
uint32 CharterDispayID,
uint32 CharterCost 
)
548{
549 CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_PETITION_SHOW_LIST, script->PetitionShowList(player, creature, CharterEntry, CharterDispayID, CharterCost));
550}
@ PLAYERHOOK_PETITION_SHOW_LIST
Definition: PlayerScript.h:134

References CALL_ENABLED_HOOKS, and PLAYERHOOK_PETITION_SHOW_LIST.

◆ ScriptsVersion()

std::string_view ScriptMgr::ScriptsVersion ( ) const
inline
125{ return "Integrated Azeroth Scripts"; }

◆ SetModulesLoader()

void ScriptMgr::SetModulesLoader ( ModulesLoaderCallbackType  script_loader_callback)
inline

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

144 {
145 _modules_loader_callback = script_loader_callback;
146 }

References _modules_loader_callback.

◆ SetRealmCompleted()

void ScriptMgr::SetRealmCompleted ( AchievementEntry const *  achievement)
23{
24 CALL_ENABLED_HOOKS(AchievementScript, ACHIEVEMENTHOOK_SET_REALM_COMPLETED, script->SetRealmCompleted(achievement));
25}
@ ACHIEVEMENTHOOK_SET_REALM_COMPLETED
Definition: AchievementScript.h:28

References ACHIEVEMENTHOOK_SET_REALM_COMPLETED, and CALL_ENABLED_HOOKS.

◆ 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)

137 {
138 _script_loader_callback = script_loader_callback;
139 }

References _script_loader_callback.

◆ ShouldBeRewardedWithMoneyInsteadOfExp()

bool ScriptMgr::ShouldBeRewardedWithMoneyInsteadOfExp ( Player player)
423{
425}
@ PLAYERHOOK_SHOULD_BE_REWARDED_WITH_MONEY_INSTEAD_OF_EXP
Definition: PlayerScript.h:122

References CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE, and PLAYERHOOK_SHOULD_BE_REWARDED_WITH_MONEY_INSTEAD_OF_EXP.

◆ ShouldTrackValuesUpdatePosByIndex()

bool ScriptMgr::ShouldTrackValuesUpdatePosByIndex ( Unit const *  unit,
uint8  updateType,
uint16  index 
)
117{
118 CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE(UnitScript, UNITHOOK_SHOULD_TRACK_VALUES_UPDATE_POS_BY_INDEX, script->ShouldTrackValuesUpdatePosByIndex(unit, updateType, index));
119}
@ UNITHOOK_SHOULD_TRACK_VALUES_UPDATE_POS_BY_INDEX
Definition: UnitScript.h:41

References CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE, and UNITHOOK_SHOULD_TRACK_VALUES_UPDATE_POS_BY_INDEX.

◆ Unload()

void ScriptMgr::Unload ( )
109{
110 SCR_CLEAR<AccountScript>();
111 SCR_CLEAR<AchievementCriteriaScript>();
112 SCR_CLEAR<AchievementScript>();
113 SCR_CLEAR<AllCreatureScript>();
114 SCR_CLEAR<AllGameObjectScript>();
115 SCR_CLEAR<AllItemScript>();
116 SCR_CLEAR<AllMapScript>();
117 SCR_CLEAR<AreaTriggerScript>();
118 SCR_CLEAR<ArenaScript>();
119 SCR_CLEAR<ArenaTeamScript>();
120 SCR_CLEAR<AuctionHouseScript>();
121 SCR_CLEAR<BGScript>();
122 SCR_CLEAR<BattlegroundMapScript>();
123 SCR_CLEAR<BattlegroundScript>();
124 SCR_CLEAR<CommandSC>();
125 SCR_CLEAR<CommandScript>();
126 SCR_CLEAR<ConditionScript>();
127 SCR_CLEAR<CreatureScript>();
128 SCR_CLEAR<DatabaseScript>();
129 SCR_CLEAR<DynamicObjectScript>();
130 SCR_CLEAR<ElunaScript>();
131 SCR_CLEAR<FormulaScript>();
132 SCR_CLEAR<GameEventScript>();
133 SCR_CLEAR<GameObjectScript>();
134 SCR_CLEAR<GlobalScript>();
135 SCR_CLEAR<GroupScript>();
136 SCR_CLEAR<GuildScript>();
137 SCR_CLEAR<InstanceMapScript>();
138 SCR_CLEAR<ItemScript>();
139 SCR_CLEAR<LootScript>();
140 SCR_CLEAR<MailScript>();
141 SCR_CLEAR<MiscScript>();
142 SCR_CLEAR<MovementHandlerScript>();
143 SCR_CLEAR<OutdoorPvPScript>();
144 SCR_CLEAR<PetScript>();
145 SCR_CLEAR<PlayerScript>();
146 SCR_CLEAR<ServerScript>();
147 SCR_CLEAR<SpellSC>();
148 SCR_CLEAR<SpellScriptLoader>();
149 SCR_CLEAR<TransportScript>();
150 SCR_CLEAR<UnitScript>();
151 SCR_CLEAR<VehicleScript>();
152 SCR_CLEAR<WeatherScript>();
153 SCR_CLEAR<WorldMapScript>();
154 SCR_CLEAR<WorldObjectScript>();
155 SCR_CLEAR<WorldScript>();
156
157 delete[] SpellSummary;
158}

References SpellSummary.

◆ ValidateSpellAtCastSpell()

void ScriptMgr::ValidateSpellAtCastSpell ( Player player,
uint32 oldSpellId,
uint32 spellId,
uint8 castCount,
uint8 castFlags 
)
83{
84 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL, script->ValidateSpellAtCastSpell(player, oldSpellId, spellId, castCount, castFlags));
85}
@ MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL
Definition: MiscScript.h:39

References CALL_ENABLED_HOOKS, and MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL.

◆ ValidateSpellAtCastSpellResult()

void ScriptMgr::ValidateSpellAtCastSpellResult ( Player player,
Unit mover,
Spell spell,
uint32  oldSpellId,
uint32  spellId 
)
88{
89 CALL_ENABLED_HOOKS(MiscScript, MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL_RESULT, script->ValidateSpellAtCastSpellResult(player, mover, spell, oldSpellId, spellId));
90}
@ MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL_RESULT
Definition: MiscScript.h:40

References CALL_ENABLED_HOOKS, and MISCHOOK_VALIDATE_SPELL_AT_CAST_SPELL_RESULT.

◆ ~ScriptMgr()

ScriptMgr::~ScriptMgr ( )
privatevirtual
54{ }

Friends And Related Function Documentation

◆ ScriptObject

friend class ScriptObject
friend

Member Data Documentation

◆ _modules_loader_callback

ModulesLoaderCallbackType ScriptMgr::_modules_loader_callback
private

Referenced by Initialize(), and SetModulesLoader().

◆ _scheduledScripts

std::atomic<long> ScriptMgr::_scheduledScripts
private

◆ _script_loader_callback

ScriptLoaderCallbackType ScriptMgr::_script_loader_callback
private

Referenced by Initialize(), and SetScriptLoader().

◆ _scriptCount

uint32 ScriptMgr::_scriptCount
private