forked from MagicBane/Server
null check for target
This commit is contained in:
@@ -63,6 +63,10 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler {
|
|||||||
return true; //cannot attack other things
|
return true; //cannot attack other things
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(target == null) {
|
||||||
|
playerCharacter.setCombatTarget(target);
|
||||||
|
return true; // cannot attack a null target
|
||||||
|
}
|
||||||
//set sources target
|
//set sources target
|
||||||
|
|
||||||
playerCharacter.setCombatTarget(target);
|
playerCharacter.setCombatTarget(target);
|
||||||
|
|||||||
Reference in New Issue
Block a user