Fixed quest rewarding + Lethal attacks in Dojo

Fixed quests not giving items in some cases, lethal damages rendering
dojo uncompletable and added new scripts.
This commit is contained in:
ronancpl
2017-04-07 21:42:42 -03:00
parent f6935d3d3b
commit c8f905e1a5
23 changed files with 7503 additions and 6922 deletions

View File

@@ -63,7 +63,7 @@ import tools.Pair;
import tools.Randomizer;
public class MapleMonster extends AbstractLoadedMapleLife {
private ChangeableStats ostats = null; //unused, v83 WZs offers no support for changeable stats.
private MapleMonsterStats stats;
private int hp, mp;
private WeakReference<MapleCharacter> controller = new WeakReference<>(null);
@@ -957,4 +957,36 @@ public class MapleMonster extends AbstractLoadedMapleLife {
public Map<MonsterStatus, MonsterStatusEffect> getStati() {
return stati;
}
// ---- one can always have fun trying these pieces of codes below in-game rofl ----
public final ChangeableStats getChangedStats() {
return ostats;
}
public final int getMobMaxHp() {
if (ostats != null) {
return ostats.hp;
}
return stats.getHp();
}
public final void setOverrideStats(final OverrideMonsterStats ostats) {
this.ostats = new ChangeableStats(stats, ostats);
this.hp = ostats.getHp();
this.mp = ostats.getMp();
}
public final void changeLevel(final int newLevel) {
changeLevel(newLevel, true);
}
public final void changeLevel(final int newLevel, boolean pqMob) {
if (!stats.isChangeable()) {
return;
}
this.ostats = new ChangeableStats(stats, newLevel, pqMob);
this.hp = ostats.getHp();
this.mp = ostats.getMp();
}
}