mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[9301] Implement proper check of broken spells for IsLootCraftingSpell case.
This commit is contained in:
parent
2718884192
commit
b2c3132eaa
2 changed files with 19 additions and 2 deletions
|
|
@ -2621,7 +2621,24 @@ bool SpellMgr::IsSpellValid(SpellEntry const* spellInfo, Player* pl, bool msg)
|
|||
case SPELL_EFFECT_CREATE_ITEM:
|
||||
case SPELL_EFFECT_CREATE_ITEM_2:
|
||||
{
|
||||
if(!ObjectMgr::GetItemPrototype( spellInfo->EffectItemType[i] ))
|
||||
if (spellInfo->EffectItemType[i] == 0)
|
||||
{
|
||||
// skip auto-loot crafting spells, its not need explicit item info (but have special fake items sometime)
|
||||
if (!IsLootCraftingSpell(spellInfo))
|
||||
{
|
||||
if(msg)
|
||||
{
|
||||
if(pl)
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.",spellInfo->Id);
|
||||
else
|
||||
sLog.outErrorDb("Craft spell %u not have create item entry.",spellInfo->Id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
// also possible IsLootCraftingSpell case but fake item must exist anyway
|
||||
else if (!ObjectMgr::GetItemPrototype( spellInfo->EffectItemType[i] ))
|
||||
{
|
||||
if(msg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9300"
|
||||
#define REVISION_NR "9301"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue