h1z1-server 0.47.2-5 → 0.47.2-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/servers/ZoneServer2016/entities/constructionchildentity.ts +8 -1
- package/src/servers/ZoneServer2016/entities/constructiondoor.ts +8 -1
- package/src/servers/ZoneServer2016/entities/constructionparententity.ts +8 -1
- package/src/servers/ZoneServer2016/managers/constructionmanager.ts +2 -1
- package/src/servers/ZoneServer2016/zonepackethandlers.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "h1z1-server",
|
|
3
|
-
"version": "0.47.2-
|
|
3
|
+
"version": "0.47.2-6",
|
|
4
4
|
"description": "Library for emulating h1z1 servers",
|
|
5
5
|
"author": "Quentin Gruber <quentingruber@gmail.com> (http://github.com/quentingruber)",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@types/js-yaml": "4.0.9",
|
|
17
|
-
"@types/node": "
|
|
17
|
+
"@types/node": "^25.0.3",
|
|
18
18
|
"@types/ws": "8.18.1",
|
|
19
19
|
"debug": "4.4.3",
|
|
20
20
|
"h1emu-core": "1.3.2",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"cross-env": "^10.1.0",
|
|
34
34
|
"globals": "^16.5.0",
|
|
35
|
-
"oxlint": "^1.
|
|
35
|
+
"oxlint": "^1.34.0",
|
|
36
36
|
"prettier": "^3.7.1",
|
|
37
37
|
"tsx": "^4.20.6",
|
|
38
38
|
"typedoc": "^0.28.14"
|
|
@@ -535,7 +535,14 @@ export class ConstructionChildEntity extends BaseLightweightCharacter {
|
|
|
535
535
|
"Character.UpdateSimpleProxyHealth",
|
|
536
536
|
this.pGetSimpleProxyHealth()
|
|
537
537
|
);
|
|
538
|
-
if (
|
|
538
|
+
if (
|
|
539
|
+
damageInfo.damage > 0 &&
|
|
540
|
+
!this.getHasPermission(
|
|
541
|
+
server,
|
|
542
|
+
damageInfo.entity,
|
|
543
|
+
ConstructionPermissionIds.DEMOLISH
|
|
544
|
+
)
|
|
545
|
+
) {
|
|
539
546
|
const timestamp = Date.now();
|
|
540
547
|
const parent = this.getParent(server);
|
|
541
548
|
if (parent) parent.lastDamagedTimestamp = timestamp;
|
|
@@ -153,7 +153,14 @@ export class ConstructionDoor extends DoorEntity {
|
|
|
153
153
|
ResourceTypes.CONDITION,
|
|
154
154
|
server._constructionDoors
|
|
155
155
|
);
|
|
156
|
-
if (
|
|
156
|
+
if (
|
|
157
|
+
damageInfo.damage > 0 &&
|
|
158
|
+
!this.getHasPermission(
|
|
159
|
+
server,
|
|
160
|
+
damageInfo.entity,
|
|
161
|
+
ConstructionPermissionIds.DEMOLISH
|
|
162
|
+
)
|
|
163
|
+
) {
|
|
157
164
|
const timestamp = Date.now();
|
|
158
165
|
const parentFoundation = this.getParentFoundation(server);
|
|
159
166
|
if (parentFoundation) parentFoundation.lastDamagedTimestamp = timestamp;
|
|
@@ -1039,7 +1039,14 @@ export class ConstructionParentEntity extends ConstructionChildEntity {
|
|
|
1039
1039
|
"Character.UpdateSimpleProxyHealth",
|
|
1040
1040
|
this.pGetSimpleProxyHealth()
|
|
1041
1041
|
);
|
|
1042
|
-
if (
|
|
1042
|
+
if (
|
|
1043
|
+
damageInfo.damage > 0 &&
|
|
1044
|
+
!this.getHasPermission(
|
|
1045
|
+
server,
|
|
1046
|
+
damageInfo.entity,
|
|
1047
|
+
ConstructionPermissionIds.DEMOLISH
|
|
1048
|
+
)
|
|
1049
|
+
) {
|
|
1043
1050
|
const timestamp = Date.now();
|
|
1044
1051
|
const parent = this.getParent(server);
|
|
1045
1052
|
if (parent) parent.lastDamagedTimestamp = timestamp;
|
|
@@ -2631,7 +2631,8 @@ export class ConstructionManager {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
|
|
2633
2633
|
entity.damage(server, {
|
|
2634
|
-
entity:
|
|
2634
|
+
entity: client.character.characterId,
|
|
2635
|
+
weapon: weaponItem.itemDefinitionId,
|
|
2635
2636
|
damage: entity.maxHealth / 3 + 10
|
|
2636
2637
|
});
|
|
2637
2638
|
server.damageItem(client.character, weaponItem, 50);
|
|
@@ -2981,7 +2981,8 @@ export class ZonePacketHandlers {
|
|
|
2981
2981
|
if (
|
|
2982
2982
|
client.character.characterId != foundation.ownerCharacterId &&
|
|
2983
2983
|
foundation.permissions[characterId]?.demolish &&
|
|
2984
|
-
characterId != client.character.characterId
|
|
2984
|
+
characterId != client.character.characterId &&
|
|
2985
|
+
!client.isDebugMode
|
|
2985
2986
|
) {
|
|
2986
2987
|
server.sendAlert(
|
|
2987
2988
|
client,
|