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 
)