aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Player
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2015-08-09 01:30:58 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2015-08-09 01:30:58 +0200
commit00a77230bdee8bb7e6483e77aaa8b7127b712931 (patch)
tree7caf27a73ac890d9d3cfe16c35903228f7948659 /src/server/game/Entities/Player
parenta2969358d9769c0d608bd349b2700811ae60631f (diff)
Core/PacketIO: Updated and enabled SMSG_RAID_GROUP_ONLY opcode
Diffstat (limited to 'src/server/game/Entities/Player')
-rw-r--r--src/server/game/Entities/Player/Player.cpp25
-rw-r--r--src/server/game/Entities/Player/Player.h1
2 files changed, 14 insertions, 12 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index f36f3162399..4165728ae7d 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -21689,14 +21689,9 @@ void Player::UpdateHomebindTime(uint32 time)
// GMs never get homebind timer online
if (m_InstanceValid || IsGameMaster())
{
- if (m_HomebindTimer) // instance valid, but timer not reset
- {
- // hide reminder
- WorldPacket data(SMSG_RAID_GROUP_ONLY, 4+4);
- data << uint32(0);
- data << uint32(0);
- GetSession()->SendPacket(&data);
- }
+ if (m_HomebindTimer) // instance valid, but timer not reset
+ SendRaidGroupOnlyMessage(RAID_GROUP_ERR_NONE, 0);
+
// instance is valid, reset homebind timer
m_HomebindTimer = 0;
}
@@ -21715,10 +21710,7 @@ void Player::UpdateHomebindTime(uint32 time)
// instance is invalid, start homebind timer
m_HomebindTimer = 60000;
// send message to player
- WorldPacket data(SMSG_RAID_GROUP_ONLY, 4+4);
- data << uint32(m_HomebindTimer);
- data << uint32(1);
- GetSession()->SendPacket(&data);
+ SendRaidGroupOnlyMessage(RAID_GROUP_ERR_REQUIREMENTS_UNMATCH, m_HomebindTimer);
TC_LOG_DEBUG("maps", "PLAYER: Player '%s' (%s) will be teleported to homebind in 60 seconds", GetName().c_str(), GetGUID().ToString().c_str());
}
}
@@ -26766,3 +26758,12 @@ void Player::SendSpellCategoryCooldowns()
SendDirectMessage(cooldowns.Write());
}
+
+void Player::SendRaidGroupOnlyMessage(RaidGroupReason reason, int32 delay)
+{
+ WorldPackets::Instance::RaidGroupOnly raidGroupOnly;
+ raidGroupOnly.Delay = delay;
+ raidGroupOnly.Reason = reason;
+
+ GetSession()->SendPacket(raidGroupOnly.Write());
+}
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 99f6154bede..50c2852ba6e 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -2051,6 +2051,7 @@ class Player : public Unit, public GridObject<Player>
static Difficulty CheckLoadedDungeonDifficultyID(Difficulty difficulty);
static Difficulty CheckLoadedRaidDifficultyID(Difficulty difficulty);
static Difficulty CheckLoadedLegacyRaidDifficultyID(Difficulty difficulty);
+ void SendRaidGroupOnlyMessage(RaidGroupReason reason, int32 delay);
bool UpdateSkill(uint32 skill_id, uint32 step);
bool UpdateSkillPro(uint16 skillId, int32 chance, uint32 step);