Skip to content

Commit

Permalink
Add tests for net player validation (diasurgical#6492)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills authored Aug 20, 2023
1 parent eadfb85 commit 7b06703
Show file tree
Hide file tree
Showing 2 changed files with 565 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ bool IsCreationFlagComboValid(uint16_t iCreateInfo)
iCreateInfo = iCreateInfo & ~CF_LEVEL;
const bool isTownItem = (iCreateInfo & CF_TOWN) != 0;
const bool isPregenItem = (iCreateInfo & CF_PREGEN) != 0;
const bool isGroundItem = (iCreateInfo & CF_USEFUL) == CF_USEFUL;
const bool isUsefulItem = (iCreateInfo & CF_USEFUL) == CF_USEFUL;

if (isPregenItem && hasMultipleFlags(iCreateInfo))
if (isPregenItem)
return false;
if (isGroundItem && (iCreateInfo & ~CF_USEFUL) != 0)
if (isUsefulItem && (iCreateInfo & ~CF_USEFUL) != 0)
return false;
if (isTownItem && hasMultipleFlags(iCreateInfo))
return false;
Expand Down
Loading

0 comments on commit 7b06703

Please sign in to comment.