log.fine("Read from Server "+this.getClass().getSimpleName());
int whoAttacked = readD();
log.finer("AUTOATTACK STARTED by+"+whoAttacked);
//face at target
EntityManager em = Singleton.get().getEntityManager();
PositioningComponent pcpos = (PositioningComponent) em.getComponent(whoAttacked, PositioningComponent.class);
TargetComponent tc = (TargetComponent) em.getComponent(whoAttacked, TargetComponent.class);
PositioningComponent npcpos = null;
if(tc!=null && tc.hasTarget()) {
log.finer("AUTOATTACK STARTED by+"+whoAttacked+" target comp :"+tc.getCurrentTarget());
npcpos = (PositioningComponent) em.getComponent(tc.getCurrentTarget(), PositioningComponent.class);
if(pcpos != null && npcpos != null){