-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4f6349
commit 5313e97
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Smod2; | ||
using Smod2.API; | ||
using Smod2.EventHandlers; | ||
using Smod2.Events; | ||
|
||
namespace SCPSL_SCP049_2_Patch.Event { | ||
|
||
public class OnPlayerHurtEvent : IEventHandlerPlayerHurt { | ||
|
||
// 插件对象 | ||
private Plugin _plugin = null; | ||
|
||
public OnPlayerHurtEvent(Plugin plugin) { | ||
this._plugin = plugin; | ||
} | ||
|
||
public void OnPlayerHurt(PlayerHurtEvent ev) { | ||
|
||
// 如果插件没启用 | ||
if (this._plugin.GetConfigBool("SCP049_2_patch_enable") == false) { | ||
return; | ||
} | ||
|
||
// 判断玩家是不是被SCP-049-2攻击的 | 不是结束事件 | ||
if (ev.DamageType != DamageType.SCP_049_2) { | ||
return; | ||
} | ||
|
||
// 获取设定伤害 | ||
ev.Damage = this._plugin.GetConfigInt("SCP049_2_patch_damage"); | ||
|
||
} | ||
|
||
} | ||
} |