Fix issue with AA cast mana consumption

AAs will now cast from slot "0xFF" instead of the itemslot
to avoid special behavior of items.

Mana reduction also moved down to the same place consumption takes
place like live.
This commit is contained in:
Michael Cook (mackal) committed 2015-06-27 18:39:13 -04:00
1 parent 337ce2d74b
commit 5a6685d129
3 files changed
+19 -15

No files matched your search

+3 -3
View File
@@ -1183,12 +1183,12 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
// Bards can cast instant cast AAs while they are casting another song
if(spells[rank->spell].cast_time == 0 && GetClass() == BARD && IsBardSong(casting_spell_id)) {
if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), 10, -1, -1, spells[rank->spell].ResistDiff, false)) {
if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), ALTERNATE_ABILITY_SPELL_SLOT, spells[rank->spell].mana, -1, spells[rank->spell].ResistDiff, false)) {
return;
}
ExpendAlternateAdvancementCharge(ability->id);
} else {
if(!CastSpell(rank->spell, target_id, USE_ITEM_SPELL_SLOT, -1, -1, 0, -1, rank->spell_type + pTimerAAStart, cooldown, nullptr, rank->id)) {
if(!CastSpell(rank->spell, target_id, ALTERNATE_ABILITY_SPELL_SLOT, -1, -1, 0, -1, rank->spell_type + pTimerAAStart, cooldown, nullptr, rank->id)) {
return;
}
}
@@ -1554,7 +1554,7 @@ void Zone::LoadAlternateAdvancement() {
// then set it here too
//if prev has an aa we have
// then set to whichever is highest
auto iter = current->prereqs.find(prev_prereq.first);
if(iter == current->prereqs.end()) {
//not found