コード例 #1
0
ファイル: chatsystem.cs プロジェクト: brewsterl/cyclops
 /// <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);
     }
 }
コード例 #2
0
ファイル: chatsystem.cs プロジェクト: Wirless/cyclops
        /// <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);
            }
        }