Implemented Kites, PlayerNPCs and C. Shop Surprise & Tweaked login
Added code support for Kites. Reviewed concurrent access issues with pet autopot. Addressed PlayerStorage issue where characters would not be properly deregistered from channel PlayerStorage in certain situations. Implemented harp quest (questid 3314) because of reasons. Added SFX to signalize KC/NLC subway departing/approaching. Changed traveling time values to work similarly to GMS. Properly developed the PlayerNPC feature in the source. Added autodeployable PlayerNPC system and Hall of Fame. Solved a glitch with NLC mayor's quiz questline that would allow a player to restart the quiz as many times one would see fit. Added a custom server flag that allows overwriting the ToT 999 mobs to a new value (technically it doesn't overwrite, rather sets the player at quest start with 999 - n credited mobs). Fixed permanent pets expiring after a while. Added code support for Cash Shop Surprise item. Reviewed login handler system as a whole, protecting many exposed flaws. Solved a bug with ULTRA_THREE_SNAILS sometimes taking wrong etc shell from inventory.
This commit is contained in:
@@ -445,29 +445,37 @@ public abstract class AbstractDealDamageHandler extends AbstractMaplePacketHandl
|
||||
AutobanFactory.FIX_DAMAGE.autoban(player, String.valueOf(totDamageToOneMonster) + " damage");
|
||||
}
|
||||
|
||||
if(ServerConstants.USE_ULTRA_THREE_SNAILS) {
|
||||
AbstractPlayerInteraction api = player.getClient().getAbstractPlayerInteraction();
|
||||
|
||||
int shellId;
|
||||
switch(totDamageToOneMonster) {
|
||||
case 10:
|
||||
shellId = 4000019;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
shellId = 4000000;
|
||||
break;
|
||||
|
||||
default:
|
||||
shellId = 4000016;
|
||||
}
|
||||
|
||||
if(api.haveItem(shellId, 1)) {
|
||||
api.gainItem(shellId, (short)-1, false);
|
||||
totDamageToOneMonster *= player.getLevel();
|
||||
}
|
||||
else {
|
||||
player.dropMessage(5, "You ran out of shells to activate the hidden power of Three Snails.");
|
||||
int threeSnailsId = player.getJobType() * 10000000 + 1000;
|
||||
if(attack.skill == threeSnailsId) {
|
||||
if(ServerConstants.USE_ULTRA_THREE_SNAILS) {
|
||||
int skillLv = player.getSkillLevel(threeSnailsId);
|
||||
|
||||
if(skillLv > 0) {
|
||||
AbstractPlayerInteraction api = player.getClient().getAbstractPlayerInteraction();
|
||||
|
||||
int shellId;
|
||||
switch(skillLv) {
|
||||
case 1:
|
||||
shellId = 4000019;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
shellId = 4000000;
|
||||
break;
|
||||
|
||||
default:
|
||||
shellId = 4000016;
|
||||
}
|
||||
|
||||
if(api.haveItem(shellId, 1)) {
|
||||
api.gainItem(shellId, (short) -1, false);
|
||||
totDamageToOneMonster *= player.getLevel();
|
||||
} else {
|
||||
player.dropMessage(5, "You have ran out of shells to activate the hidden power of Three Snails.");
|
||||
}
|
||||
} else {
|
||||
totDamageToOneMonster = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user