예제 #1
0
        public static async Task InteractWithNpc(GCNpc npc)
        {
            if (Core.Me.GrandCompany == 0)
            {
                return;
            }
            var targetNpc = GameObjectManager.GetObjectByNPCId(NpcList[Core.Me.GrandCompany][npc]);

            if (targetNpc == null || !targetNpc.IsWithinInteractRange)
            {
                await GetToGCBase();

                targetNpc = GameObjectManager.GetObjectByNPCId(NpcList[Core.Me.GrandCompany][npc]);
            }

            if (targetNpc == null)
            {
                return;
            }
            if (!targetNpc.IsWithinInteractRange)
            {
                await Navigation.OffMeshMoveInteract(targetNpc);
            }
            if (targetNpc.IsWithinInteractRange)
            {
                targetNpc.Interact();
            }
        }
예제 #2
0
 public static uint GetNpcByType(GCNpc npc)
 {
     return(NpcList[Core.Me.GrandCompany][npc]);
 }
예제 #3
0
 public static uint GetNpcByType(GCNpc npc, GrandCompany grandCompany)
 {
     return(NpcList[grandCompany][npc]);
 }