Exemplo n.º 1
0
        public static void RemoveArcaneItemExperienceEntry(PlayerMobile player, BaseCreature creature)
        {
            ArcaneItemExperienceEntry playerEntry = null;

            if (player == null || creature == null)
            {
                return;
            }

            foreach (ArcaneItemExperienceEntry entry in creature.ArcaneItemExperienceEntries)
            {
                if (entry == null)
                {
                    continue;
                }

                if (entry.Player == player)
                {
                    playerEntry = entry;
                    break;
                }
            }

            if (playerEntry != null)
            {
                //TEST: Remove references in
                //creature.ArcaneItems

                if (creature.ArcaneItemExperienceEntries.Contains(playerEntry))
                {
                    creature.ArcaneItemExperienceEntries.Remove(playerEntry);
                }
            }
        }
Exemplo n.º 2
0
        public static ArcaneItemExperienceEntry GetArcaneItemExperienceEntry(PlayerMobile player, BaseCreature creature)
        {
            ArcaneItemExperienceEntry playerEntry = null;

            if (player == null || creature == null)
            {
                return(playerEntry);
            }

            foreach (ArcaneItemExperienceEntry entry in creature.ArcaneItemExperienceEntries)
            {
                if (entry == null)
                {
                    continue;
                }

                if (entry.Player == player)
                {
                    return(entry);
                }
            }

            return(playerEntry);
        }
Exemplo n.º 3
0
        public static void RecordDamage(PlayerMobile player, BaseCreature creature, int amount)
        {
            if (player == null || creature == null)
            {
                return;
            }
            if (creature.Summoned || creature.NoKillAwards && creature.DiedByShipSinking)
            {
                return;
            }

            ArcaneItemExperienceEntry playerEntry = GetArcaneItemExperienceEntry(player, creature);

            if (playerEntry == null)
            {
                playerEntry = new ArcaneItemExperienceEntry();

                creature.ArcaneItemExperienceEntries.Add(playerEntry);
            }



            //TEST: FINISH
        }