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