diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp index 0dfd50771..d8130aa5b 100644 --- a/src/game/ArenaTeam.cpp +++ b/src/game/ArenaTeam.cpp @@ -21,6 +21,17 @@ #include "ObjectGuid.h" #include "ArenaTeam.h" #include "World.h" +#include "Player.h" + +void ArenaTeamMember::ModifyPersonalRating(Player* plr, int32 mod, uint32 slot) +{ + if (int32(personal_rating) + mod < 0) + personal_rating = 0; + else + personal_rating += mod; + if(plr) + plr->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, personal_rating); +} ArenaTeam::ArenaTeam() { diff --git a/src/game/ArenaTeam.h b/src/game/ArenaTeam.h index ae8386acd..dd5169c1e 100644 --- a/src/game/ArenaTeam.h +++ b/src/game/ArenaTeam.h @@ -19,6 +19,14 @@ #ifndef MANGOSSERVER_ARENATEAM_H #define MANGOSSERVER_ARENATEAM_H +#include "Common.h" +#include "ObjectGuid.h" + +class QueryResult; +class WorldPacket; +class WorldSession; +class Player; + enum ArenaTeamCommandTypes { ERR_ARENA_TEAM_CREATE_S = 0x00, @@ -96,15 +104,7 @@ struct ArenaTeamMember uint32 wins_season; uint32 personal_rating; - void ModifyPersonalRating(Player* plr, int32 mod, uint32 slot) - { - if (int32(personal_rating) + mod < 0) - personal_rating = 0; - else - personal_rating += mod; - if(plr) - plr->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, personal_rating); - } + void ModifyPersonalRating(Player* plr, int32 mod, uint32 slot); }; struct ArenaTeamStats diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index a2583c694..e8edd22db 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -775,6 +775,12 @@ ChatCommand * ChatHandler::getCommandTable() return commandTable; } +ChatHandler::ChatHandler(WorldSession* session) : m_session(session) {} + +ChatHandler::ChatHandler(Player* player) : m_session(player->GetSession()) {} + +ChatHandler::~ChatHandler() {} + const char *ChatHandler::GetMangosString(int32 entry) const { return m_session->GetMangosString(entry); @@ -796,6 +802,11 @@ bool ChatHandler::isAvailable(ChatCommand const& cmd) const return GetAccessLevel() >= (AccountTypes)cmd.SecurityLevel; } +std::string ChatHandler::GetNameLink() const +{ + return GetNameLink(m_session->GetPlayer()); +} + bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong) { WorldSession* target_session = NULL; @@ -3251,6 +3262,11 @@ uint32 ChatHandler::ExtractAccountId(char** args, std::string* accountName /*= N return account_id; } +std::string ChatHandler::GetNameLink(Player* chr) const +{ + return playerLink(chr->GetName()); +} + bool ChatHandler::needReportToTarget(Player* chr) const { Player* pl = m_session->GetPlayer(); diff --git a/src/game/Chat.h b/src/game/Chat.h index cdf0e5e6f..80463bc90 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -25,13 +25,19 @@ struct AchievementEntry; struct AreaTrigger; +struct AreaTriggerEntry; struct FactionEntry; struct FactionState; struct GameTele; +struct SpellEntry; +class QueryResult; class ChatHandler; class WorldSession; +class WorldPacket; class GMTicket; +class Object; +class GameObject; class Creature; class Player; class Unit; @@ -57,9 +63,9 @@ enum ChatCommandSearchResult class ChatHandler { public: - explicit ChatHandler(WorldSession* session) : m_session(session) {} - explicit ChatHandler(Player* player) : m_session(player->GetSession()) {} - ~ChatHandler() {} + explicit ChatHandler(WorldSession* session); + explicit ChatHandler(Player* player); + ~ChatHandler(); static void FillMessageData( WorldPacket *data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker); @@ -97,7 +103,7 @@ class ChatHandler virtual uint32 GetAccountId() const; virtual AccountTypes GetAccessLevel() const; virtual bool isAvailable(ChatCommand const& cmd) const; - virtual std::string GetNameLink() const { return GetNameLink(m_session->GetPlayer()); } + virtual std::string GetNameLink() const; virtual bool needReportToTarget(Player* chr) const; virtual LocaleConstant GetSessionDbcLocale() const; virtual int GetSessionDbLocaleIndex() const; @@ -597,7 +603,7 @@ class ChatHandler // select by arg (name/link) or in-game selection online/offline player std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:"+name+"|h["+name+"]|h|r" : name; } - std::string GetNameLink(Player* chr) const { return playerLink(chr->GetName()); } + std::string GetNameLink(Player* chr) const; GameObject* GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid,uint32 entry); diff --git a/src/game/Group.h b/src/game/Group.h index 732e7fe18..45a949ad6 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -19,6 +19,8 @@ #ifndef MANGOSSERVER_GROUP_H #define MANGOSSERVER_GROUP_H +#include "Common.h" +#include "ObjectGuid.h" #include "GroupReference.h" #include "GroupRefManager.h" #include "BattleGround.h" @@ -29,8 +31,13 @@ #include struct ItemPrototype; + +class WorldSession; +class Map; class BattleGround; class InstanceSave; +class Field; +class Unit; #define MAX_GROUP_SIZE 5 #define MAX_RAID_SIZE 40 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8ebd8ce1f..c6883116d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10412" + #define REVISION_NR "10413" #endif // __REVISION_NR_H__