[Commands] Cleanup #appearance Command (#3827)

* [Commands] Cleanup #appearance Command

# Notes
- Cleanup messages and logic.
- Cleanup appearance type constants to use a namespace with constexpr instead.
- Cleanup animation constants to use a namespace with constexpr instead.

* Update emu_constants.cpp

* Cleanup
This commit is contained in:
Alex King
2024-01-06 23:24:32 -05:00
committed by GitHub
parent d2f5dc43a6
commit 259add68f5
33 changed files with 330 additions and 237 deletions
+3 -3
View File
@@ -1411,7 +1411,7 @@ void EntityList::SendZonePVPUpdates(Client *to)
while (it != client_list.end()) {
Client *c = it->second;
if(c->GetPVP())
c->SendAppearancePacket(AT_PVP, c->GetPVP(), true, false, to);
c->SendAppearancePacket(AppearanceType::PVP, c->GetPVP(), true, false, to);
++it;
}
}
@@ -4704,10 +4704,10 @@ void EntityList::SendZoneAppearance(Client *c)
continue;
}
if (cur->GetAppearance() != eaStanding) {
cur->SendAppearancePacket(AT_Anim, cur->GetAppearanceValue(cur->GetAppearance()), false, true, c);
cur->SendAppearancePacket(AppearanceType::Animation, cur->GetAppearanceValue(cur->GetAppearance()), false, true, c);
}
if (cur->GetSize() != cur->GetBaseSize()) {
cur->SendAppearancePacket(AT_Size, (uint32) cur->GetSize(), false, true, c);
cur->SendAppearancePacket(AppearanceType::Size, (uint32) cur->GetSize(), false, true, c);
}
}
++it;