aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-05-04 17:51:30 +0200
committerSpp <none@none>2010-05-04 17:51:30 +0200
commit51d0c07c90690925e03a8d5e75decc2e1410c57e (patch)
tree56767e3832a22ab39beb605ec7378cae095ad6b2 /src
parent390f11078f46f05a9b0cd28b09b85d508e6940ec (diff)
Allow spellid_x fields in item_template to be -1
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ObjectMgr.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 836e3b42790..349dd342b7a 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -2172,12 +2172,12 @@ void ObjectMgr::LoadItemPrototypes()
const_cast<ItemPrototype*>(proto)->Spells[0].SpellId = 0;
const_cast<ItemPrototype*>(proto)->Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
- else
+ else if (proto->Spells[1].SpellId != -1)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(proto->Spells[1].SpellId);
if (!spellInfo)
{
- sLog.outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%u)",i,1+1,proto->Spells[1].SpellId);
+ sLog.outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)",i,1+1,proto->Spells[1].SpellId);
const_cast<ItemPrototype*>(proto)->Spells[0].SpellId = 0;
const_cast<ItemPrototype*>(proto)->Spells[1].SpellId = 0;
const_cast<ItemPrototype*>(proto)->Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
@@ -2185,7 +2185,7 @@ void ObjectMgr::LoadItemPrototypes()
// allowed only in special format
else if ((proto->Spells[1].SpellId == 483) || (proto->Spells[1].SpellId == 55884))
{
- sLog.outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%u)",i,1+1,proto->Spells[1].SpellId);
+ sLog.outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%d)",i,1+1,proto->Spells[1].SpellId);
const_cast<ItemPrototype*>(proto)->Spells[0].SpellId = 0;
const_cast<ItemPrototype*>(proto)->Spells[1].SpellId = 0;
const_cast<ItemPrototype*>(proto)->Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
@@ -2203,7 +2203,7 @@ void ObjectMgr::LoadItemPrototypes()
}
else if (proto->Spells[j].SpellId != 0)
{
- sLog.outErrorDb("Item (Entry: %u) has wrong spell in spellid_%d (%u) for learning special format",i,j+1,proto->Spells[j].SpellId);
+ sLog.outErrorDb("Item (Entry: %u) has wrong spell in spellid_%d (%d) for learning special format",i,j+1,proto->Spells[j].SpellId);
const_cast<ItemPrototype*>(proto)->Spells[j].SpellId = 0;
}
}
@@ -2220,18 +2220,18 @@ void ObjectMgr::LoadItemPrototypes()
const_cast<ItemPrototype*>(proto)->Spells[j].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
- if (proto->Spells[j].SpellId)
+ if (proto->Spells[j].SpellId && proto->Spells[j].SpellId != -1)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(proto->Spells[j].SpellId);
if (!spellInfo)
{
- sLog.outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%u)",i,j+1,proto->Spells[j].SpellId);
+ sLog.outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)",i,j+1,proto->Spells[j].SpellId);
const_cast<ItemPrototype*>(proto)->Spells[j].SpellId = 0;
}
// allowed only in special format
else if ((proto->Spells[j].SpellId == 483) || (proto->Spells[j].SpellId == 55884))
{
- sLog.outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%u)",i,j+1,proto->Spells[j].SpellId);
+ sLog.outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%d)",i,j+1,proto->Spells[j].SpellId);
const_cast<ItemPrototype*>(proto)->Spells[j].SpellId = 0;
}
}