Temporarily Fixes #442: Position secured cant be removed

The problem related to doSelfBuff always calling and thinking that the
position secured buff wanted to be added all the time, which isn't the
case. Right now I added a hasBuff check to doSelfBuff for the position
secured buff which will remove the buff. I didn't want to flat out just
remove a buff no matter what command was called because that would
affect any buffs that wanted to be refreshed and not removed.
This commit is contained in:
Waverunner
2014-04-16 18:51:32 -04:00
parent 2127ff1f6f
commit da20b779cf
3 changed files with 13 additions and 15 deletions
+4 -1
View File
@@ -1242,7 +1242,10 @@ public class CombatService implements INetworkDispatch {
return;
}
core.buffService.addBuffToCreature(creature, command.getBuffNameSelf());
if (creature.hasBuff("co_position_secured"))
core.buffService.removeBuffFromCreatureByName(creature, "co_position_secured");
else
core.buffService.addBuffToCreature(creature, command.getBuffNameSelf(), creature);
StartTask startTask = new StartTask(actionCounter, creature.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown());
ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask);