Browse Source

Contract handling cleanup.

mobile-class-refactor
MagicBot 1 year ago
parent
commit
52486fa278
  1. 4
      src/engine/devcmd/cmds/AddMobCmd.java
  2. 2
      src/engine/devcmd/cmds/SplatMobCmd.java
  3. 6
      src/engine/gameManager/BuildingManager.java
  4. 5
      src/engine/objects/Mob.java

4
src/engine/devcmd/cmds/AddMobCmd.java

@ -43,7 +43,7 @@ public class AddMobCmd extends AbstractDevCmd { @@ -43,7 +43,7 @@ public class AddMobCmd extends AbstractDevCmd {
MobBase mb = (MobBase) mobbaseAGO;
int loadID = mb.getObjectUUID();
Mob mob = Mob.createMob(loadID, Vector3fImmutable.getRandomPointInCircle(pc.getLoc(), 100),
null, true, zone, null, 0, "", 1);
null, zone, null, null, "", 1);
if (mob != null) {
mob.updateDatabase();
this.setResult(String.valueOf(mob.getDBID()));
@ -84,7 +84,7 @@ public class AddMobCmd extends AbstractDevCmd { @@ -84,7 +84,7 @@ public class AddMobCmd extends AbstractDevCmd {
Mob mob = Mob.createMob(loadID, pc.getLoc(),
null, true, zone, null, 0, "", 1);
null, zone, null, null, "", 1);
if (mob != null) {
mob.updateDatabase();
ChatManager.chatSayInfo(pc,

2
src/engine/devcmd/cmds/SplatMobCmd.java

@ -110,7 +110,7 @@ public class SplatMobCmd extends AbstractDevCmd { @@ -110,7 +110,7 @@ public class SplatMobCmd extends AbstractDevCmd {
mobile = Mob.createMob(_mobileUUID,
Vector3fImmutable.getRandomPointInCircle(_currentLocation, _targetRange),
null, true, serverZone, null, 0, "", 1);
null, serverZone, null, null, "", 1);
if (mobile != null) {
mobile.updateDatabase();

6
src/engine/gameManager/BuildingManager.java

@ -535,7 +535,7 @@ public enum BuildingManager { @@ -535,7 +535,7 @@ public enum BuildingManager {
if (NPC.ISWallArcher(contract)) {
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), true, zone, building, contract.getContractID(), pirateName, rank);
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
if (mob == null)
return false;
@ -547,7 +547,7 @@ public enum BuildingManager { @@ -547,7 +547,7 @@ public enum BuildingManager {
if (NPC.ISGuardCaptain(contract.getContractID())) {
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), true, zone, building, contract.getContractID(), pirateName, rank);
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
if (mob == null)
return false;
@ -559,7 +559,7 @@ public enum BuildingManager { @@ -559,7 +559,7 @@ public enum BuildingManager {
if (contract.getContractID() == 910) {
//guard dog
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), true, zone, building, contract.getContractID(), pirateName, rank);
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
if (mob == null)
return false;

5
src/engine/objects/Mob.java

@ -467,7 +467,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -467,7 +467,7 @@ public class Mob extends AbstractIntelligenceAgent {
writer.putInt(mob.currentID);
}
public static Mob createMob(int loadID, Vector3fImmutable spawn, Guild guild, boolean isMob, Zone parent, Building building, int contractID, String pirateName, int level) {
public static Mob createMob(int loadID, Vector3fImmutable spawn, Guild guild, Zone parent, Building building, Contract contract, String pirateName, int level) {
Mob mobile = new Mob();
mobile.dbID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET;
@ -489,8 +489,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -489,8 +489,7 @@ public class Mob extends AbstractIntelligenceAgent {
mobile.firstName = pirateName;
mobile.contractUUID = contractID;
mobile.contractUUID = contract.getContractID();
Mob mob;

Loading…
Cancel
Save