Esempio n. 1
0
        public static void BuyHPStonesFromNPC(ZoneClient client, Packet packet)
        {
            short         amount;
            ZoneCharacter character = client.Character;

            if (!packet.TryReadShort(out amount))
            {
                Log.WriteLine(LogLevel.Debug, "BuyHPStones :: Got unknown amount from {0}", character.Name);
            }

            using (var ppacket = new Packet(SH20Type.ChangeHPStones))
            {
                using (var pppacket = new Packet(SH4Type.MoneyChange))
                {
                    character.BuyHPStones(ppacket, pppacket, amount);
                    client.SendPacket(ppacket);
                    client.SendPacket(pppacket);
                }
            }
        }