Browse Source

force to stand when casting

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
d507ba2339
  1. 2
      src/engine/gameManager/CombatManager.java
  2. 6
      src/engine/gameManager/PowersManager.java

2
src/engine/gameManager/CombatManager.java

@ -1242,7 +1242,7 @@ public enum CombatManager {
DispatchMessage.dispatchMsgToInterestArea(pc, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); DispatchMessage.dispatchMsgToInterestArea(pc, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
} }
private static void toggleSit(boolean toggle, ClientConnection origin) { public static void toggleSit(boolean toggle, ClientConnection origin) {
PlayerCharacter pc = SessionManager.getPlayerCharacter(origin); PlayerCharacter pc = SessionManager.getPlayerCharacter(origin);

6
src/engine/gameManager/PowersManager.java

@ -163,6 +163,9 @@ public enum PowersManager {
public static void usePower(final PerformActionMsg msg, ClientConnection origin, public static void usePower(final PerformActionMsg msg, ClientConnection origin,
boolean sendCastToSelf) { boolean sendCastToSelf) {
PlayerCharacter pc = SessionManager.getPlayerCharacter(origin);
CombatManager.toggleSit(false,origin);
if (usePowerA(msg, origin, sendCastToSelf)) { if (usePowerA(msg, origin, sendCastToSelf)) {
// Cast failed for some reason, reset timer // Cast failed for some reason, reset timer
@ -171,9 +174,6 @@ public enum PowersManager {
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
// Send Fail to cast message // Send Fail to cast message
PlayerCharacter pc = SessionManager
.getPlayerCharacter(origin);
if (pc != null) { if (pc != null) {
sendPowerMsg(pc, 2, msg); sendPowerMsg(pc, 2, msg);
if (pc.isCasting()) { if (pc.isCasting()) {

Loading…
Cancel
Save