Beispiel #1
0
 /// <summary>
 /// Handle a message from a creature.
 /// </summary>
 /// <param name="creature">The creature sending the message.</param>
 /// <param name="msg">The message sent.</param>
 public void HandleChat(Creature creature, string msg)
 {
     ThingSet tSet = new ThingSet();
     if (msg.StartsWith(PRIVATE_MSG_INDICATOR)) {
         HandlePrivateMessage(creature, msg);
     } else if (msg.StartsWith(MSG_QUANTIFIER)) {
         HandleQuantifiedMessage(creature, msg, tSet);
     } else {
         tSet = gameMap.GetThingsInVicinity(creature.CurrentPosition, true);
         HandleLocalChat(creature.GetChatType(), tSet, msg, creature);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Handle a message from a creature.
        /// </summary>
        /// <param name="creature">The creature sending the message.</param>
        /// <param name="msg">The message sent.</param>
        public void HandleChat(Creature creature, string msg)
        {
            ThingSet tSet = new ThingSet();

            if (msg.StartsWith(PRIVATE_MSG_INDICATOR))
            {
                HandlePrivateMessage(creature, msg);
            }
            else if (msg.StartsWith(MSG_QUANTIFIER))
            {
                HandleQuantifiedMessage(creature, msg, tSet);
            }
            else
            {
                tSet = gameMap.GetThingsInVicinity(creature.CurrentPosition, true);
                HandleLocalChat(creature.GetChatType(), tSet, msg, creature);
            }
        }