public PlayerStats(PlayedCharacter owner) { if (owner == null) throw new ArgumentNullException("owner"); Fields = new Dictionary<PlayerField, StatsRow>(); SpellsModifications = new ObservableCollection<SpellModification>(); Owner = owner; }
public SpellsBook(PlayedCharacter owner) { if (owner == null) throw new ArgumentNullException("owner"); Character = owner; m_spells = new ObservableCollectionMT<Spell>(); m_readOnlySpells = new ReadOnlyObservableCollectionMT<Spell>(m_spells); }
public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats) { if (stats == null) throw new ArgumentNullException("stats"); Fields = new Dictionary<PlayerField, StatsRow>(); SpellsModifications = new ObservableCollection<SpellModification>(); Update(stats); }
public override bool CanStart(PlayedCharacter character) { if (Path.Length == 0) return false; return (StartFromFirst && Path[0].MapId == character.Map.Id && Path[0].SubMapId == character.SubMap.SubMapId) || Path.Any(x => character.Map.Id == x.MapId && character.SubMap.SubMapId == x.SubMapId); }
public PlayedFighter(PlayedCharacter character, Fight fight) : base(fight) { Character = character; Map = character.Map; Cell = character.Cell; Direction = character.Direction; }
public Inventory(PlayedCharacter owner, InventoryContentMessage inventory) : this(owner) { if (inventory == null) throw new ArgumentNullException("inventory"); Kamas = inventory.kamas; Update(inventory); }
public Inventory(PlayedCharacter owner) { if (owner == null) throw new ArgumentNullException("owner"); Owner = owner; m_items = new ObservableCollectionMT<Item>(); m_readOnlyItems = new ReadOnlyObservableCollectionMT<Item>(m_items); AutomaticallyDestroyItemsOnOverload = false; }
public PlayedFighter(PlayedCharacter character, Fight fight) : base(fight) { Character = character; Fight = fight; if (character.Position != null) Position = character.Position.Clone(); }
public PlayedFighter(PlayedCharacter character, Fight fight) : base(fight) { Character = character; Map = character.Map; Cell = character.Cell; Direction = character.Direction; CanFight = true; CanCastSpells = true; }
public override bool BeginTransition(SubMap @from, SubMapBinder to, PlayedCharacter character) { if (!character.ChangeMap(MapNeighbour, cell => Cells == null || Cells.Length == 0 || Array.IndexOf(Cells, cell.CellId) != -1)) { logger.Error("Cannot proceed transition : cannot reach {0} map from {1} (submap:{2} to {3})", MapNeighbour, character.Map.Id, @from.GlobalId, to.GlobalId); return false; } return true; }
public void Init(PlayedCharacter character) { FavoredAttackSpells = new List<int>(); FavoredBoostSpells = new List<int>(); FavoredCurseSpells = new List<int>(); FavoredHealSpells = new List<int>(); FavoredInvocSpells = new List<int>(); IsInvoker = false; IsHealer = false; // You can set here default preference for each breed MaxPower = 1.0; switch ((BreedEnum)character.Breed.Id) { case BreedEnum.Cra: break; case BreedEnum.Ecaflip: break; case BreedEnum.Eniripsa: IsHealer = true; MaxPower = 0.8; FavoredBoostSpells = new List<int>() { 126 }; // Mot stimulant break; case BreedEnum.Enutrof: break; case BreedEnum.Feca: break; case BreedEnum.Iop: MaxPower = 1.5; break; case BreedEnum.Osamodas: FavoredBoostSpells = new List<int>() { 26 }; // Bénédiction animale IsInvoker = true; break; case BreedEnum.Pandawa: break; case BreedEnum.Roublard: break; case BreedEnum.Sacrieur: break; case BreedEnum.Sadida: break; case BreedEnum.Sram: break; case BreedEnum.Steamer: break; case BreedEnum.Xelor: break; case BreedEnum.Zobal: break; default: break; } }
public void Start(PlayedCharacter character) { if (IsPaused) { Resume(); return; } if (IsRunning) return; IsRunning = true; Character = character; OnStart(); }
public void Start(PlayedCharacter character) { if (IsPaused) { Resume(); return; } if (IsRunning) return; IsRunning = true; Character = character; CurrentAction.Finished += OnCurrentActionFinished; OnStart(); }
public GeneralShortcut(PlayedCharacter character, int slot) : base(character, slot) { }
public SpellsBook(PlayedCharacter owner, SpellListMessage list) : this(owner) { if (list == null) throw new ArgumentNullException("list"); Update(list); }
private void OnFightLeft(PlayedCharacter character, Fight fight) { m_character = null; character.Fighter.TurnStarted -= OnTurnStarted; fight.StateChanged -= OnStateChanged; }
public SpellShortcut(PlayedCharacter character, ShortcutSpell shortcut) : base(shortcut.slot) { Character = character; SpellId = shortcut.spellId; }
public SpellsBook(PlayedCharacter owner) { if (owner == null) throw new ArgumentNullException("owner"); Character = owner; Spells = new ObservableCollection<Spell>(); }
public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats) : this() { if (stats == null) throw new ArgumentNullException("stats"); Update(stats); }
public PlayerStats(PlayedCharacter owner) : this() { if (owner == null) throw new ArgumentNullException("owner"); Owner = owner; }
private void OnMapJoined(PlayedCharacter character, Map map) { m_checkTimer = character.Bot.CallPeriodically(4 * 1000, CheckMonsters); }
public Job(PlayedCharacter owner, JobDescription job) { Owner = owner; SetJob(job); }
public void SetPlayedCharacter(PlayedCharacter character) { if (m_disposed) throw new Exception("Bot instance is disposed"); if (character == null) throw new ArgumentNullException("character"); if (Character != null) throw new Exception("Character already selected"); Character = character; OnCharactersSelected(character); }
public bool CheckCriteria(PlayedCharacter pc) { if (string.IsNullOrEmpty(this.Template.criteria)) return true; return pc.CheckCriteria(this.Template.criteria); }
public abstract bool CanActivate(SchemaElement element, PlayedCharacter character);
protected void OnCharactersSelected(PlayedCharacter character) { CharacterSelectedHandler handler = CharactersSelected; if (handler != null) handler(this, character); }
public abstract bool CanRun(PlayedCharacter character);
public Inventory(PlayedCharacter owner) { if (owner == null) throw new ArgumentNullException("owner"); Owner = owner; Items = new ObservableCollection<Item>(); }
public override bool CanRun(PlayedCharacter character) { // + conditions return character.CanMove(); }
public bool BeginTransition(PlayedCharacter character) { if (IsEnded()) return true; CurrentTransition.TransitionEnded += CurrentTransitionOnTransitionEnded; return CurrentTransition.BeginTransition(character.SubMap, SubMaps[Index + 1], character); }