示例#1
0
 public static void SavePosition(World.Network.WorldClient client, int mapid)
 {
     Database.Records.ZaapRecord zaap = Helper.ZaapHelper.GetZaap(mapid);
     if (zaap != null)
     {
         if (client.Character.SaveMap == mapid)
         {
             return;
         }
         client.Character.SaveMap  = mapid;
         client.Character.SaveCell = zaap.CellID;
         client.SendImPacket("06");
         client.Character.SaveAndFlush();
     }
 }
示例#2
0
 public static void WarnConnectionToFriends(World.Network.WorldClient client)
 {
     foreach (int i in client.AccountData.FriendsIDs)
     {
         if (Helper.AccountHelper.ExistAccountData(i))
         {
             Database.Records.AccountDataRecord account = Helper.AccountHelper.GetAccountData(i);
             World.Network.WorldClient          player  = Helper.WorldHelper.GetClientByAccountNickName(account.NickName);
             if (player != null)
             {
                 if (player.AccountData.FriendsIDs.Contains(client.AccountData.AccountID))
                 {
                     player.SendImPacket("0143", client.AccountData.NickName +
                                         "(<b><a href='asfunction:onHref,ShowPlayerPopupMenu," +
                                         client.Character.Nickname + "'>" + client.Character.Nickname + "</a></b>)");
                 }
             }
         }
     }
 }
示例#3
0
        public static void UseZaap(World.Network.WorldClient client, string packet)
        {
            int map = int.Parse(packet.Substring(2));

            Database.Records.ZaapRecord zaap = Helper.ZaapHelper.GetZaap(map);
            if (zaap != null)
            {
                int price = GetPriceOfTravel(map, client.Character.MapID);
                if (price <= client.Character.Kamas)
                {
                    client.Action.RemoveKamas(price);
                    Network.World.GoToMap(client, zaap.MapID, zaap.CellID);
                    CloseZaapPanel(client);
                }
                else
                {
                    client.SendImPacket("1128");
                }
            }
            else
            {
                client.Action.SystemMessage("Le zaap demander est inexistant !");
            }
        }