Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ public void KeyframeEvent(string keyName) {
case ActorState.PcSkill:
StateSkillEvent(keyName);
break;
case ActorState.Idle:
case ActorState.Emotion:
case ActorState.EmotionIdle:
StateEmoteEvent(keyName);
Expand Down Expand Up @@ -224,6 +225,7 @@ public void Update(long tickCount) {
case ActorState.PcSkill:
StateSkillCastUpdate(tickCount, tickDelta);
break;
case ActorState.Idle:
case ActorState.Emotion:
case ActorState.EmotionIdle:
EmoteStateUpdate(tickCount, tickDelta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ private void Emote(NpcTask task, string sequence, bool isIdle, float duration) {
emoteActionTask = task;
stateSequence = actor.AnimationState.PlayingSequence;

SetState(isIdle ? ActorState.Emotion : ActorState.EmotionIdle);
SetState(isIdle ? ActorState.Idle : ActorState.Emotion);
}
}
4 changes: 3 additions & 1 deletion Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ public virtual void Animate(string sequenceName, float duration = -1f) {
return;
}

idleTask = MovementState.TryEmote(sequence.Name, false, duration);
bool isIdle = sequenceName.Contains("idle", StringComparison.OrdinalIgnoreCase);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little on the fence about blanket calling animations with idle in the name an idle task, behavior-wise, but it is worth a shot. If it breaks anything we can take a closer look when we discover it.


idleTask = MovementState.TryEmote(sequence.Name, isIdle, duration);
}

public void DropLoot(FieldPlayer firstPlayer) {
Expand Down