游戏狂人
 
- 贡献度
- 71
- 金元
- 14631
- 积分
- 1757
- 精华
- 1
- 注册时间
- 2009-3-10

|
本帖最后由 k26451864 于 2022-6-13 22:40 编辑
修改方法可移步这里学习→传送门
// Mm24f.Item.ItemVehicleEngineEntity
public float LoadCapability
{
get
{
if (!this._dirtyLoadCapability)
{
return this._cacheLoadCapability;
}
float num = 1f + (float)this._modAlloyS * 0.01f + (float)this._modAlloyM * 0.02f + (float)this._modAlloyL * 0.03f;
float num2 = (100f + Const.Get(string.Format("VW_RARITY_{0}_ENGINE_COEFFICIENT", this._rarity + 1))) / 100f;
float num3 = this.MasterData.LoadCapability * num * num2;// num2后面“* 10f”就是10倍,改这里目前测试很稳定
this._dirtyLoadCapability = false;
this._cacheLoadCapability = num3;
return num3; // 这里改完不稳定,会还原
}
}
// Mm24f.Character.HumanEntity
// Token: 0x170003C5 RID: 965
// (get) Token: 0x06001EFD RID: 7933
public int HpMax
{
get
{
int num = 0;
SkillEntity learnedSkill = this.GetLearnedSkill("HP_PLUS");
if (learnedSkill != null)
{
num = Mathf.CeilToInt((float)this.BaseHpMax * (float)learnedSkill.GetParameter() / 100f);
}
return this.BaseHpMax + num;// num后面“+ 10000”就是初始人物多加1W生命上限
}
}
// Mm24f.Master.MmShop.ShopItem
// Token: 0x17000439 RID: 1081
// (get) Token: 0x06001237 RID: 4663 RVA: 0x0000B77B File Offset: 0x0000997B
public int Rarity
{
get
{
return this._rarity;// _rarity后面“+ 4”就是商店售卖装备5星
}
}
// Mm24f.Item.ItemVehicleWeaponEntity
// Token: 0x060022A4 RID: 8868
public void UseBullet()
{
if (this.IsBulletInfinity)
{
return;
}
if (this._bulletCount <= 0)
{
throw new InvalidProgramException("Cannot use bullet. _bulletCount is 0.");
}
this._bulletCount--;// this._bulletCount--改成this._bulletCount = this._bulletCount就是弹药不减
if (Singleton<GameManager>.Instance.GetIntegerFlag("SF_TUTORIAL_EVENT_0070_0010") == 0 && Singleton<GameManager>.Instance.GetIntegerFlag(Const.IRONBASE_RELATION) > 0 && this._bulletCount <= Mathf.FloorToInt((float)this.MasterData.Magazine / 3f))
{
Singleton<GameManager>.Instance.SetFlag("SF_TUTORIAL_EVENT_0070_0010", 1);
}
}
// Mm24f.Item.WeaponRecipe
// Token: 0x060022F4 RID: 8948
public static ItemEntityBase CreateExecute(string recipe_id, int num = 1, int rarity = -1, ItemVehicleBase materialEntity = null)
{
if (WeaponRecipe.IsCreateableByMaterial(recipe_id) < num)
{
return null;
}
MmWeaponRecipe.Param param = Singleton<MasterManager>.Instance.WeaponRecipe.Find(recipe_id);
if (param.IronScrap > 0f)
{
Singleton<GameManager>.Instance.SubScrapInventory("HOID_IRON_SCRAP", param.IronScrap * (float)num);// (float)num后面加一个“ * 0 ”就是废铁不减
}
if (param.HighTechScrap > 0f)
{
Singleton<GameManager>.Instance.SubScrapInventory("HOID_HIGHTECH_SCRAP", param.HighTechScrap * (float)num);// (float)num后面加一个“ * 0 ”就是高科技废铁不减
}
if (param.Money > 0)
{
int gold = param.Money * Mathf.FloorToInt((float)(num * 100)) / 100;// num后面加一个“ * 0 ”就是钱不减
Singleton<GameManager>.Instance.PayGold(gold);
}
if (materialEntity == null && param.MaterialA != "")
{
foreach (ItemEntityBase item in ((IEnumerable<ItemEntityBase>)WeaponRecipe.GetItemEntities(param.MaterialA, param.NumA * num)))// num后面加一个“ * 0 ”就是材料A不减
{
Singleton<GameManager>.Instance.RemoveItemFromInventory(item);
}
}
if (param.MaterialB != "")
{
foreach (ItemEntityBase item2 in ((IEnumerable<ItemEntityBase>)WeaponRecipe.GetItemEntities(param.MaterialB, param.NumB * num)))num后面加一个“ * 0 ”就是材料B不减
{
Singleton<GameManager>.Instance.RemoveItemFromInventory(item2);
}
}
ItemEntityBase itemEntityBase = null;
if (param.WeaponId != "")
{
if (Singleton<MasterManager>.Instance.ItemVehicleWeapons.Dict.ContainsKey(param.WeaponId))
{
if (rarity == -1)
{
itemEntityBase = ItemVehicleWeaponEntity.Create(param.WeaponId, 0, 4);// 0,4改成4,4就是武器制造必定5星
}
else
{
itemEntityBase = ItemVehicleWeaponEntity.Create(param.WeaponId, rarity, rarity);
}
}
else
{
if (!Singleton<MasterManager>.Instance.ItemVehicleEngines.Dict.ContainsKey(param.WeaponId))
{
throw new ArgumentException(param.WeaponId);
}
if (rarity == -1)
{
itemEntityBase = ItemVehicleEngineEntity.Create(param.WeaponId, 0, 4);// 0,4改成4,4就是引擎制造必定5星
}
else
{
itemEntityBase = ItemVehicleEngineEntity.Create(param.WeaponId, rarity, rarity);
}
}
if (itemEntityBase != null)
{
for (int i = 0; i < num; i++)
{
Singleton<GameManager>.Instance.AddItemIntoInventory(itemEntityBase);
}
}
}
return itemEntityBase;
}
以上制造相关的修改编译后格式会有变化,属正常现象,制造时材料不减但必须得有相关材料才能开启配方并且可以制造
// Mm24f.Character.SkillEntity
// Token: 0x06002C9A RID: 11418 RVA: 0x0001B3E9 File Offset: 0x000195E9
public int IncreaseUsedCount()
{
if (!this.IsInfinity())
{
if (this._used >= this.MasterData.Counts[this._step])
{
throw new Exception("cannot increment count of used. skill '{0}' is out.");
}
this._used++;// ++改成" = 0 "就是技能使用次数不减
}
return this.GetRemainningCount();
}
// Mm24f.Character.HumanEntity
// Token: 0x06002C0B RID: 11275 RVA: 0x000C0380 File Offset: 0x000BE580
public void DealSkillPoint(string skillId, bool nephtechFlag = false, bool forceDeal = false)
{
{
this._skillPoint -= num2;// 改成“this._skillPoint = this._skillPoint;”技能点不减,篇幅不够这里简略了,这是倒数第三行
this._skillPointUsed += num2;
}
}
this.UpdateTrophiesRelatedSkill(nephtechFlag && !forceDeal);
}
|
评分
-
1
查看全部评分
-
|