Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="monsters"></param>
 /// <param name="victim"></param>
 /// <returns></returns>
 public bool StartAggression(MonsterGroupEntity monsters, CharacterEntity victim)
 {
     if (CanStartFight(victim))
     {
         monsters.StopAction(GameActionTypeEnum.MAP);
         Add(new AlignmentFight(m_map, m_fightId++, monsters, victim));
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="character"></param>
        /// <param name="monsterGroup"></param>
        public bool StartMonsterFight(CharacterEntity character, MonsterGroupEntity monsterGroup)
        {
            if (!CanStartFight(character))
            {
                return(false);
            }

            if (!character.CanGameAction(GameActionTypeEnum.FIGHT))
            {
                character.Dispatch(WorldMessage.IM_ERROR_MESSAGE(InformationEnum.ERROR_YOU_ARE_AWAY));
                return(false);
            }

            monsterGroup.StopAction(GameActionTypeEnum.MAP);
            Add(new MonsterFight(m_map, m_fightId++, character, monsterGroup));

            return(true);
        }