public void HandleCommand(BaseGame game, Player player, GSPacketIn packet) { if (game.GameState != eGameState.Playing || player.GetSealState()) return; int type = packet.ReadByte(); int place = packet.ReadInt(); int templateID = packet.ReadInt(); ItemTemplateInfo template = ItemMgr.FindItemTemplate(templateID); if (player.CanUseItem(template)) { //if (player.CurrentBall.ID == 3 && template.TemplateID == 10003) // return; //if (player.PlayerDetail.UsePropItem(game, type, place, templateID, player.IsLiving)) //{ // if (player.UseItem(template) == false) // { // BaseGame.log.Error("Using prop error"); // } //} if (player.PlayerDetail.UsePropItem(game, type, place, templateID, player.IsLiving)) { if (player.UseItem(template) == false) { BaseGame.log.Error("Using prop error"); } } else { player.UseItem(template); } } }
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet) { if (game.GameState != eGameState.Playing || player.GetSealState()) return; int killID = packet.ReadInt(); //game.SendPetUseKill(player, killID, true); player.PetUseKill(killID); }