1
0
Fork 0

remove atrributes, rework item modifiers

This commit is contained in:
Sen 2025-06-15 20:21:08 +02:00
parent 339a7679f7
commit fcc5e9b640
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
62 changed files with 482 additions and 1588 deletions

View file

@ -1003,7 +1003,7 @@ public class Client implements IThreadListener {
int absorb = entity.getAbsorptionAmount();
int armor = entity.getTotalArmorValue();
int stats = 1 + (absorb > 0 ? 1 : 0) + (armor > 0 ? 1 : 0) + (entity.vehicle instanceof EntityLiving ? 1 : 0)
+ (entity instanceof EntityNPC && ((EntityNPC)entity).canUseMagic() ? 1 : 0);
+ (entity instanceof EntityNPC npc && npc.getManaPoints() > 0 ? 1 : 0);
for(Energy energy : Energy.values()) {
if(entity.getEnergy(energy) > 0)
stats += 1;
@ -1023,9 +1023,9 @@ public class Client implements IThreadListener {
int vhMax = living.getMaxHealth();
y = stats(x, y, living.getDisplayName() /* + " (Reittier)" */, vh, vhMax, 0xff6060);
}
if(entity instanceof EntityNPC && ((EntityNPC)entity).canUseMagic()) {
int mana = entity.getManaPoints();
int maxm = entity.getMaxMana();
if(entity instanceof EntityNPC npc && npc.getManaPoints() > 0) {
int mana = npc.getManaPoints();
int maxm = npc.getMaxMana();
y = stats(x, y, TextColor.CYAN + "Mana", mana, maxm, 0x0000ff);
}
for(int z = 0; z < Energy.values().length; z++) {