player.unsummonAllCubics();
}
// TODO: Should remove first cubic summoned and replace with new cubic
if (player.getCubics().containsKey(_npcId))
{
L2CubicInstance cubic = player.getCubic(_npcId);
cubic.stopAction();
cubic.cancelDisappear();
player.delCubic(_npcId);
}
if (player.getCubics().size() > mastery) continue;
if (player == activeChar)
player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _summonTotalLifeTime, false);
else // given by other player
player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _summonTotalLifeTime, true);
player.broadcastUserInfo();
}
return;
}
int mastery = activeChar.getSkillLevel(SKILL_CUBIC_MASTERY);
if (mastery < 0)
mastery = 0;
if (activeChar.getCubics().containsKey(_npcId))
{
L2CubicInstance cubic = activeChar.getCubic(_npcId);
cubic.stopAction();
cubic.cancelDisappear();
activeChar.delCubic(_npcId);
}
if (activeChar.getCubics().size() > mastery) {
if (Config.DEBUG)
_log.fine("player can't summon any more cubics. ignore summon skill");