public BulletTransmit(EntityBase entity, int bulletid, bool clear = false) { this.m_Entity = entity; this.weapondata = LocalModelManager.Instance.Weapon_weapon.GetBeanById(bulletid); this.mThunderRatio = 1f; this.attackratio = 1f; if (this.m_Entity == null) { this.attribute = new EntityAttributeBase(); } else { if (!clear) { this.attribute = new EntityAttributeBase(this.m_Entity.m_Data.CharID); this.m_Entity.m_EntityData.attribute.AttributeTo(this.attribute); this.CritRate = this.attribute.CritRate.Value; this.CritSuperRate = this.attribute.CritSuperRate.Value; this.mThroughEnemy = this.m_Entity.m_EntityData.ThroughEnemy; this.mThroughRatio = this.m_Entity.m_EntityData.ThroughRatio; this.mDebuffList = this.m_Entity.GetDebuffList(); this.mHitCreate2 = this.m_Entity.m_EntityData.HitCreate2; this.mHitCreate2Percent = this.m_Entity.m_EntityData.mHitCreate2Percent; this.mHitSputter = this.m_Entity.m_EntityData.BulletSputter; this.trailType = this.m_Entity.m_EntityData.ArrowTrailType; this.headType = this.m_Entity.m_EntityData.ArrowHeadType; } else { this.Clear(); } this.attack = MathDxx.CeilToInt((float)this.m_Entity.m_EntityData.GetAttack(this.weapondata.Attack)); } }
private void Clear() { this.attribute = new EntityAttributeBase(this.m_Entity.m_Data.CharID); this.mThroughEnemy = 0; this.mHitCreate2 = 0; this.mDebuffList.Clear(); this.trailType = EElementType.eNone; this.headType = EElementType.eNone; }
public static long GetMaxHP(int entityid) { EntityAttributeBase base2 = new EntityAttributeBase(entityid); string[] monsterTmxAttributes = Hold.BattleData.mModeData.GetMonsterTmxAttributes(); if ((monsterTmxAttributes != null) && (monsterTmxAttributes.Length > 0)) { int index = 0; int length = monsterTmxAttributes.Length; while (index < length) { Goods_goods.GoodData goodData = Goods_goods.GetGoodData(monsterTmxAttributes[index]); base2.Excute(goodData); index++; } } return(base2.HPValue.Value); }