mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Commands] Cleanup #doanim Command. (#2540)
* [Commands] Cleanup #doanim Command. - Cleanup messages and logic. - Allow you to use animation names or IDs, could possibly extend this to quest API in the future. * Update dialogue_window.h
This commit is contained in:
+5
-11
@@ -2320,24 +2320,18 @@ void Mob::ShowStats(Client* client)
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter)
|
||||
void Mob::DoAnim(const int animation_id, int animation_speed, bool ackreq, eqFilterType filter)
|
||||
{
|
||||
if (!attack_anim_timer.Check()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_Animation, sizeof(Animation_Struct));
|
||||
auto *anim = (Animation_Struct *) outapp->pBuffer;
|
||||
anim->spawnid = GetID();
|
||||
auto *a = (Animation_Struct *) outapp->pBuffer;
|
||||
|
||||
if (type == 0) {
|
||||
anim->action = animnum;
|
||||
anim->speed = 10;
|
||||
}
|
||||
else {
|
||||
anim->action = animnum;
|
||||
anim->speed = type;
|
||||
}
|
||||
a->spawnid = GetID();
|
||||
a->action = animation_id;
|
||||
a->speed = animation_speed ? animation_speed : 10;
|
||||
|
||||
entity_list.QueueCloseClients(
|
||||
this, /* Sender */
|
||||
|
||||
Reference in New Issue
Block a user