mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "Language.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
ArenaTeamMgr::ArenaTeamMgr()
|
||||
{
|
||||
@@ -140,7 +141,10 @@ void ArenaTeamMgr::DistributeArenaPoints()
|
||||
// At first update all points for all team members
|
||||
for (ArenaTeamContainer::iterator teamItr = GetArenaTeamMapBegin(); teamItr != GetArenaTeamMapEnd(); ++teamItr)
|
||||
if (ArenaTeam* at = teamItr->second)
|
||||
{
|
||||
at->UpdateArenaPointsHelper(PlayerPoints);
|
||||
sScriptMgr->OnBeforeUpdateArenaPoints(at, PlayerPoints);
|
||||
}
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
|
||||
@@ -1450,6 +1450,11 @@ void ScriptMgr::OnGlobalMirrorImageDisplayItem(const Item *item, uint32 &display
|
||||
FOREACH_SCRIPT(GlobalScript)->OnMirrorImageDisplayItem(item,display);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeUpdateArenaPoints(ArenaTeam* at, std::map<uint32, uint32> &ap)
|
||||
{
|
||||
FOREACH_SCRIPT(GlobalScript)->OnBeforeUpdateArenaPoints(at,ap);
|
||||
}
|
||||
|
||||
SpellScriptLoader::SpellScriptLoader(const char* name)
|
||||
: ScriptObject(name)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Weather.h"
|
||||
#include "AchievementMgr.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "ArenaTeam.h"
|
||||
|
||||
class AuctionHouseObject;
|
||||
class AuraScript;
|
||||
@@ -883,6 +884,9 @@ class GlobalScript : public ScriptObject
|
||||
// items
|
||||
virtual void OnItemDelFromDB(SQLTransaction& /*trans*/, uint32 /*itemGuid*/) { }
|
||||
virtual void OnMirrorImageDisplayItem(const Item* /*item*/, uint32& /*display*/) { }
|
||||
|
||||
// On Before arena points distribution
|
||||
virtual void OnBeforeUpdateArenaPoints(ArenaTeam* /*at*/, std::map<uint32, uint32> & /*ap*/) { }
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
@@ -1128,6 +1132,7 @@ class ScriptMgr
|
||||
public: /* GlobalScript */
|
||||
void OnGlobalItemDelFromDB(SQLTransaction& trans, uint32 itemGuid);
|
||||
void OnGlobalMirrorImageDisplayItem(const Item *item, uint32 &display);
|
||||
void OnBeforeUpdateArenaPoints(ArenaTeam* at, std::map<uint32, uint32> &ap);
|
||||
|
||||
public: /* Scheduled scripts */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user