mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
Implemented OnAfterUpdateEncounterState hook
This commit is contained in:
@@ -3110,6 +3110,8 @@ void Map::UpdateEncounterState(EncounterCreditType type, uint32 creditEntry, Uni
|
||||
|
||||
// pussywizard:
|
||||
LogEncounterFinished(type, creditEntry);
|
||||
|
||||
sScriptMgr->OnAfterUpdateEncounterState(this, type, creditEntry, source, difficulty_fixed, encounters, dungeonId);
|
||||
|
||||
if (dungeonId)
|
||||
{
|
||||
|
||||
@@ -1539,6 +1539,11 @@ void ScriptMgr::OnAfterInitializeLockedDungeons(Player* player)
|
||||
FOREACH_SCRIPT(GlobalScript)->OnAfterInitializeLockedDungeons(player);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnAfterUpdateEncounterState(Map* map, EncounterCreditType type, uint32 creditEntry, Unit* source, Difficulty difficulty_fixed, DungeonEncounterList const* encounters, uint32 dungeonCompleted)
|
||||
{
|
||||
FOREACH_SCRIPT(GlobalScript)->OnAfterUpdateEncounterState(map, type, creditEntry, source, difficulty_fixed, encounters, dungeonCompleted);
|
||||
}
|
||||
|
||||
uint32 ScriptMgr::DealDamage(Unit* AttackerUnit, Unit *pVictim, uint32 damage, DamageEffectType damagetype)
|
||||
{
|
||||
FOR_SCRIPTS_RET(UnitScript, itr, end, damage)
|
||||
|
||||
@@ -1015,6 +1015,9 @@ class GlobalScript : public ScriptObject
|
||||
|
||||
// On Before arena points distribution
|
||||
virtual void OnBeforeUpdateArenaPoints(ArenaTeam* /*at*/, std::map<uint32, uint32> & /*ap*/) { }
|
||||
|
||||
// Called when a dungeon encounter is updated.
|
||||
virtual void OnAfterUpdateEncounterState(Map* /*map*/, EncounterCreditType /*type*/, uint32 /*creditEntry*/, Unit* /*source*/, Difficulty /*difficulty_fixed*/, DungeonEncounterList const* /*encounters*/, uint32 /*dungeonCompleted*/) { }
|
||||
};
|
||||
|
||||
// this class can be used to be extended by Modules
|
||||
@@ -1293,6 +1296,7 @@ class ScriptMgr
|
||||
void OnItemRoll(Player const* player, LootStoreItem const* LootStoreItem, float &chance, Loot& loot, LootStore const& store);
|
||||
void OnInitializeLockedDungeons(Player* player, uint8& level, uint32& lockData);
|
||||
void OnAfterInitializeLockedDungeons(Player* player);
|
||||
void OnAfterUpdateEncounterState(Map* map, EncounterCreditType type, uint32 creditEntry, Unit* source, Difficulty difficulty_fixed, DungeonEncounterList const* encounters, uint32 dungeonCompleted);
|
||||
|
||||
|
||||
public: /* Scheduled scripts */
|
||||
|
||||
Reference in New Issue
Block a user