diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/BattleGroundMgr.cpp | 20 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 | ||||
-rw-r--r-- | src/game/World.cpp | 1 | ||||
-rw-r--r-- | src/game/World.h | 1 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 1 |
5 files changed, 22 insertions, 3 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 1ed34fe01d2..371c204717d 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -376,9 +376,25 @@ void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, const uint64& playe char const* bgName = bg->GetName(); if (isAddedToQueue) - sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + { + if (sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY)) + { + if(Player *plr = objmgr.GetPlayer(playerGUID)) + ChatHandler(plr).PSendSysMessage(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + } + else + sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + } else - sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + { + if (sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY)) + { + if(Player *plr = objmgr.GetPlayer(playerGUID)) + ChatHandler(plr).PSendSysMessage(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + } + else + sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + } } } else //if BG diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 53b3d8cf569..e107eb90f55 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -212,7 +212,7 @@ void Unit::Update( uint32 p_time ) _UpdateSpells( p_time ); // update combat timer only for players and pets - if (isInCombat() && (GetTypeId() == TYPEID_PLAYER || ((Creature*)this)->isPet() || ((Creature*)this)->isCharmed())) + if (isInCombat() && IsControlledByPlayer()) { // Check UNIT_STAT_MELEE_ATTACKING or UNIT_STAT_CHASE (without UNIT_STAT_FOLLOW in this case) so pets can reach far away // targets without stopping half way there and running off. diff --git a/src/game/World.cpp b/src/game/World.cpp index 3b72d0d2d02..608aaec01d5 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -966,6 +966,7 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfig.GetBoolDefault("Arena.AutoDistributePoints", false); m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = sConfig.GetIntDefault ("Arena.AutoDistributeInterval", 7); m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.Enable", false); + m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.PlayerOnly", false); m_configs[CONFIG_ARENA_SEASON_ID] = sConfig.GetIntDefault ("Arena.ArenaSeason.ID", 1); m_configs[CONFIG_ARENA_SEASON_IN_PROGRESS] = sConfig.GetBoolDefault("Arena.ArenaSeason.InProgress", true); diff --git a/src/game/World.h b/src/game/World.h index d8bb7477568..4fbde8ccb71 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -212,6 +212,7 @@ enum WorldConfigs CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS, CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, + CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY, CONFIG_ARENA_SEASON_ID, CONFIG_ARENA_SEASON_IN_PROGRESS, CONFIG_MAX_WHO, diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 4cb5ec233c1..c35a6efa952 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -1404,6 +1404,7 @@ Arena.RatingDiscardTimer = 600000 Arena.AutoDistributePoints = 0 Arena.AutoDistributeInterval = 7 Arena.QueueAnnouncer.Enable = 0 +Arena.QueueAnnouncer.PlayerOnly = 0 Arena.ArenaSeason.ID = 1 Arena.ArenaSeason.InProgress = 1 |