[Core] Clarify weather packet (c2649)
Also clamp weather density for .wchange command instead of just return an error Thanks to @Laizerox for info and @cala for testing
This commit is contained in:
parent
63343716b5
commit
4edda934a8
@ -4229,9 +4229,11 @@ bool ChatHandler::HandleChangeWeatherCommand(char* args)
|
|||||||
if (!ExtractFloat(&args, grade))
|
if (!ExtractFloat(&args, grade))
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
// 0 to 1, sending -1 is instand good weather
|
// clamp grade from 0 to 1
|
||||||
if (grade < 0.0f || grade > 1.0f)
|
if (grade < 0.0f)
|
||||||
{ return false; }
|
grade = 0.0f;
|
||||||
|
else if (grade > 1.0f)
|
||||||
|
grade = 1.0f;
|
||||||
|
|
||||||
Player* player = m_session->GetPlayer();
|
Player* player = m_session->GetPlayer();
|
||||||
uint32 zoneId = player->GetZoneId();
|
uint32 zoneId = player->GetZoneId();
|
||||||
|
@ -342,8 +342,7 @@ class WorldSession
|
|||||||
void SendPlaySpellVisual(ObjectGuid guid, uint32 spellArtKit);
|
void SendPlaySpellVisual(ObjectGuid guid, uint32 spellArtKit);
|
||||||
void SendItemPageInfo(ItemPrototype* itemProto);
|
void SendItemPageInfo(ItemPrototype* itemProto);
|
||||||
|
|
||||||
public: // opcodes handlers
|
// opcodes handlers
|
||||||
|
|
||||||
void Handle_NULL(WorldPacket& recvPacket); // not used
|
void Handle_NULL(WorldPacket& recvPacket); // not used
|
||||||
void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead
|
void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead
|
||||||
void Handle_ServerSide(WorldPacket& recvPacket); // sever side only, can't be accepted from client
|
void Handle_ServerSide(WorldPacket& recvPacket); // sever side only, can't be accepted from client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user