mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-27 15:36:22 +00:00
coredump fix & rpg actions
This commit is contained in:
@@ -15,7 +15,7 @@ class SpellInfo;
|
||||
class ItemForSpellValue : public CalculatedValue<Item*>, public Qualified
|
||||
{
|
||||
public:
|
||||
ItemForSpellValue(PlayerbotAI* botAI, std::string const name = "item for spell") : CalculatedValue<Item*>(botAI, name, 20 * 1000) { }
|
||||
ItemForSpellValue(PlayerbotAI* botAI, std::string const name = "item for spell") : CalculatedValue<Item*>(botAI, name, 1) { }
|
||||
|
||||
Item* Calculate() override;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ bool SpellCastUsefulValue::Calculate()
|
||||
qualifier == "rockbiter weapon" || qualifier == "earthliving weapon" || qualifier == "spellstone")
|
||||
{
|
||||
if (Item* item = AI_VALUE2(Item*, "item for spell", spellid))
|
||||
if (item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
|
||||
if (item->IsInWorld() && item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user