Fix dead people could be revived with a party hp potion
This commit is contained in:
@@ -1871,25 +1871,25 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean applyConsumeOnPickup(final int itemid) {
|
||||
if (itemid / 1000000 == 2) {
|
||||
if (ii.isConsumeOnPickup(itemid)) {
|
||||
if (ItemConstants.isPartyItem(itemid)) {
|
||||
List<Character> pchr = this.getPartyMembersOnSameMap();
|
||||
|
||||
if (!ItemId.isPartyAllCure(itemid)) {
|
||||
StatEffect mse = ii.getItemEffect(itemid);
|
||||
|
||||
if (!pchr.isEmpty()) {
|
||||
for (Character mc : pchr) {
|
||||
mse.applyTo(mc);
|
||||
public boolean applyConsumeOnPickup(final int itemId) {
|
||||
if (itemId / 1000000 == 2) {
|
||||
if (ii.isConsumeOnPickup(itemId)) {
|
||||
if (ItemConstants.isPartyItem(itemId)) {
|
||||
List<Character> partyMembers = this.getPartyMembersOnSameMap();
|
||||
if (!ItemId.isPartyAllCure(itemId)) {
|
||||
StatEffect mse = ii.getItemEffect(itemId);
|
||||
if (!partyMembers.isEmpty()) {
|
||||
for (Character mc : partyMembers) {
|
||||
if (mc.isAlive()) {
|
||||
mse.applyTo(mc);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (this.isAlive()) {
|
||||
mse.applyTo(this);
|
||||
}
|
||||
} else {
|
||||
if (!pchr.isEmpty()) {
|
||||
for (Character mc : pchr) {
|
||||
if (!partyMembers.isEmpty()) {
|
||||
for (Character mc : partyMembers) {
|
||||
mc.dispelDebuffs();
|
||||
}
|
||||
} else {
|
||||
@@ -1897,11 +1897,11 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ii.getItemEffect(itemid).applyTo(this);
|
||||
ii.getItemEffect(itemId).applyTo(this);
|
||||
}
|
||||
|
||||
if (itemid / 10000 == 238) {
|
||||
this.getMonsterBook().addCard(client, itemid);
|
||||
if (itemId / 10000 == 238) {
|
||||
this.getMonsterBook().addCard(client, itemId);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user