random vorg timers

This commit is contained in:
2025-09-22 11:42:17 -05:00
parent d4d320264c
commit b6546b437b
+9
View File
@@ -41,6 +41,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
import static engine.math.FastMath.acos; import static engine.math.FastMath.acos;
@@ -1246,6 +1247,14 @@ public class Mob extends AbstractIntelligenceAgent {
if (attacker.getObjectType() == GameObjectType.PlayerCharacter) { if (attacker.getObjectType() == GameObjectType.PlayerCharacter) {
autoLoot((PlayerCharacter)attacker, this); autoLoot((PlayerCharacter)attacker, this);
} }
for(MobEquipment equip : this.equip.values()){
if(equip.getItemBase().getName().contains("vorg") || equip.getItemBase().getName().contains("crimson circle") || equip.getItemBase().getName().contains("bellugh")){
if(equip.getDropChance() > 0){
this.spawnTime = ThreadLocalRandom.current().nextInt(600,2700);
}
}
}
} }
public static void autoLoot(PlayerCharacter pc, Mob mob){ public static void autoLoot(PlayerCharacter pc, Mob mob){