Skip to content

Commit

Permalink
Fix compilation failure due to updated notifier interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Oct 30, 2024
1 parent 20b7dfb commit 4495d93
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions EOBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,20 @@ public void ShowNPCSpeechBubble(int npcIndex, string message)
{
}

public void StartNPCAttackAnimation(int npcIndex)
public void StartNPCAttackAnimation(int npcIndex, EODirection direction)
{
}

public void StartNPCWalkAnimation(int npcIndex)
public void StartNPCWalkAnimation(int npcIndex, MapCoordinate coordinate, EODirection direction)
{
// immediately walk the NPC to the destination index
var npc = _currentMapStateRepository.NPCs.SingleOrDefault(x => x.Index == npcIndex);
if (npc == null) return;

var newNpc = npc.WithX(npc.GetDestinationX()).WithY(npc.GetDestinationY()).WithFrame(NPCFrame.Standing);
_currentMapStateRepository.NPCs.Remove(npc);
_currentMapStateRepository.NPCs.Add(newNpc);
if (_currentMapStateRepository.NPCs.TryGetValue(npcIndex, out var npc))
{
// immediately walk the NPC to the destination index
_currentMapStateRepository.NPCs.Update(
npc,
npc.WithDirection(direction).WithX(coordinate.X).WithY(coordinate.Y)
);
}
}

public void NPCDropItem(MapItem item)
Expand Down

0 comments on commit 4495d93

Please sign in to comment.