Beispiel #1
0
        public static void OnMapChange(PlayerMobile pm)
        {
            if (TempCombatants == null || pm.Map == Map.Internal || pm.Map == null)
            {
                return;
            }

            TempCombatants.Where(t => t.From == pm).IterateReverse(RemoveTempCombatant);
        }
        public static TemporaryCombatant GetTempCombatant(Mobile from, Mobile to)
        {
            foreach (var combatant in TempCombatants.Where(c => c.From == from))
            {
                if (combatant.Friendly == null && to == null)
                {
                    return(combatant);
                }

                if (combatant.Friendly == to || (combatant.FriendlyGuild != null && combatant.FriendlyGuild == from.Guild as Guild))
                {
                    return(combatant);
                }
            }

            return(null);
        }