Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复:多个插件的功能修复 #732

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DamageRuleLoot/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Configuration
public bool Enabled2 { get; set; } = true;

[JsonProperty("广告开关", Order = 2)]
public bool Enabled3 { get; set; } = true;
public bool Enabled3 { get; set; } = false;

[JsonProperty("广告内容", Order = 2)]
public string Advertisement { get; set; } = $"[i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] 羽学 [C/E7A5CC:|] [c/00FFFF:西江小子][i:3459]";
Expand Down
14 changes: 5 additions & 9 deletions src/DamageRuleLoot/DamageRuleLoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ public class DamageRuleLoot : TerrariaPlugin
{

#region 插件信息
public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!; public override string Author => "羽学 西江小子";
public override Version Version => new Version(1, 3, 3);
public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!;
public override string Author => "羽学 西江小子";
public override Version Version => new Version(1, 3, 4);
public override string Description => GetString("根据输出排名榜决定是否掉落宝藏袋的惩罚,并对各个BOSS进行相对的伤害规则处理");
#endregion

Expand Down Expand Up @@ -440,13 +441,8 @@ private void OnNpcKill(NpcKilledEventArgs args)
case 372:
case 373:
{
if (!Config.Sharkron)
{
return;
}

var strike2 = strikeNPC.Find(x => x.npcID == 370);
CombDmg2(i, ref strike2, 370, new int[] { 372, 373 }, 10000f);
CombDmg3(Config.Sharkron, i, ref strike2, 370, new int[] { 372, 373 }, 10000f);
if (strikeNPC[i].npcID == 370)
{
SendKillMessage(GetString("猪龙鱼公爵"), strikeNPC[i].PlayerOrDamage, strikeNPC[i].AllDamage);
Expand Down Expand Up @@ -499,7 +495,7 @@ private void OnNpcKill(NpcKilledEventArgs args)
}

var strike2 = strikeNPC.Find(x => x.npcID == 127);
CombDmg3(i, ref strike2, 127, new int[] { 128, 129, 130, 131 }, 300000f);
CombDmg3(Config.Sharkron, i, ref strike2, 127, new int[] { 128, 129, 130, 131 }, 300000f);
if (strikeNPC[i].npcID == 127)
{
SendKillMessage(args.npc.FullName, strikeNPC[i].PlayerOrDamage, strikeNPC[i].AllDamage);
Expand Down
3 changes: 3 additions & 0 deletions src/DamageRuleLoot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
## 更新日志

```
v1.3.4
修复猪鲨伤害统计不开"攻击鲨鱼龙给猪鲨造成真实伤害“不播报

v1.3.1
对代码做了重复部分做成统一方法整理归纳
修复了自定义转移伤害表里的【涵盖暴击】配置项
Expand Down
4 changes: 2 additions & 2 deletions src/DamageRuleLoot/Tool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static void CombDmg2(int i, ref StrikeNPC? strike2, int id, int[] ids, fl
}

//机械骷髅王的单独处理
public static void CombDmg3(int i, ref StrikeNPC? strike2, int id, int[] ids, float value)
public static void CombDmg3(bool flag, int i, ref StrikeNPC? strike2, int id, int[] ids, float value)
{
if (strike2 == null)
{
Expand All @@ -207,7 +207,7 @@ public static void CombDmg3(int i, ref StrikeNPC? strike2, int id, int[] ids, fl

else if (StrikeNPC.strikeNPC[i].npcID != id)
{
if (!DamageRuleLoot.Config.Prime)
if (!flag)
{
return; //比CombDmg2多了这一行 这个Config.Prime同时也影响伤害转移
}
Expand Down
2 changes: 1 addition & 1 deletion src/Ezperm/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Configuration Read(string path)
new GroupInfo
{
Name = "default",
AddPermissions = new List<string> { "tshock.world.movenpc","tshock.world.time.usesundial", "tshock.tp.pylon", "tshock.tp.demonconch", "tshock.tp.magicconch", "tshock.tp.tppotion", "tshock.tp.rod","tshock.tp.wormhole","tshock.npc.startdd2", "tshock.npc.spawnpets", "tshock.npc.summonboss","tshock.npc.startinvasion" },
AddPermissions = new List<string> { "tshock.world.movenpc","tshock.world.time.usesundial", "tshock.tp.pylon", "tshock.tp.demonconch", "tshock.tp.magicconch", "tshock.tp.tppotion", "tshock.tp.rod","tshock.tp.wormhole","tshock.npc.startdd2", "tshock.npc.spawnpets", "tshock.npc.summonboss","tshock.npc.startinvasion","tshock.npc.hurttown" },
DelPermissions = new List<string> { "tshock.admin" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Ezperm/Ezperm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Ezperm : TerrariaPlugin
{
public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!; public override string Author => "大豆子,肝帝熙恩优化1449";
public override string Description => GetString("一个指令帮助小白给初始服务器添加缺失的权限,还可以批量添删权限");
public override Version Version => new Version(1, 2, 6);
public override Version Version => new Version(1, 2, 7);
internal static Configuration Config = null!;
public Ezperm(Main game) : base(game)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Ezperm/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"tshock.npc.summonboss",
"tshock.npc.startinvasion",
"tshock.npc.spawnpets",
"tshock.world.time.usesundial"
"tshock.world.time.usesundial",
"tshock.npc.hurttown"
],
"删除的权限": [
"tshock.admin"
Expand Down
2 changes: 2 additions & 0 deletions src/Ezperm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
## 更新日志

```
v1.2.7
添加权限:
v1.2.4
默认数据添加召唤城镇宠物的权限
v1.2.3
Expand Down
7 changes: 4 additions & 3 deletions src/LifemaxExtra/PluginContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class LifemaxExtra : LazyPlugin
{
public override string Author => "佚名 & 肝帝熙恩 & 少司命";
public override string Description => GetString("提升生命值上限");
public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!; public override Version Version => new Version(1, 0, 0, 11);
public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!;
public override Version Version => new Version(1, 0, 1, 0);

public LifemaxExtra(Main game) : base(game)
{
Expand Down Expand Up @@ -262,7 +263,7 @@ private void SetPlayerMana(TSPlayer ply, int Mana, bool enh = false)
}
ply.TPlayer.statManaMax = currency;
ply.TPlayer.statManaMax2 = currency;
ply.TPlayer.statMana = currency;
//ply.TPlayer.statMana = currency;
ply.SendData(PacketTypes.PlayerMana, null, ply.Index);
ply.SendData(PacketTypes.EffectMana, null, ply.Index, raise);
}
Expand Down Expand Up @@ -293,7 +294,7 @@ private void SetPlayerHP(TSPlayer ply, int HP, bool enh = false)
}
ply.TPlayer.statLifeMax = currency;
ply.TPlayer.statLifeMax2 = currency;
ply.TPlayer.statLife = currency;
//ply.TPlayer.statLife = currency;
ply.SendData(PacketTypes.PlayerHp, null, ply.Index);
ply.SendData(PacketTypes.EffectHeal, null, ply.Index, raise);
}
Expand Down
3 changes: 3 additions & 0 deletions src/LifemaxExtra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
## 更新日志

```
v1.0.1.0
修复生命水晶可以当超级血药用的问题

v1.0.0.8
SSC下指令无效提示,使用本插件自动更改ts自己config的maxmp和maxhp

Expand Down
Loading