public override void Serialize(IDataWriter writer) { writer.WriteShort(((short)(m_effects.Count))); int effectsIndex; for (effectsIndex = 0; (effectsIndex < m_effects.Count); effectsIndex = (effectsIndex + 1)) { FightDispellableEffectExtendedInformations objectToSend = m_effects[effectsIndex]; objectToSend.Serialize(writer); } writer.WriteShort(((short)(m_marks.Count))); int marksIndex; for (marksIndex = 0; (marksIndex < m_marks.Count); marksIndex = (marksIndex + 1)) { GameActionMark objectToSend = m_marks[marksIndex]; objectToSend.Serialize(writer); } writer.WriteVarUhShort(m_gameTurn); writer.WriteInt(m_fightStart); writer.WriteShort(((short)(m_idols.Count))); int idolsIndex; for (idolsIndex = 0; (idolsIndex < m_idols.Count); idolsIndex = (idolsIndex + 1)) { Idol objectToSend = m_idols[idolsIndex]; objectToSend.Serialize(writer); } }
public override void Deserialize(IDataReader reader) { int effectsCount = reader.ReadUShort(); int effectsIndex; m_effects = new System.Collections.Generic.List <FightDispellableEffectExtendedInformations>(); for (effectsIndex = 0; (effectsIndex < effectsCount); effectsIndex = (effectsIndex + 1)) { FightDispellableEffectExtendedInformations objectToAdd = new FightDispellableEffectExtendedInformations(); objectToAdd.Deserialize(reader); m_effects.Add(objectToAdd); } int marksCount = reader.ReadUShort(); int marksIndex; m_marks = new System.Collections.Generic.List <GameActionMark>(); for (marksIndex = 0; (marksIndex < marksCount); marksIndex = (marksIndex + 1)) { GameActionMark objectToAdd = new GameActionMark(); objectToAdd.Deserialize(reader); m_marks.Add(objectToAdd); } m_gameTurn = reader.ReadVarUhShort(); m_fightStart = reader.ReadInt(); int idolsCount = reader.ReadUShort(); int idolsIndex; m_idols = new System.Collections.Generic.List <Idol>(); for (idolsIndex = 0; (idolsIndex < idolsCount); idolsIndex = (idolsIndex + 1)) { Idol objectToAdd = new Idol(); objectToAdd.Deserialize(reader); m_idols.Add(objectToAdd); } }
public void AddMark(Mark mark) { bool seq = this.SequencesManager.StartSequence(SequenceTypeEnum.SEQUENCE_SPELL); this.Marks.Add(mark); foreach (var fighter in GetFighters <CharacterFighter>(false)) { GameActionMark gameActionMark = null; if (mark.IsVisibleFor(fighter)) { gameActionMark = mark.GetGameActionMark(); } else { gameActionMark = mark.GetHiddenGameActionMark(); } fighter.Send(new GameActionFightMarkCellsMessage(0, mark.Source.Id, gameActionMark)); } foreach (var fighter in GetAllFighters()) // dont work { if (mark.ContainsCell(fighter.CellId)) { fighter.TriggerMarks(fighter, MarkTriggerTypeEnum.ON_CAST); } } if (seq) { this.SequencesManager.EndSequence(SequenceTypeEnum.SEQUENCE_SPELL); } }
public override void Deserialize(IDataReader reader) { var effectsCount = reader.ReadUShort(); Effects = new List <FightDispellableEffectExtendedInformations>(); for (var effectsIndex = 0; effectsIndex < effectsCount; effectsIndex++) { var objectToAdd = new FightDispellableEffectExtendedInformations(); objectToAdd.Deserialize(reader); Effects.Add(objectToAdd); } var marksCount = reader.ReadUShort(); Marks = new List <GameActionMark>(); for (var marksIndex = 0; marksIndex < marksCount; marksIndex++) { var objectToAdd = new GameActionMark(); objectToAdd.Deserialize(reader); Marks.Add(objectToAdd); } GameTurn = reader.ReadVarUhShort(); FightStart = reader.ReadInt(); var idolsCount = reader.ReadUShort(); Idols = new List <Idol>(); for (var idolsIndex = 0; idolsIndex < idolsCount; idolsIndex++) { var objectToAdd = new Idol(); objectToAdd.Deserialize(reader); Idols.Add(objectToAdd); } }
public override void Deserialize(ICustomDataInput reader) { var countEffects = reader.ReadShort(); Effects = new List <FightDispellableEffectExtendedInformations>(); for (short i = 0; i < countEffects; i++) { FightDispellableEffectExtendedInformations type = new FightDispellableEffectExtendedInformations(); type.Deserialize(reader); Effects.Add(type); } var countMarks = reader.ReadShort(); Marks = new List <GameActionMark>(); for (short i = 0; i < countMarks; i++) { GameActionMark type = new GameActionMark(); type.Deserialize(reader); Marks.Add(type); } GameTurn = reader.ReadVarShort(); FightStart = reader.ReadInt(); var countIdols = reader.ReadShort(); Idols = new List <Idol>(); for (short i = 0; i < countIdols; i++) { Idol type = new Idol(); type.Deserialize(reader); Idols.Add(type); } }
public GameActionFightMarkCellsMessage( short actionId, double sourceId, GameActionMark mark ) : base( actionId, sourceId ) { Mark = mark; }
public override void Deserialize(IDataReader reader) { uint num1 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num1; ++index) { FightDispellableEffectExtendedInformations extendedInformations = new FightDispellableEffectExtendedInformations(); extendedInformations.Deserialize(reader); this.effects.Add(extendedInformations); } uint num2 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num2; ++index) { GameActionMark gameActionMark = new GameActionMark(); gameActionMark.Deserialize(reader); this.marks.Add(gameActionMark); } this.gameTurn = (uint)reader.ReadVarUhShort(); if (this.gameTurn < 0U) { throw new Exception("Forbidden value (" + (object)this.gameTurn + ") on element of GameFightSpectateMessage.gameTurn."); } this.fightStart = (uint)reader.ReadInt(); if (this.fightStart < 0U) { throw new Exception("Forbidden value (" + (object)this.fightStart + ") on element of GameFightSpectateMessage.fightStart."); } uint num3 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num3; ++index) { Idol idol = new Idol(); idol.Deserialize(reader); this.idols.Add(idol); } uint num4 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num4; ++index) { GameFightEffectTriggerCount effectTriggerCount = new GameFightEffectTriggerCount(); effectTriggerCount.Deserialize(reader); this.fxTriggerCounts.Add(effectTriggerCount); } }
public void Deserialize(IDataReader reader) { Effects = new FightDispellableEffectExtendedInformations[reader.ReadShort()]; for (var i = 0; i < Effects.Length; i++) { (Effects[i] = new FightDispellableEffectExtendedInformations()).Deserialize(reader); } Marks = new GameActionMark[reader.ReadShort()]; for (var i = 0; i < Marks.Length; i++) { (Marks[i] = new GameActionMark()).Deserialize(reader); } GameTurn = (UInt16)reader.ReadVarShort(); FightStart = (UInt32)reader.ReadInt(); Idols = new Idol[reader.ReadShort()]; for (var i = 0; i < Idols.Length; i++) { (Idols[i] = new Idol()).Deserialize(reader); } }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); Mark = new GameActionMark(); Mark.Deserialize(reader); }
public GameActionFightMarkCellsMessage(GameActionMark Mark) { this.Mark = Mark; }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); Mark = new GameActionMark(); Mark.Deserialize(reader); }
public GameActionFightMarkCellsMessage(GameActionMark mark) { m_mark = mark; }
public GameActionFightMarkCellsMessage(uint actionId, double sourceId, GameActionMark mark) : base(actionId, sourceId) { this.mark = mark; }
public GameActionFightMarkCellsMessage(uint actionId = 0, int sourceId = 0, GameActionMark mark = null) { ActionId = actionId; SourceId = sourceId; Mark = mark; }