Heal GMS + Improved chnl workers & Pshop tooltip + Equips on party HP
Slightly improved channel and disease announce workers performance. Completion of repeatable quests no longer generates fame to players. Equipment drop rates of Leprechaun were slightly decreased. Fixed Pet Item Ignore not checking certain exploit cases correctly. Optimized Pet Item Ignore server handler performance. Fixed some exploits and improved performance on PetLootHandler. Improved concurrency protection on MapleInventoryManipulator. Heal skill effect on players now works GMS-intended, as description says. Also removed the delayed Heal cast effect to others. Fixed party player HPBar not accounting the player's HP stat gained on equips towards the effective MaxHP. The duration of mists generated by mobs has been rescaled to 10x longer than what has been displayed until now (wz duration property is supposed to actually be in 100ms). Optimized timer management for mob skill cooldown and elemental effectiveness. Implemented an additional inventory check system, to be used in cases where it's expected to remove a set group for items (with quantity) to then add a new group of items. Fixed Player Shop/Hired Merchant "vacancy" tooltip, now properly showing whether the store has a visitor room or is already full at that time. Fixed Player Shops only using the standard stand type. Fixed cash pet food ignoring certain pet itemids when reading data from WZ.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.inventory.Equip;
|
||||
@@ -35,7 +36,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.AbstractMaplePacketHandler;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import constants.ServerConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.data.input.SeekableLittleEndianAccessor;
|
||||
@@ -57,16 +57,18 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
if ((ws & 2) == 2) {
|
||||
whiteScroll = true;
|
||||
}
|
||||
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
Equip toScroll = (Equip) c.getPlayer().getInventory(MapleInventoryType.EQUIPPED).getItem(dst);
|
||||
MapleCharacter chr = c.getPlayer();
|
||||
Equip toScroll = (Equip) chr.getInventory(MapleInventoryType.EQUIPPED).getItem(dst);
|
||||
Skill LegendarySpirit = SkillFactory.getSkill(1003);
|
||||
if (c.getPlayer().getSkillLevel(LegendarySpirit) > 0 && dst >= 0) {
|
||||
if (chr.getSkillLevel(LegendarySpirit) > 0 && dst >= 0) {
|
||||
legendarySpirit = true;
|
||||
toScroll = (Equip) c.getPlayer().getInventory(MapleInventoryType.EQUIP).getItem(dst);
|
||||
toScroll = (Equip) chr.getInventory(MapleInventoryType.EQUIP).getItem(dst);
|
||||
}
|
||||
byte oldLevel = toScroll.getLevel();
|
||||
byte oldSlots = toScroll.getUpgradeSlots();
|
||||
MapleInventory useInventory = c.getPlayer().getInventory(MapleInventoryType.USE);
|
||||
MapleInventory useInventory = chr.getInventory(MapleInventoryType.USE);
|
||||
Item scroll = useInventory.getItem(slot);
|
||||
Item wscroll = null;
|
||||
|
||||
@@ -81,7 +83,7 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
}
|
||||
if (whiteScroll) {
|
||||
wscroll = useInventory.findById(2340000);
|
||||
if (wscroll == null || wscroll.getItemId() != 2340000) {
|
||||
if (wscroll == null) {
|
||||
whiteScroll = false;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +98,7 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
Equip scrolled = (Equip) ii.scrollEquipWithId(toScroll, scroll.getItemId(), whiteScroll, 0, c.getPlayer().isGM());
|
||||
Equip scrolled = (Equip) ii.scrollEquipWithId(toScroll, scroll.getItemId(), whiteScroll, 0, chr.isGM());
|
||||
ScrollResult scrollSuccess = Equip.ScrollResult.FAIL; // fail
|
||||
if (scrolled == null) {
|
||||
scrollSuccess = Equip.ScrollResult.CURSE;
|
||||
@@ -112,9 +114,17 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
if(!ItemConstants.isWeddingRing(toScroll.getItemId())) {
|
||||
mods.add(new ModifyInventory(3, toScroll));
|
||||
if (dst < 0) {
|
||||
c.getPlayer().getInventory(MapleInventoryType.EQUIPPED).removeItem(toScroll.getPosition());
|
||||
MapleInventory inv = chr.getInventory(MapleInventoryType.EQUIPPED);
|
||||
|
||||
inv.lockInventory();
|
||||
try {
|
||||
chr.unequippedItem(toScroll);
|
||||
inv.removeItem(toScroll.getPosition());
|
||||
} finally {
|
||||
inv.unlockInventory();
|
||||
}
|
||||
} else {
|
||||
c.getPlayer().getInventory(MapleInventoryType.EQUIP).removeItem(toScroll.getPosition());
|
||||
chr.getInventory(MapleInventoryType.EQUIP).removeItem(toScroll.getPosition());
|
||||
}
|
||||
} else {
|
||||
scrolled = toScroll;
|
||||
@@ -128,13 +138,13 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
mods.add(new ModifyInventory(0, scrolled));
|
||||
}
|
||||
c.announce(MaplePacketCreator.modifyInventory(true, mods));
|
||||
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getScrollEffect(c.getPlayer().getId(), scrollSuccess, legendarySpirit));
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.getScrollEffect(chr.getId(), scrollSuccess, legendarySpirit));
|
||||
if (dst < 0 && (scrollSuccess == Equip.ScrollResult.SUCCESS || scrollSuccess == Equip.ScrollResult.CURSE)) {
|
||||
c.getPlayer().equipChanged();
|
||||
chr.equipChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canScroll(int scrollid, int itemid) {
|
||||
private static boolean canScroll(int scrollid, int itemid) {
|
||||
int sid = scrollid / 100;
|
||||
|
||||
switch(sid) {
|
||||
|
||||
Reference in New Issue
Block a user