Beispiel #1
0
        /// <summary>
        /// Removes the creature from the game world and only
        /// appends the data to the ThingSet without reseting or sending it.
        /// </summary>
        /// <param name="creature">The creature to remove.</param>
        /// <param name="tSet">A reference for which things to notify of the
        /// creature's removal.</param>
        private void AppendRemoveCreature(Creature creature)
        {
            creaturesOnline.Remove(creature.GetID());
            creature.LogedIn = false;
            byte     stackpos = gameMap.GetStackPosition(creature, creature.CurrentPosition);
            ThingSet tSet     = gameMap.GetThingsInVicinity(creature.CurrentPosition);

            foreach (Monster summon in creature.GetSummons())
            {
                summon.SetMaster(null);
            }
            foreach (Thing thing in tSet.GetThings())
            {
                thing.RemoveThing(creature.CurrentPosition, stackpos);
            }
            gameMap.RemoveThing(creature, creature.CurrentPosition);
        }
Beispiel #2
0
 /// <summary>
 /// Removes the creature from the game world and only
 /// appends the data to the ThingSet without reseting or sending it.
 /// </summary>
 /// <param name="creature">The creature to remove.</param>
 /// <param name="tSet">A reference for which things to notify of the
 /// creature's removal.</param>
 private void AppendRemoveCreature(Creature creature)
 {
     creaturesOnline.Remove(creature.GetID());
     creature.LogedIn = false;
     byte stackpos = gameMap.GetStackPosition(creature, creature.CurrentPosition);
     ThingSet tSet = gameMap.GetThingsInVicinity(creature.CurrentPosition);
     foreach (Monster summon in creature.GetSummons()) {
         summon.SetMaster(null);
     }
     foreach (Thing thing in tSet.GetThings()) {
         thing.RemoveThing(creature.CurrentPosition, stackpos);
     }
     gameMap.RemoveThing(creature, creature.CurrentPosition);
 }