AhmedKorwash

LoginMessages

May 24th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 26.19 KB | None | 0 0
  1. public static void LoginMessages(Client.GameClient client)
  2.         {
  3.            
  4.             #region lacb
  5.             if (client.Entity.lacb >= 10 & client.Entity.lacb <= 300)
  6.             {//MenaMagice
  7.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 1, true);
  8.             }
  9.             if (client.Entity.lacb >= 300 & client.Entity.lacb <= 600)
  10.             {
  11.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 2, true);
  12.             }
  13.             if (client.Entity.lacb >= 600 & client.Entity.lacb <= 900)
  14.             {
  15.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 3, true);
  16.             }
  17.             if (client.Entity.lacb >= 900 & client.Entity.lacb <= 1300)
  18.             {
  19.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 4, true);
  20.             }
  21.             if (client.Entity.lacb >= 1300 & client.Entity.lacb <= 1600)
  22.             {
  23.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 5, true);
  24.             }
  25.             if (client.Entity.lacb >= 1600 & client.Entity.lacb <= 1900)
  26.             {
  27.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 6, true);
  28.             }
  29.             if (client.Entity.lacb >= 1900 & client.Entity.lacb <= 2200)
  30.             {
  31.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 7, true);
  32.             }
  33.             if (client.Entity.lacb >= 2200 & client.Entity.lacb <= 2800)
  34.             {
  35.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 8, true);
  36.             }
  37.             if (client.Entity.lacb >= 2800 & client.Entity.lacb <= 3400)
  38.             {
  39.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 9, true);
  40.             }
  41.             if (client.Entity.lacb >= 3400 & client.Entity.lacb <= 4200)
  42.             {
  43.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 10, true);
  44.             }
  45.             if (client.Entity.lacb >= 4200 & client.Entity.lacb <= 5400)
  46.             {
  47.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 11, true);
  48.             }
  49.             if (client.Entity.lacb >= 5400 & client.Entity.lacb <= 6800)
  50.             {
  51.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 12, true);
  52.             }
  53.             if (client.Entity.lacb >= 6800)
  54.             {
  55.                 client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 13, true);
  56.             }
  57.             #endregion
  58.             #region AutoHunt
  59.             AutoHunt AutoHunt = new AutoHunt();
  60.             AutoHunt.Icon = 391;
  61.             client.Send(AutoHunt);
  62.             #endregion              
  63.             #region Inbox In Server.
  64.             int count = 1;
  65.             for (int i = 0; i < count; i++)
  66.             {
  67.                 MsgMailList.PrizeInfo prize = new MsgMailList.PrizeInfo()
  68.                 {
  69.                     ID = (uint)i,
  70.                     Time = 10,
  71.                     Sender = "Egypt (Gift)".ToString(),
  72.                     Subject = "Honoring special to you you the new player.".ToString(),
  73.                     Message = "We are honored that they have joined us and we will give you a gift for choosing our server. Enjoy and if you have a server problem please continue with the owner." + i.ToString(),
  74.                     goldprize = 1000,
  75.                     cpsprize = 0,
  76.  
  77.                     // ItemPrize = 800111,
  78.                     //Message2 = "We are seeking l help you every one of you and let you to enjoy." + i.ToString(),
  79.  
  80.                 };
  81.                 client.Prizes.Add(prize.ID, prize);
  82.  
  83.             }
  84.             #endregion
  85.             #region Inbox
  86.                 if (client.Prizes.Count > 0)
  87.                 {
  88.                     MsgMailList.SendMailbox(client, true);
  89.                 }
  90.                 #endregion
  91.             #region SendReload
  92.             Game.Entity.SendReload(client);
  93.             #endregion
  94.             #region CrossServer
  95.             if (CrossServer.IsWar == true)
  96.             {
  97.                 client.Country = CrossServer.GetCountry(client.Entity.CountryID);
  98.                 AhmedKorwash.Countrys country = new AhmedKorwash.Countrys();
  99.                 country.id = client.Entity.CountryID;
  100.                 country.Name = CrossServer.GetCountry(client.Entity.CountryID);
  101.                 country.Score = 0;
  102.                 country.wins = 0;
  103.                 if (!CrossServer.Countrys.ContainsKey(country.id))
  104.                 {
  105.                     CrossServer.Countrys.Add(country.id, country);
  106.                 }
  107.             }
  108.             #endregion
  109.             #region SecondaryPassword
  110.             Database.Wharehousepw.reset_whpass(client);
  111.             if (client.WarehousePW != 0 && client.ForgetWHPass == false)
  112.             {
  113.                 WareHousePassword whp = new WareHousePassword(true);
  114.                 whp.type = WareHousePassword.PasswordCorrect;
  115.                 whp.OldPassword = 0x1;
  116.                 client.Send(whp);
  117.             }
  118.             else if (client.WarehousePW != 0 && client.ForgetWHPass == true)
  119.             {
  120.                 WareHousePassword whp = new WareHousePassword(true);
  121.                 whp.type = WareHousePassword.Termination;
  122.                 whp.OldPassword = 0x1;
  123.                 whp.NewPassword = client.ForgetWHPassDate;
  124.                 client.Send(whp);
  125.             }
  126.             #endregion
  127.             #region Flower and kiss Icon
  128.             client.Send(new FlowerPacket(client.Entity.Flowers, client));
  129.             client.Send(new KissPacket(client.Entity.Kisses, client));
  130.             #endregion
  131.             #region CPClaim
  132.             Data datas = new Data(true);
  133.             datas.UID = client.Entity.UID;
  134.             datas.ID = 116;
  135.             datas.dwParam = 1197;
  136.             client.Send(datas);
  137.             #endregion
  138.             #region MsgTrainingInfo
  139.             if (client.Entity.MapID == 601)
  140.             {
  141.                 OfflineTGStats sts = new OfflineTGStats(true);
  142.                 var T1 = new TimeSpan(DateTime.Now.Ticks);
  143.                 var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks);
  144.                 ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes);
  145.                 minutes = (ushort)Math.Min((ushort)900, minutes);
  146.                 sts.TotalTrainingMinutesLeft = (ushort)(900 - minutes);
  147.                 sts.TrainedMinutes = minutes;
  148.                 ulong exp = client.Entity.Experience;
  149.                 byte level = client.Entity.Level;
  150.                 double expballGain = (double)300 * (double)minutes / (double)900;
  151.                 while (expballGain >= 100)
  152.                 {
  153.                     expballGain -= 100;
  154.                     exp += client.ExpBall;
  155.                 }
  156.                 if (expballGain != 0)
  157.                     exp += (uint)(client.ExpBall * (expballGain / 100));
  158.  
  159.                 while (exp >= Database.DataHolder.LevelExperience(level))
  160.                 {
  161.                     exp -= Database.DataHolder.LevelExperience(level);
  162.                     level++;
  163.                 }
  164.                 double percent = (double)exp * (double)100 / (double)Database.DataHolder.LevelExperience(level);
  165.  
  166.                 sts.Character_NewExp = (ulong)(percent * 100000);
  167.                 sts.Character_AcquiredLevel = level;
  168.                 sts.Send(client);
  169.             }
  170.             #endregion
  171.             client.Entity.MyAchievement.Send();
  172.             client.NoDieJoin = true;
  173.             if (!(client.Entity.VIPLevel == 6 || client.Account.State >= Database.AccountTable.AccountState.ProjectManager))
  174.                 client.Send(new Message("" + Database.HelpDesk.Register + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website));
  175.             for (ushort i = 1415; i <= 1423; i++)
  176.                 if (!client.Spells.ContainsKey(i))
  177.                     client.AddSpell(new Spell(true) { ID = i });
  178.             #region WentToComplete
  179.             client.Filtering = true;
  180.             if (client.WentToComplete) return;
  181.             RemoveBadSkills(client);
  182.             client.WentToComplete = true;
  183.             client.Entity.SendUpdates = true;
  184.             #endregion
  185.             #region Champion
  186.             DateTime now = DateTime.Now;
  187.             if (now.Hour == 20 && now.Minute >= 55 || now.Hour == 21 && now.Minute <= 25)
  188.                 if (client.ChampionStats.SignedUp)
  189.                     client.Send(Champion.ChampionKernel.SignUp().BuildPacket());
  190.             #endregion
  191.             #region RemoveBadSkills
  192.             if (client.Entity.Class >= 40 && client.Entity.Class <= 45)
  193.             {
  194.                 client.RemoveSpell(new Spell(true) { ID = 1025 });//SuperMan
  195.             }
  196.             if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
  197.             {
  198.                 client.RemoveSpell(new Spell(true) { ID = 6002 });//PiosnStar
  199.             }
  200.             if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
  201.             {
  202.                 client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
  203.             }
  204.             if (client.Entity.Class >= 132 && client.Entity.Class <= 135)
  205.             {
  206.                 client.RemoveSpell(new Spell(true) { ID = 10425 });//tranq
  207.             }
  208.             if (client.Entity.Class >= 50 && client.Entity.Class <= 55)
  209.             {
  210.                 client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
  211.             }
  212.             if (client.Entity.Class >= 10 && client.Entity.Class <= 15)
  213.             {
  214.                 client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
  215.             }
  216.             if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
  217.             {
  218.                 client.RemoveSpell(new Spell(true) { ID = 11180 });//MortalDrag
  219.             }
  220.             if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
  221.             {
  222.                 client.RemoveSpell(new Spell(true) { ID = 11190 });//MortalDrag
  223.             }
  224.             if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
  225.             {
  226.                 client.RemoveSpell(new Spell(true) { ID = 11200 });//MortalDrag
  227.             }
  228.             if (client.Entity.Class >= 42 && client.Entity.Class <= 45)
  229.             {
  230.                 client.RemoveSpell(new Spell(true) { ID = 10425 });//Tranquality
  231.             }
  232.             if (client.Entity.Class >= 10 && client.Entity.Class <= 15)
  233.             {
  234.                 client.RemoveSpell(new Spell(true) { ID = 6002 });//Poisonstar
  235.             }
  236.             #endregion
  237.             #region TQPoint
  238.             if (client.TQPoint > 0)
  239.             {
  240.                 Attack send = new Attack(true);
  241.                 send.InteractType = AhmedKorwash.Network.GamePackets.Attack.ClaimCP;
  242.                 client.Send(send.ToArray());
  243.             }
  244.             #endregion
  245.             foreach (var Guild in Kernel.Guilds.Values)
  246.             {
  247.                 Guild.SendName(client);
  248.             }
  249.             #region Sever Time
  250.             ServerTime time = new ServerTime();
  251.             time.Year = (uint)DateTime.Now.Year;
  252.             time.Month = (uint)DateTime.Now.Month;
  253.             time.DayOfYear = (uint)DateTime.Now.DayOfYear;
  254.             time.DayOfMonth = (uint)DateTime.Now.Day;
  255.             time.Hour = (uint)DateTime.Now.Hour;
  256.             time.Minute = (uint)DateTime.Now.Minute;
  257.             time.Second = (uint)DateTime.Now.Second;
  258.             client.Send(time);
  259.             #endregion
  260.             bool going = false;
  261.             #region Elite pk
  262.             Parallel.ForEach(ElitePKTournament.Tournaments, epk =>
  263.             {
  264.                 if (epk.State != ElitePK.States.GUI_Top8Ranking)
  265.                     going = true;
  266.             });
  267.             if (going)
  268.             {
  269.                 ElitePKBrackets brackets = new ElitePKBrackets(true, 0);
  270.                 brackets.Type = ElitePKBrackets.EPK_State;
  271.                 brackets.OnGoing = true;
  272.                 client.Send(brackets);
  273.             }
  274. #endregion
  275.             client.Entity.DoubleExperienceTime = (ushort)(client.Entity.DoubleExperienceTime + (1 - 1));
  276.             client.Entity.HeavenBlessing = (ushort)(client.Entity.HeavenBlessing + (1 - 1));
  277.             #region Quiz
  278.             if (Kernel.QuizShow.Open)
  279.                 Kernel.QuizShow.AddPlayer(client);
  280.  
  281.             client.Entity.Update(Network.GamePackets.Update.QuizPoints, client.Entity.QuizPoints, true);
  282.             #endregion
  283.             #region Mentor
  284.             if (client.Mentor != null)
  285.             {
  286.                 if (client.Mentor.IsOnline)
  287.                 {
  288.                     MentorInformation Information = new MentorInformation(true);
  289.                     Information.Mentor_Type = 1;
  290.                     Information.Mentor_ID = client.Mentor.Client.Entity.UID;
  291.                     Information.Apprentice_ID = client.Entity.UID;
  292.                     Information.Enrole_Date = client.Mentor.EnroleDate;
  293.                     Information.Mentor_Level = client.Mentor.Client.Entity.Level;
  294.                     Information.Mentor_Class = client.Mentor.Client.Entity.Class;
  295.                     Information.Mentor_PkPoints = client.Mentor.Client.Entity.PKPoints;
  296.                     Information.Mentor_Mesh = client.Mentor.Client.Entity.Mesh;
  297.                     Information.Mentor_Online = true;
  298.                     Information.Shared_Battle_Power = client.Entity.BattlePowerFrom(client.Mentor.Client.Entity);
  299.                     Information.String_Count = 3;
  300.                     Information.Mentor_Name = client.Mentor.Client.Entity.Name;
  301.                     Information.Apprentice_Name = client.Entity.Name;
  302.                     Information.Mentor_Spouse_Name = client.Mentor.Client.Entity.Spouse;
  303.                     client.ReviewMentor();
  304.                     client.Send(Information);
  305.  
  306.                     ApprenticeInformation AppInfo = new ApprenticeInformation();
  307.                     AppInfo.Apprentice_ID = client.Entity.UID;
  308.                     AppInfo.Apprentice_Level = client.Entity.Level;
  309.                     AppInfo.Apprentice_Class = client.Entity.Class;
  310.                     AppInfo.Apprentice_PkPoints = client.Entity.PKPoints;
  311.                     AppInfo.Apprentice_Experience = client.AsApprentice.Actual_Experience;
  312.                     AppInfo.Apprentice_Composing = client.AsApprentice.Actual_Plus;
  313.                     AppInfo.Apprentice_Blessing = client.AsApprentice.Actual_HeavenBlessing;
  314.                     AppInfo.Apprentice_Name = client.Entity.Name;
  315.                     AppInfo.Apprentice_Online = true;
  316.                     AppInfo.Apprentice_Spouse_Name = client.Entity.Spouse;
  317.                     AppInfo.Enrole_date = client.Mentor.EnroleDate;
  318.                     AppInfo.Mentor_ID = client.Mentor.ID;
  319.                     AppInfo.Mentor_Mesh = client.Mentor.Client.Entity.Mesh;
  320.                     AppInfo.Mentor_Name = client.Mentor.Name;
  321.                     AppInfo.Type = 2;
  322.                     client.Mentor.Client.Send(AppInfo);
  323.                 }
  324.                 else
  325.                 {
  326.                     MentorInformation Information = new MentorInformation(true);
  327.                     Information.Mentor_Type = 1;
  328.                     Information.Mentor_ID = client.Mentor.ID;
  329.                     Information.Apprentice_ID = client.Entity.UID;
  330.                     Information.Enrole_Date = client.Mentor.EnroleDate;
  331.                     Information.Mentor_Online = false;
  332.                     Information.String_Count = 2;
  333.                     Information.Mentor_Name = client.Mentor.Name;
  334.                     Information.Apprentice_Name = client.Entity.Name;
  335.  
  336.                     client.Send(Information);
  337.                 }
  338.             }
  339.             #endregion
  340.             #region Nobility
  341.             NobilityInfo update = new NobilityInfo(true);
  342.             update.Type = NobilityInfo.Icon;
  343.             update.dwParam = client.NobilityInformation.EntityUID;
  344.             update.UpdateString(client.NobilityInformation);
  345.             client.Send(update);
  346.             #endregion
  347.             #region  Merchant
  348.             client.Entity.Update(Update.Merchant, 255, false);
  349.             #endregion
  350.             #region Equipment && Item
  351.             foreach (ConquerItem item in client.Inventory.Objects)
  352.                 item.Send(client);
  353.  
  354.             foreach (ConquerItem item in client.Equipment.Objects)
  355.             {
  356.                 if (item != null)
  357.                 {
  358.                     if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
  359.                     {
  360.                         item.Send(client);
  361.                     }
  362.                     else
  363.                     {
  364.                         client.Equipment.DestroyArrow(item.Position);
  365.                     }
  366.                 }
  367.             }
  368.             client.LoadItemStats();
  369.             if (!client.Equipment.Free(5))
  370.             {
  371.                 if (IsArrow(client.Equipment.TryGetItem(5).ID))
  372.                 {
  373.                     if (client.Equipment.Free(4))
  374.                         client.Equipment.DestroyArrow(5);
  375.                     else
  376.                     {
  377.                         if (client.Equipment.TryGetItem(4).ID / 1000 != 500)
  378.                             client.Equipment.DestroyArrow(5);
  379.                     }
  380.                 }
  381.             }
  382.             client.GemAlgorithm();
  383.             client.CalculateStatBonus();
  384.             client.CalculateHPBonus();
  385.             client.Entity.Stamina = 100;
  386.             #endregion
  387.             #region WelcomeMessages
  388.             string[] wm = File.ReadAllLines(Constants.WelcomeMessages);
  389.             foreach (string line in wm)
  390.             {
  391.                 if (line.Length == 0)
  392.                     continue;
  393.                 if (line[0] == ';')
  394.                     continue;
  395.                 client.Send(new Message(line, System.Drawing.Color.Red, Message.Talk));
  396.             }
  397.             #endregion
  398.             #region Login Alert System
  399.             if (client.Action == 2)
  400.             {
  401.                 byte[] Packet = null;
  402.                 Packet = new byte[0];
  403.                 Packet = new AhmedKorwash.Network.GamePackets.LastLoginAlert(client)
  404.                 {
  405.                     LastCheck = (uint)client.Account.LastCheck.Ticks,
  406.                     IP = client.Entity.IPLast
  407.                 }.
  408.                 ToArray();
  409.                 client.Send(Packet);
  410.             }
  411.             #endregion
  412.             #region New Titles
  413.             if (client.Entity.Titles.Count > 0)
  414.             {
  415.                 TitlePacket tpacket = new TitlePacket(true);
  416.                 tpacket.Identifier = client.Entity.UID;
  417.                 tpacket.Title = client.Entity.MyTitle;
  418.                 tpacket.Type = TitlePacket.Types.Switch;
  419.                 tpacket.Count = 1;
  420.                 tpacket.Add((byte)client.Entity.MyTitle);
  421.                 client.Entity.MyTitle = tpacket.Title;
  422.                 client.Send(tpacket);
  423.             }
  424.             #endregion
  425.             #region Double Exp
  426.             if (Program.Today == DayOfWeek.Saturday || Program.Today == DayOfWeek.Sunday || Program.Today == DayOfWeek.Monday || Program.Today == DayOfWeek.Thursday || Program.Today == DayOfWeek.Tuesday || Program.Today == DayOfWeek.Wednesday || Program.Today == DayOfWeek.Friday)
  427.                 client.Send(new Message("Double experience is on.", System.Drawing.Color.Red, Message.World));
  428.             #endregion
  429.             #region Vip
  430.             if (client.Entity.VIPLevel > 0)
  431.             {
  432.                 Network.GamePackets.VipStatus vip = new Network.GamePackets.VipStatus();
  433.                 client.Send(vip.ToArray());
  434.             }
  435.             client.Entity.VIPLevel = (byte)(client.Entity.VIPLevel + 0);
  436.             #endregion
  437.             #region MapStatus
  438.             client.Send(new MapStatus() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status, Weather = Database.MapsTable.MapInformations[client.Map.ID].Weather });
  439.             if (client.Entity.Hitpoints == 0)
  440.             {
  441.                 ushort[] Point = Database.DataHolder.FindReviveSpot(client.Map.ID);
  442.                 client.Entity.Teleport(Point[0], Point[1], Point[2]);
  443.                 client.Entity.Hitpoints = 1;
  444.             }
  445.             #endregion
  446.             client.Entity.HandleTiming = true;
  447.             if (client.Entity.MentorBattlePower != 0)
  448.                 client.Entity.Update(Network.GamePackets.Update.MentorBattlePower, client.Entity.MentorBattlePower, false);
  449.             if (client.Guild != null)
  450.             {
  451.                 client.Guild.SendAllyAndEnemy(client);
  452.                 client.Entity.GuildBattlePower = client.Guild.GetSharedBattlepower(client.AsMember.Rank);
  453.             }
  454.             #region Broadcast
  455.             if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID > 2)
  456.                 client.Send(new Network.GamePackets.Message(Game.ConquerStructures.Broadcast.CurrentBroadcast.Message, "ALLUSERS", Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityName, System.Drawing.Color.Red, Network.GamePackets.Message.BroadcastMessage));
  457.             #endregion
  458.             client.Entity.Update(Update.RaceShopPoints, client.RacePoints, false);
  459.             #region BlessTime
  460.             client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, client.BlessTime, false);
  461.             if (client.Entity.HeavenBlessing != 0)
  462.                 client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false);
  463.             #endregion
  464.             #region ClaimableItem
  465.             if (client.ClaimableItem.Count > 0)
  466.                 foreach (var item in client.ClaimableItem.Values)
  467.                     item.Send(client);
  468.             #endregion
  469.             #region DeatinedItem
  470.             if (client.DeatinedItem.Count > 0)
  471.                 foreach (var item in client.DeatinedItem.Values)
  472.                     item.Send(client);
  473.             #endregion
  474.             client.Equipment.UpdateEntityPacket();
  475.             #region ChiPowers
  476.             client.Send(new ChiPowers(true).Query(client));
  477.             SendChiRankings(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, client);
  478.             #endregion
  479.             DateTime Now64 = DateTime.Now;
  480.             #region BloodshedSea
  481.             if (client.Entity.MapID == 3846)
  482.             {
  483.                 Data data = new Data(true);
  484.                 data.UID = client.Entity.UID;
  485.                 data.dwParam = 3846;
  486.                 data.ID = 104;
  487.                 data.TimeStamp = Time64.Now;
  488.                 data.dwParam = 16755370;
  489.                 client.Send(data);
  490.                 client.SendScreen(data, true);
  491.                 client.Screen.Reload(null);
  492.             }
  493.             #endregion
  494.             ChangeAppearance(client, (AppearanceType)client.Appearance);
  495.             client.Entity.UpdateEffects(true);
  496.             client.Entity.BoundCps = client.Entity.BoundCps;
  497.             client.Entity.FirstCreditPoints = client.Entity.FirstCreditPoints;
  498.             client.Entity.Energy = client.Entity.Energy;
  499.             client.Entity.Update(Network.GamePackets.Update.AvailableSlots, 300, false);
  500.             client.Entity.Update(Network.GamePackets.Update.ExtraInventory, client.Entity.ExtraInventory, false);
  501.             #region Inner
  502.             if (!Game.InnerPower.InnerPowerPolle.TryGetValue(client.Entity.UID, out client.Entity.InnerPower))
  503.                 client.Entity.InnerPower = new Game.InnerPower(client.Entity.Name, client.Entity.UID);
  504.             client.Entity.InnerPower.UpdateStatus();
  505.             #endregion
  506.             #region Merchant
  507.             if (client.Entity.Merchant == 255)
  508.             {
  509.                 client.Entity.Update((byte)Update.Merchant, 255, 0);
  510.             }
  511.             else if (client.Entity.Merchant == 1)
  512.             {
  513.                 Attack send = new Attack(true);
  514.                 send.InteractType = AhmedKorwash.Network.GamePackets.Attack.MerchantProgress;
  515.                 client.Send(send.ToArray());
  516.             }
  517.             #endregion        
  518.             #region Storages
  519.             new CoatStorage().Login(client);
  520.             new TitleStorage().Login(client);
  521.             if (client.Entity.WTitles == null)
  522.             {
  523.                 new TitleStorage().AddTitle(client, 4001, 1000, false);
  524.                 new TitleStorage().AddTitle(client, 6001, 20, false);
  525.                 new TitleStorage().AddTitle(client, 6002, 21, false);
  526.                 new TitleStorage().AddTitle(client, 6003, 22, false);
  527.                 new TitleStorage().AddTitle(client, 6004, 23, false);
  528.                 new TitleStorage().AddTitle(client, 6005, 6005, false);
  529.                 new TitleStorage().AddTitle(client, 1, 1000, false);
  530.                 new TitleStorage().AddTitle(client, 2018, 1, false);
  531.                 new TitleStorage().AddTitle(client, 2001, 2, false);
  532.                 new TitleStorage().AddTitle(client, 2002, 3, false);
  533.                 new TitleStorage().AddTitle(client, 2003, 4, false);
  534.                 new TitleStorage().AddTitle(client, 2004, 5, false);
  535.                 new TitleStorage().AddTitle(client, 2005, 6, false);
  536.                 new TitleStorage().AddTitle(client, 2006, 7, false);
  537.                 new TitleStorage().AddTitle(client, 2020, 2020, false);
  538.                 new TitleStorage().AddTitle(client, 2021, 2021, false);
  539.                 new TitleStorage().AddTitle(client, 2022, 2022, false);
  540.                 new TitleStorage().AddTitle(client, 2023, 2023, false);
  541.                 new TitleStorage().AddTitle(client, 2024, 2024, false);
  542.                 new TitleStorage().AddTitle(client, 2025, 2025, false);
  543.                 new TitleStorage().AddTitle(client, 2028, 2028, false);
  544.                 new TitleStorage().AddTitle(client, 2029, 2029, false);
  545.                 new TitleStorage().AddTitle(client, 2030, 2030, false);
  546.                 new TitleStorage().AddTitle(client, 2031, 2031, false);
  547.             }
  548.             client.Entity.UTitlePoints = client.Entity.WTitles.Points;
  549.             #endregion
  550.             client.LoadItemStats();
  551.            
  552.         }
Advertisement
Add Comment
Please, Sign In to add comment