Esempio n. 1
0
        public void ChangeLootingRule(GroupLootRule newRule)
        {
            if (GroupRuleForLooting != newRule)
            {
                //zero out stuff for other rules
                if (GroupRuleForLooting == GroupLootRule.Master_Looter)
                {
                    RemoveMasterLooter(LeaderID);
                }
                else if (GroupRuleForLooting == GroupLootRule.Next_player_loots)
                {
                    NextLooterList = null;
                    CurrentLooter  = 0;
                }
                else if (GroupRuleForLooting == GroupLootRule.Chance_Loot)
                {
                    MasterLooter     = null;
                    LastLootedCorpse = null;
                }

                if (newRule == GroupLootRule.Chance_Loot)
                {
                    LastLootedCorpse = new List <string>();
                }

                GroupRuleForLooting = newRule;
                InformPlayersInGroup("Group looting rule has been changed to " + newRule.ToString().Replace("_", " "));
            }
        }
Esempio n. 2
0
		public void ChangeLootingRule(GroupLootRule newRule) {
			if (GroupRuleForLooting != newRule) {
				//zero out stuff for other rules
				if (GroupRuleForLooting == GroupLootRule.Master_Looter) {
					RemoveMasterLooter(LeaderId);
				}
				else if (GroupRuleForLooting == GroupLootRule.Next_player_loots) {
					NextLooterList = null;
					CurrentLooter = 0;
				}
				else if (GroupRuleForLooting == GroupLootRule.Chance_Loot) {
					MasterLooter = ObjectId.Empty;
					LastLootedCorpse = null;
				}

				if (newRule == GroupLootRule.Chance_Loot) {
					LastLootedCorpse = new List<ObjectId>();
				}

				GroupRuleForLooting = newRule;
				InformPlayersInGroup("Group looting rule has been changed to " + newRule.ToString().Replace("_", " "));
			}
		}