public override void Init(StoC_0x7B_TrainerWindow pak) { countRows = pak.ReadByte(); m_skills = new ChampionSkill[countRows]; for (int i = 0; i < countRows; i++) { ChampionSkill skill = new ChampionSkill(); skill.index = pak.ReadByte(); skill.countSpells = pak.ReadByte(); skill.m_spells = new ChampionSpell[skill.countSpells]; for (int index = 0; index < skill.countSpells; index++) { ChampionSpell spell = new ChampionSpell(); spell.index = pak.ReadByte(); spell.type = pak.ReadByte(); spell.icon = pak.ReadShortLowEndian(); spell.name = pak.ReadPascalString(); spell.aviability = pak.ReadByte(); spell.stickedSkillsCount = pak.ReadByte(); if (spell.stickedSkillsCount > 0) { spell.stickedSkills = new byte[spell.stickedSkillsCount]; } for (int k = 0; k < spell.stickedSkillsCount; k++) { spell.stickedSkills[k] = pak.ReadByte(); } skill.m_spells[index] = spell; } m_skills[i] = skill; } }
void Awake() { if (prop == null) { prop = GetComponent <ChampionProp>(); } if (skillLogic == null) { skillLogic = GetComponent <ChampionSkill>(); } if (neutralAI == null) { neutralAI = GetComponent <NeutralAI>(); } }
public override void MakeString(TextWriter text, bool flagsDescription) { for (int i = 0; i < countRows; i++) { ChampionSkill skill = (ChampionSkill)m_skills[i]; text.Write("\n\tskillIndex:{0,-3} countSpells:{1,-2}", skill.index, skill.countSpells); for (int j = 0; j < skill.countSpells; j++) { ChampionSpell spell = (ChampionSpell)skill.m_spells[j]; text.Write("\n\tindex:{0,-3} type:{1,-2} icon:0x{2:X4} aviability:{4} stickedSkillsCount:{5} \"{3}\" ", spell.index, spell.type, spell.icon, spell.name, spell.aviability, spell.stickedSkillsCount); for (int k = 0; k < spell.stickedSkillsCount; k++) { text.Write(" [{0}]:0x{1:X2}", k, spell.stickedSkills[k]); } } } }
public override void Init(StoC_0x7B_TrainerWindow pak) { countRows = pak.ReadByte(); m_skills = new ChampionSkill[countRows]; for (int i = 0; i < countRows; i++) { ChampionSkill skill = new ChampionSkill(); skill.index = pak.ReadByte(); skill.countSpells = pak.ReadByte(); skill.m_spells = new ChampionSpell[skill.countSpells]; for (int index = 0; index < skill.countSpells; index++) { ChampionSpell spell = new ChampionSpell(); spell.index = pak.ReadByte(); spell.type = pak.ReadByte(); spell.icon = pak.ReadShortLowEndian(); spell.name = pak.ReadPascalString(); spell.aviability = pak.ReadByte(); spell.stickedSkillsCount = pak.ReadByte(); if (spell.stickedSkillsCount > 0) spell.stickedSkills = new byte[spell.stickedSkillsCount]; for (int k = 0; k < spell.stickedSkillsCount; k++) { spell.stickedSkills[k] = pak.ReadByte(); } skill.m_spells[index] = spell; } m_skills[i] = skill; } }