game: try to update the healing shop's items when the pc switches...
This commit is contained in:
@@ -732,6 +732,7 @@ static void handle_switch_pc(short which_pc, bool& need_redraw, bool& need_repri
|
|||||||
univ.cur_pc = which_pc;
|
univ.cur_pc = which_pc;
|
||||||
set_stat_window_for_pc(which_pc);
|
set_stat_window_for_pc(which_pc);
|
||||||
add_string_to_buf("Now " + std::string(overall_mode == MODE_SHOPPING ? "shopping" : "active") + ": " + pc.name);
|
add_string_to_buf("Now " + std::string(overall_mode == MODE_SHOPPING ? "shopping" : "active") + ": " + pc.name);
|
||||||
|
if (overall_mode==MODE_SHOPPING) set_up_shop_array(); // needed to be sure healing is updated
|
||||||
adjust_spell_menus();
|
adjust_spell_menus();
|
||||||
need_redraw = true;
|
need_redraw = true;
|
||||||
}
|
}
|
||||||
|
@@ -302,7 +302,7 @@ int cCreature::magic_adjust(int how_much) {
|
|||||||
if(how_much <= 0) return how_much;
|
if(how_much <= 0) return how_much;
|
||||||
if(abil[eMonstAbil::ABSORB_SPELLS].active && get_ran(1,1,1000) <= abil[eMonstAbil::ABSORB_SPELLS].special.extra1) {
|
if(abil[eMonstAbil::ABSORB_SPELLS].active && get_ran(1,1,1000) <= abil[eMonstAbil::ABSORB_SPELLS].special.extra1) {
|
||||||
int gain = abil[eMonstAbil::ABSORB_SPELLS].special.extra2;
|
int gain = abil[eMonstAbil::ABSORB_SPELLS].special.extra2;
|
||||||
if(32767 - health > gain)
|
if(32767 - int(health) > gain)
|
||||||
health = 32767;
|
health = 32767;
|
||||||
else health += gain;
|
else health += gain;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user