forked from MagicBane/Server
FatBoy-DOTC
3 months ago
3 changed files with 98 additions and 9 deletions
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2022
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
package engine.jobs; |
||||
|
||||
import engine.gameManager.PowersManager; |
||||
import engine.job.AbstractScheduleJob; |
||||
import engine.net.client.msg.PerformActionMsg; |
||||
import engine.objects.AbstractWorldObject; |
||||
import engine.objects.PlayerCharacter; |
||||
import engine.powers.PowersBase; |
||||
import engine.wpak.WpakPowerManager; |
||||
import engine.wpak.data.Power; |
||||
|
||||
public class WpakUsePowerJob extends AbstractScheduleJob { |
||||
|
||||
private final PlayerCharacter pc; |
||||
private final PerformActionMsg msg; |
||||
private AbstractWorldObject target; |
||||
|
||||
public WpakUsePowerJob(PlayerCharacter pc, PerformActionMsg msg, AbstractWorldObject tar) { |
||||
super(); |
||||
this.pc = pc; |
||||
this.msg = msg; |
||||
this.target = tar; |
||||
} |
||||
|
||||
@Override |
||||
protected void doJob() { |
||||
WpakPowerManager.finishUsePower(this.msg, this.pc,this.target); |
||||
} |
||||
|
||||
@Override |
||||
protected void _cancelJob() { |
||||
//cast stopped early, reset recycle timer
|
||||
PowersManager.finishRecycleTime(this.msg, this.pc, true); |
||||
} |
||||
} |
Loading…
Reference in new issue