Compare commits
1 Commits
master
...
hotfix/iss
Author | SHA1 | Date | |
---|---|---|---|
![]() |
81ce54685b |
@ -497,7 +497,6 @@ struct map_session_data {
|
|||||||
int speed_rate, speed_add_rate, aspd_add;
|
int speed_rate, speed_add_rate, aspd_add;
|
||||||
int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
|
int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
|
||||||
int shieldmdef;//royal guard's
|
int shieldmdef;//royal guard's
|
||||||
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
|
|
||||||
|
|
||||||
short splash_range, splash_add_range;
|
short splash_range, splash_add_range;
|
||||||
short add_steal_rate;
|
short add_steal_rate;
|
||||||
|
@ -15427,7 +15427,6 @@ BUILDIN_FUNC(isequipped)
|
|||||||
TBL_PC *sd;
|
TBL_PC *sd;
|
||||||
int i, id = 1;
|
int i, id = 1;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
//Original hash to reverse it when full check fails.
|
|
||||||
unsigned int setitem_hash = 0, setitem_hash2 = 0;
|
unsigned int setitem_hash = 0, setitem_hash2 = 0;
|
||||||
|
|
||||||
if (!script_rid2sd(sd)) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
|
if (!script_rid2sd(sd)) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
|
||||||
@ -15435,8 +15434,6 @@ BUILDIN_FUNC(isequipped)
|
|||||||
return SCRIPT_CMD_SUCCESS;
|
return SCRIPT_CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
setitem_hash = sd->bonus.setitem_hash;
|
|
||||||
setitem_hash2 = sd->bonus.setitem_hash2;
|
|
||||||
for (i=0; id!=0; i++) {
|
for (i=0; id!=0; i++) {
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
short j;
|
short j;
|
||||||
@ -15472,16 +15469,16 @@ BUILDIN_FUNC(isequipped)
|
|||||||
|
|
||||||
hash = 1<<((j<5?j:j-5)*4 + k);
|
hash = 1<<((j<5?j:j-5)*4 + k);
|
||||||
// check if card is already used by another set
|
// check if card is already used by another set
|
||||||
if ( ( j < 5 ? sd->bonus.setitem_hash : sd->bonus.setitem_hash2 ) & hash)
|
if ( ( j < 5 ? setitem_hash : setitem_hash2 ) & hash)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// We have found a match
|
// We have found a match
|
||||||
flag = 1;
|
flag = 1;
|
||||||
// Set hash so this card cannot be used by another
|
// Set hash so this card cannot be used by another
|
||||||
if (j<5)
|
if (j<5)
|
||||||
sd->bonus.setitem_hash |= hash;
|
setitem_hash |= hash;
|
||||||
else
|
else
|
||||||
sd->bonus.setitem_hash2 |= hash;
|
setitem_hash2 |= hash;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -15493,10 +15490,7 @@ BUILDIN_FUNC(isequipped)
|
|||||||
ret &= flag;
|
ret &= flag;
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
}
|
}
|
||||||
if (!ret) {//When check fails, restore original hash values. [Skotlex]
|
|
||||||
sd->bonus.setitem_hash = setitem_hash;
|
|
||||||
sd->bonus.setitem_hash2 = setitem_hash2;
|
|
||||||
}
|
|
||||||
script_pushint(st,ret);
|
script_pushint(st,ret);
|
||||||
return SCRIPT_CMD_SUCCESS;
|
return SCRIPT_CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user