コード例 #1
0
 public static void Handle(Entities.GameClient client, GuildPacket guild)
 {
     if (client.Guild != null)
     {
         client.SendGuild();
         using (var announce = new Packets.GuildPacket(new Packets.StringPacker(client.Guild.Bullentin)))
         {
             announce.Data = Core.Kernel.TimeGet(Enums.TimeType.Day);
             announce.Action = Enums.GuildAction.SetAnnounce;
             client.Send(announce);
         }
     }
 }
コード例 #2
0
ファイル: Guild.cs プロジェクト: kenlacoste843/ProjectXV3
        public static bool Create(Entities.GameClient leader, string Name)
        {
            if (Database.GuildDatabase.Create(leader, Name))
            {
                leader.SendGuild();
                leader.Screen.FullUpdate();
                leader.GuildMemberInfo.Index = 0;

                using (var msg =Packets.Message.MessageCore.CreateSystem("ALL",
                                                                         string.Format(Core.MessageConst.NEW_GUILD, Name, leader.Name)))
                {
                    Packets.Message.MessageCore.SendGlobalMessage(msg);
                }
                return true;
            }
            return false;
        }
コード例 #3
0
ファイル: Guild.cs プロジェクト: kenlacoste843/ProjectXV3
        public void DonateCPs(Entities.GameClient client, uint Amount)
        {
            if (client.CPs >= Amount)
            {
                client.CPs -= Amount;
                CPDonation += Amount;
                client.GuildMemberInfo.CPDonation += Amount;
                Database.GuildDatabase.UpdateGuildInfo(this, "GuildCPsFund", CPDonation);
                Database.CharacterDatabase.Save(client);
                client.SendGuild();

                SendMessage(string.Format(Core.MessageConst.GUILD_DONATE, client.Name, Amount, "CPs"));
            }
        }
コード例 #4
0
ファイル: Guild.cs プロジェクト: kenlacoste843/ProjectXV3
        public void DonateMoney(Entities.GameClient client, uint Amount)
        {
            if (client.Money >= Amount)
            {
                client.Money -= Amount;
                MoneyDonation += Amount;
                client.GuildMemberInfo.MoneyDonation += Amount;
                Database.GuildDatabase.UpdateGuildInfo(this, "GuildFund", MoneyDonation);
                Database.CharacterDatabase.Save(client);
                client.SendGuild();

                SendMessage(string.Format(Core.MessageConst.GUILD_DONATE, client.Name, Amount, "Silvers"));
            }
        }
コード例 #5
0
ファイル: Guild.cs プロジェクト: kenlacoste843/ProjectXV3
        public void AddMember(Entities.GameClient client)
        {
            if (Members.Contains(client.DatabaseUID))
                client.GuildMemberInfo = Members[client.DatabaseUID];
            else
            {
                client.GuildMemberInfo = new GuildMember(client);
                if (Members.TryAdd(client.DatabaseUID, client.Name, client.GuildMemberInfo))
                {
                    client.Guild = this;

                    SendMessage(string.Format(Core.MessageConst.NEW_MEMBER, client.Name));
                }
                else
                    client.GuildMemberInfo = null;

                Database.CharacterDatabase.Save(client);
            }

            ReorderIndex();
            client.SendGuild();
            client.Screen.FullUpdate();
        }