Browse Source

death in safe zone no longer causes item damage

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
71288d0203
  1. 9
      src/engine/objects/CharacterItemManager.java

9
src/engine/objects/CharacterItemManager.java

@ -12,10 +12,7 @@ package engine.objects;
import engine.Enum; import engine.Enum;
import engine.Enum.GameObjectType; import engine.Enum.GameObjectType;
import engine.Enum.ItemType; import engine.Enum.ItemType;
import engine.gameManager.BuildingManager; import engine.gameManager.*;
import engine.gameManager.ChatManager;
import engine.gameManager.ConfigManager;
import engine.gameManager.DbManager;
import engine.math.Vector3fImmutable; import engine.math.Vector3fImmutable;
import engine.net.Dispatch; import engine.net.Dispatch;
import engine.net.DispatchMessage; import engine.net.DispatchMessage;
@ -2435,6 +2432,10 @@ public class CharacterItemManager {
if (item == null || amount < 1 || amount > 5) if (item == null || amount < 1 || amount > 5)
return; return;
//dont damage items when dieing in safezone
if(ZoneManager.findSmallestZone(this.absCharacter.getLoc()).getSafeZone() == 0)
return;
//verify the item is equipped by this player //verify the item is equipped by this player
int slot = item.getEquipSlot(); int slot = item.getEquipSlot();
if (!this.equipped.containsKey(slot)) if (!this.equipped.containsKey(slot))

Loading…
Cancel
Save