Merge pull request #130 from v3921358/master
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) {
|
public boolean applyConsumeOnPickup(final int itemId) {
|
||||||
if (itemid / 1000000 == 2) {
|
if (itemId / 1000000 == 2) {
|
||||||
if (ii.isConsumeOnPickup(itemid)) {
|
if (ii.isConsumeOnPickup(itemId)) {
|
||||||
if (ItemConstants.isPartyItem(itemid)) {
|
if (ItemConstants.isPartyItem(itemId)) {
|
||||||
List<Character> pchr = this.getPartyMembersOnSameMap();
|
List<Character> partyMembers = this.getPartyMembersOnSameMap();
|
||||||
|
if (!ItemId.isPartyAllCure(itemId)) {
|
||||||
if (!ItemId.isPartyAllCure(itemid)) {
|
StatEffect mse = ii.getItemEffect(itemId);
|
||||||
StatEffect mse = ii.getItemEffect(itemid);
|
if (!partyMembers.isEmpty()) {
|
||||||
|
for (Character mc : partyMembers) {
|
||||||
if (!pchr.isEmpty()) {
|
if (mc.isAlive()) {
|
||||||
for (Character mc : pchr) {
|
mse.applyTo(mc);
|
||||||
mse.applyTo(mc);
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if (this.isAlive()) {
|
||||||
mse.applyTo(this);
|
mse.applyTo(this);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!pchr.isEmpty()) {
|
if (!partyMembers.isEmpty()) {
|
||||||
for (Character mc : pchr) {
|
for (Character mc : partyMembers) {
|
||||||
mc.dispelDebuffs();
|
mc.dispelDebuffs();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1897,11 +1897,11 @@ public class Character extends AbstractCharacterObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ii.getItemEffect(itemid).applyTo(this);
|
ii.getItemEffect(itemId).applyTo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemid / 10000 == 238) {
|
if (itemId / 10000 == 238) {
|
||||||
this.getMonsterBook().addCard(client, itemid);
|
this.getMonsterBook().addCard(client, itemId);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user