Ejemplo n.º 1
0
        private void PrintMapId(IAccount account)
        {
            var pos = D2OParsing.GetMapCoordinates(account.Character.MapId);

            Logger.Default.Log($"MapID : {account.Character.MapId} | [{pos.X};{pos.Y}]",
                               LogMessageType.Admin);
        }
Ejemplo n.º 2
0
        public void OnCommand(DofusClient client, string[] args)
        {
            var pos = D2OParsing.GetMapCoordinates(client.Account.Character.MapId);

            client.Logger.Log($"MapID : {client.Account.Character.MapId} | [{pos.X};{pos.Y}]",
                              LogMessageType.Admin);
        }
Ejemplo n.º 3
0
        private static void handleMapInfo(NetworkMessage message)
        {
            //showMessageInfos(message);
            MapComplementaryInformationsDataMessage mapMessage = (MapComplementaryInformationsDataMessage)message;

            //Position position = jsonManager.getPosition(mapMessage.MapId);
            currentMap = D2OParsing.GetMapCoordinates(mapMessage.MapId);
            //Console.Write("Carte actuelle : " + currentMap.x + "," + currentMap.y+"\n");
            if (currentMap == null || mapToGo == null)
            {
                return;
            }

            if (currentMap.x == mapToGo.x && currentMap.y == mapToGo.y)
            {
                Console.WriteLine("Indice trouvé !");
            }

            foreach (GameRolePlayActorInformations actor in mapMessage.Actors)
            {
                if (actor.TypeID == 471)
                {
                    GameRolePlayTreasureHintInformations npc = (GameRolePlayTreasureHintInformations)actor;
                    Console.WriteLine(npc.NpcId + " " + npcIdToFind);
                    if (npc.NpcId == npcIdToFind)
                    {
                        Console.WriteLine("Phorreur trouvé !");
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public void OnCommand(IAccount account, string[] args)
        {
            var pos = D2OParsing.GetMapCoordinates(account.Character.MapId);

            Logger.Default.Log($"MapID : {account.Character.MapId} | [{pos.X};{pos.Y}]",
                               LogMessageType.Admin);
        }
Ejemplo n.º 5
0
        private void OnChangementFinished(object sender, MapChangementFinishedEventArgs e)
        {
            var pos = D2OParsing.GetMapCoordinates(e.NewMap);

            switch (e.Success)
            {
            case true:
                Logger.Default.Log(
                    $"Changement de map réussi ! Arrivé sur la map [{pos.X};{pos.Y}] ({e.NewMap})");
                break;

            case false:
                Logger.Default.Log(
                    $"Changement de map échoué ! Toujours sur la map [{pos.X};{pos.Y}] ({e.NewMap})");
                break;
            }
        }
Ejemplo n.º 6
0
Archivo: Map.cs Proyecto: Mixi59/Cookie
        private void CheckMapChange()
        {
            var posOld = D2OParsing.GetMapCoordinates(_client.Account.Character.MapId);
            var old    = _client.Account.Character.MapId;

            _client.Logger.Log($"[Map] Old {old} | [{posOld.X};{posOld.Y}]");
            Thread.Sleep(500);
            var posNew = D2OParsing.GetMapCoordinates(_client.Account.Character.MapId);

            _client.Logger.Log($"[Map] New {_client.Account.Character.MapId}| [{posNew.X};{posNew.Y}]");
            if (old == _client.Account.Character.MapId)
            {
                LaunchChangeMap(_mapIdForChanging);
            }
            else
            {
                _client.Account.Character.Status = CharacterStatus.None;
            }
        }
Ejemplo n.º 7
0
        private static void handleTreasureHuntMessage(NetworkMessage message)
        {
            Point startMap;

            showMessageInfos(message);

            TreasureHuntMessage treasureHuntMessage = (TreasureHuntMessage)message;

            TreasureHuntStep lastStep = treasureHuntMessage.KnownStepsList.Last();

            if (treasureHuntMessage.TotalStepCount == treasureHuntMessage.Flags.Count)
            {
                Console.WriteLine("Etape terminée !");
                return;
            }

            if (treasureHuntMessage.KnownStepsList.Count == 1)
            {
                startMap = D2OParsing.GetMapCoordinates(treasureHuntMessage.StartMapId);
            }
            else
            {
                startMap = currentMap;
            }

            //Console.Write(" " + startMap.x + "," + startMap.y + "\n");

            try
            {
                TreasureHuntStepFollowDirectionToHint stepToFollow = (TreasureHuntStepFollowDirectionToHint)lastStep;
                npcIdToFind = stepToFollow.NpcId;
                Console.WriteLine("On cherche : \n" + D2OParsing.GetNpcName(stepToFollow.NpcId) + " vers " + WebService.getDir(stepToFollow.Direction));
            }
            catch (Exception e)
            {
                TreasureHuntStepFollowDirectionToPOI stepToFollow = (TreasureHuntStepFollowDirectionToPOI)lastStep;
                WebService.getData(startMap, stepToFollow.Direction, stepToFollow.PoiLabelId);
                //Console.WriteLine("On cherche : " + D2OParsing.GetPoiName(stepToFollow.PoiLabelId));
            }
        }