Browse Source

swap active character with NPC

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
42dd2b4e68
  1. 19
      src/engine/net/client/msg/VendorDialogMsg.java

19
src/engine/net/client/msg/VendorDialogMsg.java

@ -9,13 +9,11 @@
package engine.net.client.msg; package engine.net.client.msg;
import engine.Enum;
import engine.Enum.DispatchChannel; import engine.Enum.DispatchChannel;
import engine.Enum.GuildHistoryType; import engine.Enum.GuildHistoryType;
import engine.exception.MsgSendException; import engine.exception.MsgSendException;
import engine.gameManager.BuildingManager; import engine.gameManager.*;
import engine.gameManager.DbManager;
import engine.gameManager.GuildManager;
import engine.gameManager.SessionManager;
import engine.math.Vector3fImmutable; import engine.math.Vector3fImmutable;
import engine.net.*; import engine.net.*;
import engine.net.client.ClientConnection; import engine.net.client.ClientConnection;
@ -137,6 +135,19 @@ public class VendorDialogMsg extends ClientNetMsg {
msg.updateMessage(3, vd); msg.updateMessage(3, vd);
} }
if(contract.getObjectUUID() == 1502040){
ChatManager.chatSystemInfo(playerCharacter, "Promoting To Active Duty");
ArrayList<PlayerCharacter> currentBoxes = new ArrayList<>();
for(PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()){
if(pc.getClientConnection().machineID.equals(playerCharacter.getClientConnection().machineID) && pc.equals(playerCharacter) == false)
currentBoxes.add(pc);
}
playerCharacter.isBoxed = false;
playerCharacter.clearEffects();
playerCharacter.removeEffectBySource(Enum.EffectSourceType.DeathShroud,50,true);
for(PlayerCharacter box : currentBoxes)
box.isBoxed = true;
}
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);

Loading…
Cancel
Save