Cash Pet Food issue + BRPQ minor patch

As issued by vcoc, some pet items not working properly has been patches.
New BRPQ reward announcer NPC. More minor patches.
This commit is contained in:
ronancpl
2017-05-01 13:46:48 -03:00
parent 1d8caff63f
commit 03ab8be97d
36 changed files with 475 additions and 289 deletions

View File

@@ -21,11 +21,6 @@
*/
package scripting;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.PreparedStatement;
import tools.DatabaseConnection;
import java.awt.Point;
import java.util.Arrays;
import java.util.Collections;

View File

@@ -519,6 +519,10 @@ public class EventInstanceManager {
return intList;
}
public final void setEventRewards(List<Double> rwds, List<Double> qtys, int expGiven) {
setEventRewards(1, rwds, qtys, expGiven);
}
public final void setEventRewards(List<Double> rwds, List<Double> qtys) {
setEventRewards(1, rwds, qtys);
}

View File

@@ -280,19 +280,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
public void gainCloseness(int closeness) {
for (MaplePet pet : getPlayer().getPets()) {
if (pet.getCloseness() > 30000) {
pet.setCloseness(30000);
return;
}
pet.gainCloseness(closeness);
while (pet.getCloseness() > ExpTable.getClosenessNeededForLevel(pet.getLevel())) {
pet.setLevel((byte) (pet.getLevel() + 1));
byte index = getPlayer().getPetIndex(pet);
getClient().announce(MaplePacketCreator.showOwnPetLevelUp(index));
getPlayer().getMap().broadcastMessage(getPlayer(), MaplePacketCreator.showPetLevelUp(getPlayer(), index));
}
Item petz = getPlayer().getInventory(MapleInventoryType.CASH).getItem(pet.getPosition());
getPlayer().forceUpdateItem(petz);
pet.gainClosenessFullness(getPlayer(), closeness, 0, 0);
}
}