forked from MagicBane/Server
Refactor to separate persistence and write fsm to table.
This commit is contained in:
@@ -530,41 +530,59 @@ public enum BuildingManager {
|
||||
else
|
||||
rank = 10;
|
||||
|
||||
Mob mob;
|
||||
Mob mobile;
|
||||
NPC npc;
|
||||
|
||||
if (NPC.ISWallArcher(contract)) {
|
||||
|
||||
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
|
||||
if (mob == null)
|
||||
if (mobile == null)
|
||||
return false;
|
||||
|
||||
mob.setLoc(mob.getLoc());
|
||||
// Configure AI.
|
||||
|
||||
mobile.behaviourType = Enum.MobBehaviourType.GuardWallArcher;
|
||||
|
||||
DbManager.MobQueries.PERSIST(mobile);
|
||||
|
||||
mobile.setLoc(mobile.getLoc());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (NPC.ISGuardCaptain(contract.getContractID())) {
|
||||
|
||||
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
|
||||
if (mob == null)
|
||||
if (mobile == null)
|
||||
return false;
|
||||
|
||||
mob.setLoc(mob.getLoc());
|
||||
// Configure AI.
|
||||
|
||||
mobile.behaviourType = Enum.MobBehaviourType.GuardCaptain;
|
||||
|
||||
DbManager.MobQueries.PERSIST(mobile);
|
||||
|
||||
mobile.setLoc(mobile.getLoc());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (contract.getContractID() == 910) {
|
||||
|
||||
//guard dog
|
||||
mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
mobile = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), zone, building, contract, pirateName, rank);
|
||||
|
||||
if (mob == null)
|
||||
if (mobile == null)
|
||||
return false;
|
||||
|
||||
mob.setLoc(mob.getLoc());
|
||||
// Configure AI.
|
||||
|
||||
mobile.behaviourType = Enum.MobBehaviourType.GuardCaptain;
|
||||
|
||||
DbManager.MobQueries.PERSIST(mobile);
|
||||
mobile.setLoc(mobile.getLoc());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user