Exemplo n.º 1
0
        public virtual void disband(Map map, string msg)
        {
            if (person != null)
            {
                person.isDead = true;
            }
            map.remove(this);
            location.units.Remove(this);
            if (location.units.Contains(this))
            {
                throw new Exception("Double-presence in list " + this.getName());
            }
            if (msg != null)
            {
                bool positive = person == null || person.state != Person.personState.enthralledAgent;
                map.addMessage(msg, MsgEvent.LEVEL_GREEN, positive, location.hex);

                if (this.isEnthralled())
                {
                    map.world.prefabStore.popMsg(this.getName() + " is gone.\n" + msg);
                }
            }
            foreach (Location loc in map.locations)
            {
                if (loc.units.Contains(this))
                {
                    throw new Exception("My loc " + this.location.getName() + " but am at " + loc.getName());
                }
            }
        }
Exemplo n.º 2
0
        public virtual void disband(Map map, string msg)
        {
            person.isDead = true;
            map.remove(this);
            location.units.Remove(this);
            if (msg != null)
            {
                bool positive = person == null || person.state != Person.personState.enthralledAgent;
                map.addMessage(msg, MsgEvent.LEVEL_GREEN, positive);

                if (this.isEnthralled())
                {
                    map.world.prefabStore.popMsg(this.getName() + " is gone.\n" + msg);
                }
            }
        }