Core/Packet: MIRROR_TIMER (#10885)
This commit is contained in:
committed by
GitHub
parent
2a46be4e44
commit
a5cb274222
@@ -737,22 +737,13 @@ void Player::SendMirrorTimer(MirrorTimerType Type, uint32 MaxValue, uint32 Curre
|
|||||||
StopMirrorTimer(Type);
|
StopMirrorTimer(Type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WorldPacket data(SMSG_START_MIRROR_TIMER, (21));
|
SendDirectMessage(WorldPackets::Misc::StartMirrorTimer(Type, CurrentValue, MaxValue, Regen, 0, 0).Write());
|
||||||
data << (uint32)Type;
|
|
||||||
data << CurrentValue;
|
|
||||||
data << MaxValue;
|
|
||||||
data << Regen;
|
|
||||||
data << (uint8)0;
|
|
||||||
data << (uint32)0; // spell id
|
|
||||||
GetSession()->SendPacket(&data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::StopMirrorTimer(MirrorTimerType Type)
|
void Player::StopMirrorTimer(MirrorTimerType Type)
|
||||||
{
|
{
|
||||||
m_MirrorTimer[Type] = DISABLED_MIRROR_TIMER;
|
m_MirrorTimer[Type] = DISABLED_MIRROR_TIMER;
|
||||||
WorldPacket data(SMSG_STOP_MIRROR_TIMER, 4);
|
SendDirectMessage(WorldPackets::Misc::StopMirrorTimer(Type).Write());
|
||||||
data << (uint32)Type;
|
|
||||||
GetSession()->SendPacket(&data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::IsImmuneToEnvironmentalDamage()
|
bool Player::IsImmuneToEnvironmentalDamage()
|
||||||
|
|||||||
@@ -83,6 +83,33 @@ WorldPacket const* WorldPackets::Misc::RandomRoll::Write()
|
|||||||
return &_worldPacket;
|
return &_worldPacket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WorldPacket const* WorldPackets::Misc::StartMirrorTimer::Write()
|
||||||
|
{
|
||||||
|
_worldPacket << uint32(Timer);
|
||||||
|
_worldPacket << uint32(Value);
|
||||||
|
_worldPacket << uint32(MaxValue);
|
||||||
|
_worldPacket << int32(Scale);
|
||||||
|
_worldPacket << uint8(Paused);
|
||||||
|
_worldPacket << uint32(SpellID);
|
||||||
|
|
||||||
|
return &_worldPacket;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorldPacket const* WorldPackets::Misc::PauseMirrorTimer::Write()
|
||||||
|
{
|
||||||
|
_worldPacket << uint32(Timer);
|
||||||
|
_worldPacket << uint8(Paused);
|
||||||
|
|
||||||
|
return &_worldPacket;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorldPacket const* WorldPackets::Misc::StopMirrorTimer::Write()
|
||||||
|
{
|
||||||
|
_worldPacket << uint32(Timer);
|
||||||
|
|
||||||
|
return &_worldPacket;
|
||||||
|
}
|
||||||
|
|
||||||
WorldPacket const* WorldPackets::Misc::CrossedInebriationThreshold::Write()
|
WorldPacket const* WorldPackets::Misc::CrossedInebriationThreshold::Write()
|
||||||
{
|
{
|
||||||
_worldPacket << Guid;
|
_worldPacket << Guid;
|
||||||
|
|||||||
@@ -114,6 +114,46 @@ namespace WorldPackets
|
|||||||
ObjectGuid Roller;
|
ObjectGuid Roller;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class StartMirrorTimer final : public ServerPacket
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
StartMirrorTimer() : ServerPacket(SMSG_START_MIRROR_TIMER, 21) { }
|
||||||
|
StartMirrorTimer(uint32 timer, uint32 value, uint32 maxValue, int32 scale, bool paused, uint32 spellID) :
|
||||||
|
ServerPacket(SMSG_START_MIRROR_TIMER, 21), Timer(timer), Value(value), MaxValue(maxValue), Scale(scale), Paused(paused), SpellID(spellID) { }
|
||||||
|
|
||||||
|
WorldPacket const* Write() override;
|
||||||
|
|
||||||
|
uint32 Timer = 0;
|
||||||
|
uint32 Value = 0;
|
||||||
|
uint32 MaxValue = 0;
|
||||||
|
int32 Scale = 0;
|
||||||
|
bool Paused = false;
|
||||||
|
uint32 SpellID = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PauseMirrorTimer final : public ServerPacket
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PauseMirrorTimer() : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 5) { }
|
||||||
|
PauseMirrorTimer(uint32 timer, bool paused) : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 5), Timer(timer), Paused(paused) { }
|
||||||
|
|
||||||
|
WorldPacket const* Write() override;
|
||||||
|
|
||||||
|
uint32 Timer = 0;
|
||||||
|
bool Paused = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
class StopMirrorTimer final : public ServerPacket
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
StopMirrorTimer() : ServerPacket(SMSG_STOP_MIRROR_TIMER, 4) { }
|
||||||
|
StopMirrorTimer(uint32 timer) : ServerPacket(SMSG_STOP_MIRROR_TIMER, 4), Timer(timer) { }
|
||||||
|
|
||||||
|
WorldPacket const* Write() override;
|
||||||
|
|
||||||
|
uint32 Timer = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class DurabilityDamageDeath final : public ServerPacket
|
class DurabilityDamageDeath final : public ServerPacket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user