fix bug which made several spell leds broken on page 1
This commit is contained in:
@@ -2070,9 +2070,7 @@ eSpell pick_spell(short pc_num,eSkill type) { // 70 - no spell OW spell num
|
|||||||
cLed& led = dynamic_cast<cLed&>(castSpell[id]);
|
cLed& led = dynamic_cast<cLed&>(castSpell[id]);
|
||||||
led.attachKey(key);
|
led.attachKey(key);
|
||||||
castSpell.addLabelFor(id, {static_cast<char>(i > 25 ? toupper(key.c) : key.c)}, LABEL_LEFT, 8, true);
|
castSpell.addLabelFor(id, {static_cast<char>(i > 25 ? toupper(key.c) : key.c)}, LABEL_LEFT, 8, true);
|
||||||
if(spell_index[i] == 90){
|
// All LEDs should get the click handler and set state, because page 2 will hide them if necessary
|
||||||
continue;
|
|
||||||
}
|
|
||||||
led.setState((pc_can_cast_spell(univ.party[pc_casting],cSpell::fromNum(type,on_which_spell_page == 0 ? i : spell_index[i])))
|
led.setState((pc_can_cast_spell(univ.party[pc_casting],cSpell::fromNum(type,on_which_spell_page == 0 ? i : spell_index[i])))
|
||||||
? led_red : led_green);
|
? led_red : led_green);
|
||||||
led.attachClickHandler(std::bind(pick_spell_select_led, _1, _2, _3, type, std::ref(dark), std::ref(former_spell)));
|
led.attachClickHandler(std::bind(pick_spell_select_led, _1, _2, _3, type, std::ref(dark), std::ref(former_spell)));
|
||||||
|
Reference in New Issue
Block a user