Fixed potential exploit with respecing

This commit is contained in:
Ziggeh
2014-09-06 11:01:44 +02:00
parent 75f227108a
commit 09a64b615b
+5 -1
View File
@@ -323,8 +323,12 @@ public class SkillService implements INetworkDispatch {
SetProfessionTemplate profTemplate = new SetProfessionTemplate();
profTemplate.deserialize(buffer);
CreatureObject creature = (CreatureObject) core.objectService.getObject(profTemplate.getCharacterId());
core.playerService.respec((CreatureObject) core.objectService.getObject(profTemplate.getCharacterId()), profTemplate.getProfession());
if (!creature.getClient().getSession().equals(session))
return;
core.playerService.respec(creature, profTemplate.getProfession());
});