Browse Source

Update pack_test.cpp

pull/8306/head
Eric Robinson 3 months ago
parent
commit
8ac618dfcf
  1. 8
      test/pack_test.cpp

8
test/pack_test.cpp

@ -168,13 +168,13 @@ static void TestItemNameGeneration(const Item &item)
// Check that UpdateHellfireFlag ensures that dwBuff is updated to get the correct name
if (item._iMagical == ITEM_QUALITY_MAGIC) {
const bool isHellfireItem = (testItem.dwBuff & CF_HELLFIRE);
testItem.dwBuff = 0;
const bool isHellfireItem = testItem.hasCreationFlag2(CF_HELLFIRE);
testItem.setAllCreationFlags2(0);
UpdateHellfireFlag(testItem, testItem._iIName);
testItem._iIdentified = true;
ASSERT_STREQ(testItem.getName().str().data(), testItem._iIName) << "identified name with UpdateHellfireFlag";
ASSERT_TRUE(isHellfireItem || ((item.dwBuff & CF_HELLFIRE) != CF_HELLFIRE)) << "item was wrongly converted to hellfire";
ASSERT_TRUE(isHellfireItem || !item.hasCreationFlag2(CF_HELLFIRE)) << "item was wrongly converted to hellfire";
}
}
}
@ -1443,7 +1443,7 @@ TEST_F(NetPackTest, UnPackNetPlayer_invalid_monsterItemLevel)
continue;
if (item.matchesCreationFlags(CF_USEFUL, CF_UPER15))
continue;
const uint16_t createInfo = item._iCreateInfo;
const uint16_t createInfo = item.getAllCreationFlags();
item.setItemLevel(31);
ASSERT_FALSE(TestNetPackValidation());
item.setAllCreationFlags(createInfo);

Loading…
Cancel
Save