Revert "Fidality borking mobs in buildings unborked."

This reverts commit 2befa063ef.
This commit is contained in:
2023-03-30 10:34:15 -04:00
parent 5a0910eb5c
commit f5d5dce791
3 changed files with 21 additions and 25 deletions
+2 -1
View File
@@ -455,7 +455,8 @@ public class InfoCmd extends AbstractDevCmd {
output += newline;
output += "Speed : " + targetMob.getSpeed();
output += newline;
output += "Fidelity ID: " + targetMob.getFidalityID();
output += newline;
output += "EquipSet: " + targetMob.getEquipmentSetID();
output += newline;
+11 -1
View File
@@ -1130,7 +1130,7 @@ public class ClientMessagePump implements NetMsgHandler {
//Take equipment off mob
if (tar.getObjectType() == GameObjectType.Mob && itemRet != null){
Mob mobTarget = (Mob)tar;
if (mobTarget.getFidalityID() != 0){
if (item != null && item.getObjectType() == GameObjectType.MobLoot){
int fidelityEquipID = ((MobLoot)item).getFidelityEquipID();
@@ -1148,10 +1148,20 @@ public class ClientMessagePump implements NetMsgHandler {
}
}
}
}
}
}
}
}
else {
}
}
else if (targetType == GameObjectType.Corpse.ordinal()) {
corpse = Corpse.getCorpse(targetID);
+8 -23
View File
@@ -1257,32 +1257,17 @@ public class Mob extends AbstractIntelligenceAgent {
return this.parentZone;
}
public void setParentZone(Zone zone) {
if (this.parentZone == null){
zone.zoneMobSet.add(this);
this.parentZone = zone;
}
if (this.building != null) {
Vector3fImmutable localLoc = new Vector3fImmutable(this.statLat,this.statAlt,this.statLon);
Vector3fImmutable buildingWorldLoc = ZoneManager.convertLocalToWorld(this.building, localLoc);
this.setBindLoc(buildingWorldLoc);
this.setLoc(buildingWorldLoc);
this.stopMovement(buildingWorldLoc);
return;
}
Vector3fImmutable localLoc = new Vector3fImmutable(this.statLat + zone.absX, this.statAlt + zone.absY, this.statLon + zone.absZ);
Vector3fImmutable spawnRadiusLoc = Vector3fImmutable.getRandomPointInCircle(localLoc, this.spawnRadius);
this.setBindLoc(spawnRadiusLoc);
this.setLoc(spawnRadiusLoc);
this.stopMovement(spawnRadiusLoc);
if (this.parentZone == null) {
zone.zoneMobSet.add(this);
this.parentZone = zone;
}
this.bindLoc = Mob.GetSpawnRadiusLocation(this);
this.lastBindLoc = bindLoc;
this.setLoc(bindLoc);
this.stopMovement(bindLoc);
}
public int getParentZoneID() {