[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))
|
||||
{ return false; }
|
||||
|
||||
// 0 to 1, sending -1 is instand good weather
|
||||
if (grade < 0.0f || grade > 1.0f)
|
||||
{ return false; }
|
||||
// clamp grade from 0 to 1
|
||||
if (grade < 0.0f)
|
||||
grade = 0.0f;
|
||||
else if (grade > 1.0f)
|
||||
grade = 1.0f;
|
||||
|
||||
Player* player = m_session->GetPlayer();
|
||||
uint32 zoneId = player->GetZoneId();
|
||||
|
@ -342,8 +342,7 @@ class WorldSession
|
||||
void SendPlaySpellVisual(ObjectGuid guid, uint32 spellArtKit);
|
||||
void SendItemPageInfo(ItemPrototype* itemProto);
|
||||
|
||||
public: // opcodes handlers
|
||||
|
||||
// opcodes handlers
|
||||
void Handle_NULL(WorldPacket& recvPacket); // not used
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user