Beispiel #1
0
 public static void TradeChangeMoney(ZoneClient pClient, Packet pPacket)
 {
     long money;
     if(!pPacket.TryReadLong(out money))
         return;
     if (pClient.Character.Trade != null)
     {
         pClient.Character.Trade.ChangeMoneyToTrade(pClient.Character, money);
     }
 }
Beispiel #2
0
 public static void TakeGuildMoney(ZoneClient client, Packet packet)
 {
     long TakeMoney;
     if (!packet.TryReadLong(out TakeMoney))
         return;
     if (client.Character.Guild == null)
         return;
     client.Character.Guild.GuildMoney -= TakeMoney;
     client.Character.Guild.GuildStore.SendRemoveFromGuildStore(Data.GuildStoreAddFlags.Gold, client.Character.Character.Name, TakeMoney, client.Character.Guild.GuildMoney);
 }
Beispiel #3
0
        public static void GiveGuildMoney(ZoneClient client, Packet packet)
        {
            long GiveMoney;
            if (!packet.TryReadLong(out GiveMoney))
                return;
            if (client.Character.Guild == null)
                return;
            if (client.Character.Character.Money < GiveMoney)
            {
                //todo response you have money to low
                return;
            }
            client.Character.Character.Money -= GiveMoney;
            client.Character.ChangeMoney(client.Character.Character.Money);

            client.Character.Guild.GuildMoney += GiveMoney;
            client.Character.Guild.GuildMoneySave();
            client.Character.Guild.GuildStore.SendAddGuildStore(Data.GuildStoreAddFlags.Gold, client.Character.Character.Name, GiveMoney, client.Character.Guild.GuildMoney);
        }