Skip to content

Commit

Permalink
* Fix Vip List not updating when training status
Browse files Browse the repository at this point in the history
  • Loading branch information
jprzimba committed Dec 17, 2024
1 parent 277fef4 commit 32c859c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/creatures/players/vip/player_vip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class PlayerVIP {
VipStatus_t getStatus() const {
return status;
}

void setStatus(VipStatus_t newStatus) {
status = newStatus;
}
Expand Down
8 changes: 4 additions & 4 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7431,20 +7431,20 @@ void ProtocolGame::sendPodiumWindow(const std::shared_ptr<Item> &podium, const P
writeToOutputBuffer(msg);
}

void ProtocolGame::sendUpdatedVIPStatus(uint32_t guid, VipStatus_t newStatus) {
if (oldProtocol && newStatus == VipStatus_t::TRAINING) {
void ProtocolGame::sendUpdatedVIPStatus(uint32_t guid, VipStatus_t status) {
if (oldProtocol) {
return;
}

NetworkMessage msg;
msg.addByte(0xD3);
msg.add<uint32_t>(guid);
msg.addByte(enumToValue(newStatus));
msg.addByte(enumToValue(status));
writeToOutputBuffer(msg);
}

void ProtocolGame::sendVIP(uint32_t guid, const std::string &name, const std::string &description, uint32_t icon, bool notify, VipStatus_t status) {
if (oldProtocol && status == VipStatus_t::TRAINING) {
if (oldProtocol) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/network/protocol/protocolgame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ class ProtocolGame final : public Protocol {
void sendOutfitWindow();
void sendPodiumWindow(const std::shared_ptr<Item> &podium, const Position &position, uint16_t itemId, uint8_t stackpos);

void sendUpdatedVIPStatus(uint32_t guid, VipStatus_t newStatus);
void sendUpdatedVIPStatus(uint32_t guid, VipStatus_t status);
void sendVIP(uint32_t guid, const std::string &name, const std::string &description, uint32_t icon, bool notify, VipStatus_t status);
void sendVIPGroups();

Expand Down

0 comments on commit 32c859c

Please sign in to comment.