Hack to fix long recast bard songs

This commit is contained in:
Michael Cook (mackal) 2016-10-21 20:48:18 -04:00
parent 714464481f
commit 95064947b6

View File

@ -985,9 +985,14 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(GetClass() == BARD) // bard's can move when casting any spell... if(GetClass() == BARD) // bard's can move when casting any spell...
{ {
if (IsBardSong(spell_id)) { if (IsBardSong(spell_id)) {
if(spells[spell_id].buffduration == 0xFFFF || spells[spell_id].recast_time != 0) { if(spells[spell_id].buffduration == 0xFFFF) {
Log.Out(Logs::Detail, Logs::Spells, "Bard song %d not applying bard logic because duration or recast is wrong: dur=%d, recast=%d", spells[spell_id].buffduration, spells[spell_id].recast_time); Log.Out(Logs::Detail, Logs::Spells, "Bard song %d not applying bard logic because duration. dur=%d, recast=%d", spells[spell_id].buffduration);
} else { } else {
// So long recast bard songs need special bard logic, although the effects don't repulse like other songs
// This is basically a hack to get that effect
// You can hold down the long recast spells, but you only get the effects once
// TODO fuck bards.
if (spells[spell_id].recast_time == 0) {
bardsong = spell_id; bardsong = spell_id;
bardsong_slot = slot; bardsong_slot = slot;
//NOTE: theres a lot more target types than this to think about... //NOTE: theres a lot more target types than this to think about...
@ -996,6 +1001,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
else else
bardsong_target_id = spell_target->GetID(); bardsong_target_id = spell_target->GetID();
bardsong_timer.Start(6000); bardsong_timer.Start(6000);
}
Log.Out(Logs::Detail, Logs::Spells, "Bard song %d started: slot %d, target id %d", bardsong, bardsong_slot, bardsong_target_id); Log.Out(Logs::Detail, Logs::Spells, "Bard song %d started: slot %d, target id %d", bardsong, bardsong_slot, bardsong_target_id);
bard_song_mode = true; bard_song_mode = true;
} }