Skip to content

Commit

Permalink
fix itemlink test with cards
Browse files Browse the repository at this point in the history
Captain_Felock_Card card is not available for pre-re, making tests fail.

Now using a card available for both modes.
  • Loading branch information
guilherme-gm committed Oct 17, 2023
1 parent 17d3acd commit 8a3ca84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions npc/dev/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,19 @@ function script F_TestGetItemLink_BaseWeapon {
}

function script F_TestGetItemLink_FullWeapon {
setarray(.@cards[0], Fabre_Card, Captain_Felock_Card, 0, Agility1);
setarray(.@cards[0], Fabre_Card, Necromancer_Card, 0, Agility1);
setarray(.@options[0], WEAPON_ATTR_GROUND, 1, 0, VAR_MAXHPAMOUNT, 10, 0);
.@str$ = getitemlink(Knife, 10, .@cards, .@options, 2);

.@pass = false;
if (PACKETVER < 20150923) {
.@pass = (.@str$ == getiteminfo(Knife, ITEMINFO_NAME));
} else if (PACKETVER < 20161116) {
.@pass = (.@str$ == "<ITEM>000021jn%0a'12y'74q'00'1ei)2R*00+01)01*00+0a</ITEM>");
.@pass = (.@str$ == "<ITEM>000021jn%0a'12y'19C'00'1ei)2R*00+01)01*00+0a</ITEM>");
} else if (PACKETVER < 20200916) {
.@pass = (.@str$ == "<ITEML>000021jn%0a&00(12y(74q(00(1ei*2R+00,01*01+00,0a</ITEML>");
.@pass = (.@str$ == "<ITEML>000021jn%0a&00(12y(19C(00(1ei*2R+00,01*01+00,0a</ITEML>");
} else {
.@pass = (.@str$ == "<ITEML>000021jn%0a&00'02)12y)74q)00)1ei+2R,00-01+01,00-0a</ITEML>");
.@pass = (.@str$ == "<ITEML>000021jn%0a&00'02)12y)19C)00)1ei+2R,00-01+01,00-0a</ITEML>");
}

return .@pass;
Expand Down

0 comments on commit 8a3ca84

Please sign in to comment.