[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
+4 -4
View File
@@ -472,8 +472,8 @@ void Client::AI_Start(uint32 iMoveDelay) {
return;
pClientSideTarget = GetTarget() ? GetTarget()->GetID() : 0;
SendAppearancePacket(AT_Anim, ANIM_FREEZE); // this freezes the client
SendAppearancePacket(AT_Linkdead, 1); // Sending LD packet so *LD* appears by the player name when charmed/feared -Kasai
SendAppearancePacket(AppearanceType::Animation, Animation::Freeze); // this freezes the client
SendAppearancePacket(AppearanceType::Linkdead, 1); // Sending LD packet so *LD* appears by the player name when charmed/feared -Kasai
SetAttackTimer();
SetFeigned(false);
}
@@ -537,8 +537,8 @@ void Client::AI_Stop() {
safe_delete(app);
SetTarget(entity_list.GetMob(pClientSideTarget));
SendAppearancePacket(AT_Anim, GetAppearanceValue(GetAppearance()));
SendAppearancePacket(AT_Linkdead, 0); // Removing LD packet so *LD* no longer appears by the player name when charmed/feared -Kasai
SendAppearancePacket(AppearanceType::Animation, GetAppearanceValue(GetAppearance()));
SendAppearancePacket(AppearanceType::Linkdead, 0); // Removing LD packet so *LD* no longer appears by the player name when charmed/feared -Kasai
if (!auto_attack) {
attack_timer.Disable();
attack_dw_timer.Disable();