Reimplement item template loading.
Now bots will not equip items that come from quests which are too high level for them.
This commit is contained in:
@@ -451,7 +451,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
||||
case SCRIPT_COMMAND_REMOVE_ITEM:
|
||||
case SCRIPT_COMMAND_CREATE_ITEM:
|
||||
{
|
||||
if (!ObjectMgr::GetItemPrototype(tmp.createItem.itemId))
|
||||
if (!sObjectMgr.GetItemPrototype(tmp.createItem.itemId))
|
||||
{
|
||||
if (!sObjectMgr.IsExistingItemId(tmp.createItem.itemId))
|
||||
{
|
||||
@@ -483,7 +483,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
||||
{
|
||||
if (tmp.setEquipment.slot[i] > 0)
|
||||
{
|
||||
if (!ObjectMgr::GetItemPrototype(tmp.setEquipment.slot[i]))
|
||||
if (!sObjectMgr.GetItemPrototype(tmp.setEquipment.slot[i]))
|
||||
{
|
||||
if (!sObjectMgr.IsExistingItemId(tmp.createItem.itemId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user