Sunday, November 17, 2013

Bom pessoal, venho trazer esse código para resolver o BUG das cartas. Algumas general dynamics pesso


Bom pessoal, venho trazer esse código para resolver o BUG das cartas. Algumas general dynamics pessoas estavam bugando com cheat engine. Esse código usa na source. Procure por CardSlotHandler e CardResetHandler, cole em seus respectivos lugares, depois de Build e Debug. using System.Collections.Generic; using System.Text; using Bussiness.Managers; using Bussiness; using Game.Base.Packets; using Game.Server.Managers; general dynamics using SqlDataProvider.Data; general dynamics using System; using System.Threading; using Game.Server.Statics; namespace Game.Server.Packets.Client { [PacketHandler(170, "场景用户离开")] public class CardSlotHandler : IPacketHandler { public int HandlePacket(GameClient client, GSPacketIn packet) general dynamics { int tang = 0; int type = packet.ReadInt(); int place = packet.ReadInt(); int soulPoint = packet.ReadInt(); int CardSoul = client.Player.PlayerCharacter.CardSoul; string msg = ""; List cardSlots = client.Player.CardBag.GetItems(0, 5); switch (type) { case 0: { int s_type = cardSlots[place].Type; if (soulPoint > CardSoul)// so sánh điểm nhập với điểm thẻ thực tế. soulPoint = CardSoul; int totalGp = cardSlots[place].CardGP + soulPoint; int lv = CardMgr.GetLevel(totalGp, s_type); int needGp = CardMgr.GetGP(lv, s_type) - cardSlots[place].CardGP; if (lv == 40) { soulPoint = needGp; } if (soulPoint > CardSoul)// general dynamics so sánh điểm nhập với điểm thẻ thực tế. { soulPoint = CardSoul; } if (CardSoul > 0)// kiểm tra điểm thẻ bài thật. { client.Player.CardBag.UpGraceSlot(soulPoint, lv, place); client.Player.RemoveCardSoul(soulPoint); client.Player.Out.SendPlayerCardSlot(client.Player .PlayerCharacter, cardSlots[place]); client.Player.MainBag.UpdatePlayerProperties(); } else { if (tang == 1) { msg = LanguageMgr.GetTranslation("Người chơi " + client.Player.PlayerCharacter.NickName + " khoá tài khoản bởi outo Admin với lý do: SỬ DỤNG CHEAT ENGINE"); GSPacketIn sys_notice general dynamics = WorldMgr.SendSysNotice(msg); GameServer.Instance.LoginServer.SendPacket(sys_not ice); Console.BackgroundColor = ConsoleColor.DarkMagenta; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("phát hiện người chơi " + client.Player.PlayerCharacter.NickName + " cheat thẻ bài"); Console.ResetColor(); PlayerBussiness bussiness = new PlayerBussiness(); bussiness.UpdatePasswordTwo(client.Player.PlayerCh aracter.ID, "ngu mà lì");//đặt pass 2 Thread.Sleep(10000); client.Disconnect();//kick user ra kh?i game } else if (tang == 0) { msg = "Điểm thẻ bài không đủ và Có thể bạn đang sử dụng cheat engine, nếu tiếp tục tài khoản sẽ bị khoá"; tang = 1; } tang = 1; } break; } case 1: if (client.Player.PlayerCharacter.Money >= 300) { int totalPoint = 0; for (int index = 0; index < cardSlots.Count; index++) { totalPoint += cardSlots[index].CardGP; } client.Player.CardBag.ResetCardSoul(); client.Player.AddCardSoul(totalPoint); msg = LanguageMgr.GetTranslation("UpdateSLOT.ResetComple te", new object[] { totalPoint }); client.Player.RemoveMoney(300); client.Player.Out.SendPlayerCardSlot(client.Player .PlayerCharacter, cardSlots); client.Player.MainBag.UpdatePlayerProperties(); general dynamics } else { msg = "Cupons não é suficiente! "; } break; } if (msg != "") { client.Out.SendMessage(eMessageType.Normal, msg); } return 0; } public string notice { get; set; } } } using System.Collections.Generic; using System; using System.Text; using Bussiness; using Game.Base.Packets; using SqlDataProvider.Data; namespace Game.Server.Packets.Client { [PacketHandler(196, "场景用户离开")] general dynamics public class CardResetHandler : IPacketHandler { public int HandlePacket(GameClient client, GSPacketIn packet) { int cmd = packet.ReadInt(); int place = packet.ReadInt(); int CardSoul = client.Player.PlayerCharacter.CardSoul; UsersCardInfo Card = client.Player.CardBag.GetItemByPlace(0, place); List points general dynamics = new List (); ThreadSafeRandom general dynamics random = new ThreadSafeRandom(); if (CardSoul 100) switch (cmd) { case 0: if (CardSoul > 199) for (int i = 0; i < 4; i++) { int point = random.Next(min, general dynamics max); points.Add(point); switch (i) { case 0: Card.Attack = point; break; case 1: Card.Defence = point; break; case 2: Card.Agility = point; break; case 3: Card.Luck = point; break; } } msg = "tẩy điểm thành công!"; client.Player.CardBag.UpdateTempCard(Card); client.Player.RemoveCardSoul(25); client.Player.Out.SendPlayerCardReset(client.Playe r.PlayerCharacter, points); break; case 1: msg = "cập nhật điểm thành công!"; client.Player.CardBag.UpdateCard(); if (place < 5) { client.Player.MainBag.UpdatePlayerProperties(); } break; } client.Out.SendMessage(eMessageType.Normal, msg); return 0; } public string msg { get; set; } } }


No comments:

Post a Comment