Optimized equip levelup method + Ultra three snails feature

Fixed performance drop on the server when trying to level up equipments
which has high stats points. Added a flag enabling massive damages with
Three Snails skill.
This commit is contained in:
ronancpl
2017-06-02 18:52:39 -03:00
parent fee0aa7e39
commit 02cc9efb00
27 changed files with 213 additions and 149 deletions

View File

@@ -648,7 +648,7 @@ public class EventInstanceManager {
}
private void dropExclusiveItems(MapleCharacter chr) {
AbstractPlayerInteraction api = new AbstractPlayerInteraction(chr.getClient());
AbstractPlayerInteraction api = chr.getClient().getAbstractPlayerInteraction();
for(Integer item: exclusiveItems) {
api.removeAll(item);
@@ -749,7 +749,7 @@ public class EventInstanceManager {
if(!hasRewardSlot(player, eventLevel)) return false;
AbstractPlayerInteraction api = new AbstractPlayerInteraction(player.getClient());
AbstractPlayerInteraction api = player.getClient().getAbstractPlayerInteraction();
int rnd = (int)Math.floor(Math.random() * rewardsSet.size());
api.gainItem(rewardsSet.get(rnd), rewardsQty.get(rnd).shortValue());