Ejemplo n.º 1
0
 public WorldPlayer(WorldClient client)
 {
     _client = client;
     RegisteredChannels.Add(Enums.ChannelEnum.Default);
     RegisteredChannels.Add(Enums.ChannelEnum.Guild);
     RegisteredChannels.Add(Enums.ChannelEnum.Trade);
     RegisteredChannels.Add(Enums.ChannelEnum.Party);
     RegisteredChannels.Add(Enums.ChannelEnum.Recruitment);
     RegisteredChannels.Add(Enums.ChannelEnum.Admin);
 }
Ejemplo n.º 2
0
        public static void OpenBank(WorldClient client, ItemBag bag)
        {
            var packet = "EL;";
            foreach (var item in bag.Items)
            {
                packet += "O" + item.DisplayItem + ";";
            }

            //Kamas
            packet += "G" + client.AccountData.Bank.Kamas;

            client.Send("ECK5");
            client.Send(packet);
            client.Action.CurrentExploredBag = bag;
        }
Ejemplo n.º 3
0
        public static void GoToMap(WorldClient client, Database.Records.MapRecords map, int cellid, bool FirstMap = false)
        {
            if (!FirstMap && client.Character.Map != null)
                client.Character.Map.Engine.RemovePlayer(client);

            client.Character.MapID = map.ID;
            client.Character.CellID = cellid;

            if (client.Character.Map != null)
            {
                client.Character.Map.Engine.AddPlayer(client);
                client.Character.Map.Engine.ShowMap(client);
                //Handlers.GameHandler.GameInformationsRequest(client, "");
            }
            else
            {
                client.Action.SystemMessage("Carte introuvable ID : <b>" + map.ID + "</b>");
            }
        }
Ejemplo n.º 4
0
        public static void GoToMap(WorldClient client, int mapid, int cellid, bool FirstMap = false)
        {
            if (!FirstMap && client.Character.Map != null)
                client.Character.Map.Engine.RemovePlayer(client);

            client.Character.MapID = mapid;
            client.Character.CellID = cellid;

            if (client.Character.Map != null)
            {
                client.Character.Map.Engine.AddPlayer(client);
                client.Character.Map.Engine.ShowMap(client);
                client.State = WorldClientState.None;
            }
            else
            {
                client.Action.SystemMessage("Carte introuvable ID : <b>" + mapid + "</b>");
            }
        }
Ejemplo n.º 5
0
 public Dispatcher(WorldClient client)
 {
     this._client = client;
 }
Ejemplo n.º 6
0
 public static void GameRequestShowCell(WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         var cellID = int.Parse(packet.Substring(2));
         client.Character.Fighter.Team.Send("Gf" + client.Character.ID + "|" + cellID);
     }
 }
Ejemplo n.º 7
0
 public static void UnMaintenanceWorld(WorldClient client)
 {
     client.Action.SystemMessage("Le serveur est de nouveau accessible aux joueurs!");
     Communication.Realm.Communicator.Server.MainRealm.SendMessage(new Communication.Realm.Packet.WorldMaintenanceFinished());
 }
Ejemplo n.º 8
0
 public void Remove(WorldClient client)
 {
     lock (Clients)
         Clients.Remove(client);
 }
Ejemplo n.º 9
0
 public void Add(WorldClient client)
 {
     lock (Clients)
         Clients.Add(client);
 }