Esempio n. 1
0
 public bool IsAddLimited(OnlineGuildMember member, string itemclass, int slotNo, int amount, int targetTab)
 {
     if (member.GuildMember.Rank > GuildMemberRank.Member)
     {
         member.SendOperationFailedDialog("GuildStorageFail_RankLimited");
         return(true);
     }
     if (itemclass == "gold")
     {
         int num = FeatureMatrix.GetInteger("GuildStorageGoldHoldingLimit");
         if (num == 0)
         {
             num = int.MaxValue;
         }
         if (this.GoldHolding > num - amount)
         {
             member.SendOperationFailedDialog("GuildStorageFail_GoldAddLimit");
             return(true);
         }
         return(false);
     }
     else
     {
         int num2 = (int)(this.AccessLimitTag >> targetTab * this.GuildStorageSettingFlagBitsPerTab & (long)this.GuildStorageSettingMask);
         if (num2 != 0 && member.GuildMember.Rank > (GuildMemberRank)num2)
         {
             member.SendOperationFailedDialog("GuildStorageFail_RankLimited");
             return(true);
         }
         return(false);
     }
 }
Esempio n. 2
0
 private void BroadCastInfoMessage(string sender, bool isOnline)
 {
     foreach (KeyValuePair <long, IGuildChatMember> keyValuePair in this.members)
     {
         if (keyValuePair.Value is OnlineGuildMember)
         {
             OnlineGuildMember onlineGuildMember = keyValuePair.Value as OnlineGuildMember;
             onlineGuildMember.SendInfoMessage(sender, isOnline);
         }
     }
 }
Esempio n. 3
0
 public void BroadCastChatMessage(string sender, string message)
 {
     foreach (KeyValuePair <long, IGuildChatMember> keyValuePair in this.members)
     {
         if (keyValuePair.Value is OnlineGuildMember)
         {
             OnlineGuildMember onlineGuildMember = keyValuePair.Value as OnlineGuildMember;
             onlineGuildMember.SendChatMessage(sender, message);
         }
     }
 }
Esempio n. 4
0
 public bool IsPickLimited(OnlineGuildMember member, string itemclass, int slotNo, int amount)
 {
     if (member.GuildMember.Rank > GuildMemberRank.Member)
     {
         member.SendOperationFailedDialog("GuildStorageFail_RankLimited");
         return(true);
     }
     if (itemclass == "gold")
     {
         if (this.GoldHolding - amount < this.GoldPickLimit)
         {
             member.SendOperationFailedDialog("GuildStorageFail_GoldPickLimitBySetting");
             return(true);
         }
         int integer = FeatureMatrix.GetInteger("GuildStorageGoldDailyLimit");
         if (integer == 0)
         {
             return(false);
         }
         int num = int.Parse(DateTime.Now.ToString("yyyyMMdd"));
         foreach (GuildStorageBriefLogElement guildStorageBriefLogElement in this.BriefTodayLogs)
         {
             if (guildStorageBriefLogElement.Datestamp == num && guildStorageBriefLogElement.CharacterName == member.CharacterName && guildStorageBriefLogElement.OperationType == GuildStorageOperationType.Gold)
             {
                 if (guildStorageBriefLogElement.PickCount + amount - guildStorageBriefLogElement.AddCount > integer)
                 {
                     member.SendOperationFailedDialog("GuildStorageFail_GoldPickDailyLimit");
                     return(true);
                 }
                 return(false);
             }
         }
         if (amount > integer)
         {
             member.SendOperationFailedDialog("GuildStorageFail_GoldPickDailyLimit");
             return(true);
         }
         return(false);
     }
     else
     {
         int num2 = slotNo / this.GuildStorageSlotsPerTab;
         int num3 = (int)(this.AccessLimitTag >> num2 * this.GuildStorageSettingFlagBitsPerTab & (long)this.GuildStorageSettingMask);
         if (num3 != 0 && member.GuildMember.Rank > (GuildMemberRank)num3)
         {
             member.SendOperationFailedDialog("GuildStorageFail_RankLimited");
             return(true);
         }
         return(false);
     }
 }
Esempio n. 5
0
        public bool JoinChatRoomFromGame(GuildEntity entity, GuildMemberKey key)
        {
            Log <GuildService> .Logger.InfoFormat("JoinChatRoomFromGame is called", new object[0]);

            if (entity != null)
            {
                OnlineGuildMember onlineMember = entity.GetOnlineMember(key.CID);
                if (onlineMember != null)
                {
                    Log <GuildService> .Logger.InfoFormat("JoinChatRoomFromGame onlineGuildMember is not null", new object[0]);

                    GuildChatRoom chatRoom = entity.ChatRoom;
                    return(chatRoom.JoinGameMember(onlineMember));
                }
                Log <GuildService> .Logger.WarnFormat("JoinChatRoomFromGame onlineGuildMember is null", new object[0]);
            }
            return(false);
        }