mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-17 09:04:36 +00:00
Item spell cast
This commit is contained in:
@@ -230,10 +230,8 @@ bool UseItemAction::UseItem(Item* item, ObjectGuid goGuid, Item* itemTarget, Uni
|
||||
targetSelected = true;
|
||||
out << " on "<< chat->FormatItem(itemForSpell->GetTemplate());
|
||||
}
|
||||
|
||||
Spell* spell = new Spell(bot, spellInfo, TRIGGERED_NONE);
|
||||
botAI->WaitForSpellCast(spell);
|
||||
delete spell;
|
||||
uint32 castTime = spellInfo->CalcCastTime();
|
||||
botAI->SetNextCheckDelay(castTime + sPlayerbotAIConfig->reactDelay);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -27,7 +27,7 @@ float CastTimeMultiplier::GetValue(Action* action)
|
||||
if ((spellInfo->Targets & TARGET_FLAG_DEST_LOCATION) != 0 || (spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION) != 0)
|
||||
return 1.0f;
|
||||
|
||||
uint32 castTime = spellInfo->CalcCastTime();
|
||||
uint32 castTime = spellInfo->CalcCastTime(bot);
|
||||
|
||||
if (spellInfo->IsChanneled())
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ float AvoidAoeStrategyMultiplier::GetValue(Action* action)
|
||||
else if (spellId && pSpellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION)
|
||||
return 1.0f;
|
||||
|
||||
uint32 castTime = pSpellInfo->CalcCastTime();
|
||||
uint32 castTime = pSpellInfo->CalcCastTime(bot);
|
||||
|
||||
if (AI_VALUE2(bool, "has area debuff", "self target") && spellId && castTime > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user