//计算已解锁翅膀属性总和 public void getPropertyTotal(ref WingItemData wingitemdata) { for (int j = 0; j < WingDefine.Max_Wing_Level; ++j) { WingLevelTableItem wlt = DataManager.WingLevelTable[wingitemdata.id * 1000 + (j + 1)] as WingLevelTableItem; if (wlt == null) { GameDebug.LogError("winglevel表不存在id为" + wingitemdata.id * 1000 + (j + 1) + "的数据"); } switch ((WingPropertyType)wlt.propertyType) { case WingPropertyType.Life: wingitemdata.liftTotal += wlt.propertyNum; break; case WingPropertyType.Attack: wingitemdata.attackTotal += wlt.propertyNum; break; case WingPropertyType.Defence: wingitemdata.defenceTotal += wlt.propertyNum; break; case WingPropertyType.Critical: wingitemdata.criticalTotal += wlt.propertyNum; break; case WingPropertyType.Energy: wingitemdata.powerTotal += wlt.propertyNum; break; } } }
private void AddWingSkillBuff() { WingData wingData = PlayerDataPool.Instance.MainData.mWingData; if (mScene.getType() == SceneType.SceneType_City) { return; } for (int i = 0; i < wingData.wingItems.Count; ++i) { WingLevelTableItem levelRes = wingData.GetLevelRes(i); if (levelRes != null && levelRes.buffid != -1) { AddSkillEffect(new AttackerAttr(this), SkillEffectType.Buff, System.Convert.ToUInt32(levelRes.buffid)); GameDebug.Log("添加翅膀buff:" + levelRes.buffid); } } }
public void UpdateProperty() { life = 0; attack = 0; defence = 0; critical = 0; power = 0; for (int j = 0; j <= level; ++j) { WingLevelTableItem wlt = DataManager.WingLevelTable[id * 1000 + j] as WingLevelTableItem; if (wlt == null) { GameDebug.LogError("winglevel表不存在id为" + (id * 1000 + j) + "的数据"); } switch ((WingPropertyType)wlt.propertyType) { case WingPropertyType.Life: life += wlt.propertyNum; break; case WingPropertyType.Attack: attack += wlt.propertyNum; break; case WingPropertyType.Defence: defence += wlt.propertyNum; break; case WingPropertyType.Critical: critical += wlt.propertyNum; break; case WingPropertyType.Energy: power += wlt.propertyNum; break; } } }
public bool GetWingLevelRes(int wingid, int level, out WingLevelTableItem levelRes) { levelRes = DataManager.WingLevelTable[wingid * 1000 + level] as WingLevelTableItem; return(levelRes != null); }