protected override int GetProperty() { int result = 0; INodeGraph graph = base.Graph; BufferInfo bufferInfo = graph?.GetVariable <BufferInfo>("BufferInfo"); if (bufferInfo != null) { Data.Faction faction = bufferInfo.Unit.faction; foreach (WuxiaUnit unit in bufferInfo.Manager.UnitGenerator.WuxiaUnits) { if (!unit.IsDead && !unit.IsEnemy(faction)) { result++; } } } return(result); }
protected override int GetProperty() { INodeGraph graph = base.Graph; BufferInfo bufferInfo = graph?.GetVariable <BufferInfo>("BufferInfo"); if (bufferInfo != null) { if (Game.GameData.Character.ContainsKey(bufferInfo.Unit.CharacterInfoId)) { if (Game.GameData.Character[bufferInfo.Unit.CharacterInfoId].Skill.ContainsKey(this.SkillId)) { return(Game.GameData.Character[bufferInfo.Unit.CharacterInfoId].Skill[this.SkillId].Level); } } else if (bufferInfo.Unit.LearnedSkills.ContainsKey(this.SkillId)) { return(bufferInfo.Unit.LearnedSkills[this.SkillId].Level); } } return(0); }
protected override int GetProperty() { INodeGraph graph = base.Graph; BufferInfo bufferInfo = graph?.GetVariable <BufferInfo>("BufferInfo"); if (bufferInfo != null) { if (Game.GameData.Character.ContainsKey(bufferInfo.Unit.CharacterInfoId)) { if (Game.GameData.Character[bufferInfo.Unit.CharacterInfoId].Mantra.ContainsKey(this.MantraId)) { return(Game.GameData.Character[bufferInfo.Unit.CharacterInfoId].Mantra[this.MantraId].Level); } } else if (bufferInfo.Unit.CurrentMantra.Id == this.MantraId) { return(bufferInfo.Unit.CurrentMantra.Level); } } return(0); }