You currently got issues with cursed weapons, when you add the item directly with admin command. The first weapon is fine, but second item on same player make the whole process buggy. Second weapon is eaten, but the weapon is still active according to the "cw_info" panel. I invite you to test what I say.

Here's the fix (no patch because I haven't the last Freya version, nor want to dev on it) :
On cursedWeapon model, replace reActivate() method for following :
Code: Select all
public void reActivate(boolean fromZero) { if (fromZero) { _isActivated = true; if (_endTime - System.currentTimeMillis() <= 0) endOfLife(); else _removeTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new RemoveTask(), _durationLost*12000L, _durationLost*12000L); } else _removeTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new RemoveTask(), _durationLost*12000L, _durationLost*12000L); }
- for the adminhandler (datapack) : replace for cw.reActivate(false);
- for the CursedWeaponsManager restore() method, replace for cw.reActivate(true);
----------------
Another "issue" is this dead code on checkPlayer() method, CursedWeaponManager (you got twice this message, here and in enterworld) :
Code: Select all
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_MINUTE_OF_USAGE_TIME_ARE_LEFT_FOR_S1); sm.addString(cw.getName()); //sm.addItemName(cw.getItemId()); sm.addNumber((int) ((cw.getEndTime() - System.currentTimeMillis()) / 60000)); player.sendPacket(sm);
Code: Select all
public void onPlayerEnter() { if (isCursedWeaponEquipped()) CursedWeaponsManager.getInstance().getCursedWeapon(getCursedWeaponEquippedId()).cursedOnLogin(); startWarnUserTakeBreak();