|
@@ -44,6 +44,8 @@ public class L2SkillSummon extends L2Skill
|
|
private final int _activationtime;
|
|
private final int _activationtime;
|
|
// Activation chance for a cubic.
|
|
// Activation chance for a cubic.
|
|
private final int _activationchance;
|
|
private final int _activationchance;
|
|
|
|
+ // Maximum casts made by the cubic until it goes idle.
|
|
|
|
+ private final int _maxcount;
|
|
|
|
|
|
// What is the total lifetime of summons (in millisecs)
|
|
// What is the total lifetime of summons (in millisecs)
|
|
private final int _summonTotalLifeTime;
|
|
private final int _summonTotalLifeTime;
|
|
@@ -71,6 +73,7 @@ public class L2SkillSummon extends L2Skill
|
|
|
|
|
|
_activationtime= set.getInteger("activationtime", 8);
|
|
_activationtime= set.getInteger("activationtime", 8);
|
|
_activationchance= set.getInteger("activationchance", 30);
|
|
_activationchance= set.getInteger("activationchance", 30);
|
|
|
|
+ _maxcount= set.getInteger("maxcount", -1);
|
|
|
|
|
|
_summonTotalLifeTime= set.getInteger("summonTotalLifeTime", 1200000); // 20 minutes default
|
|
_summonTotalLifeTime= set.getInteger("summonTotalLifeTime", 1200000); // 20 minutes default
|
|
_summonTimeLostIdle= set.getInteger("summonTimeLostIdle", 0);
|
|
_summonTimeLostIdle= set.getInteger("summonTimeLostIdle", 0);
|
|
@@ -175,9 +178,9 @@ public class L2SkillSummon extends L2Skill
|
|
}
|
|
}
|
|
if (player.getCubics().size() > mastery) continue;
|
|
if (player.getCubics().size() > mastery) continue;
|
|
if (player == activeChar)
|
|
if (player == activeChar)
|
|
- player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _summonTotalLifeTime, false);
|
|
|
|
|
|
+ player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _maxcount, _summonTotalLifeTime, false);
|
|
else // given by other player
|
|
else // given by other player
|
|
- player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _summonTotalLifeTime, true);
|
|
|
|
|
|
+ player.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _maxcount, _summonTotalLifeTime, true);
|
|
player.broadcastUserInfo();
|
|
player.broadcastUserInfo();
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
@@ -200,7 +203,7 @@ public class L2SkillSummon extends L2Skill
|
|
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CUBIC_SUMMONING_FAILED));
|
|
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CUBIC_SUMMONING_FAILED));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- activeChar.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _summonTotalLifeTime, false);
|
|
|
|
|
|
+ activeChar.addCubic(_npcId, _cubicSkillLevel, getPower(), _activationtime, _activationchance, _maxcount, _summonTotalLifeTime, false);
|
|
activeChar.broadcastUserInfo();
|
|
activeChar.broadcastUserInfo();
|
|
return;
|
|
return;
|
|
}
|
|
}
|