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:
ratkosrb
2022-09-23 21:57:00 +03:00
parent 52462c94a7
commit 0347766a19
32 changed files with 369 additions and 247 deletions
+2 -2
View File
@@ -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))
{