Added supports for Soul Bound.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14073 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
84cc5b7513
commit
d5c7d9e747
@ -3,6 +3,8 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
|
09/09/23
|
||||||
|
* Added supports for Soul Bound. [Inkfish]
|
||||||
09/09/21
|
09/09/21
|
||||||
* Disabled ip checking during auth, since it lead to a lot of confusion. [ultramage]
|
* Disabled ip checking during auth, since it lead to a lot of confusion. [ultramage]
|
||||||
09/09/17
|
09/09/17
|
||||||
|
@ -9650,7 +9650,7 @@ BUILDIN_FUNC(getequipcardcnt)
|
|||||||
if (num > 0 && num <= ARRAYLENGTH(equip))
|
if (num > 0 && num <= ARRAYLENGTH(equip))
|
||||||
i=pc_checkequip(sd,equip[num-1]);
|
i=pc_checkequip(sd,equip[num-1]);
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0 || !sd->inventory_data[i]) {
|
||||||
script_pushint(st,0);
|
script_pushint(st,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -9662,7 +9662,7 @@ BUILDIN_FUNC(getequipcardcnt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
for( j = 0; j < MAX_SLOTS; j++ )
|
for( j = 0; j < sd->inventory_data[i]->slot; j++ )
|
||||||
if( sd->status.inventory[i].card[j] && itemdb_type(sd->status.inventory[i].card[j]) == IT_CARD )
|
if( sd->status.inventory[i].card[j] && itemdb_type(sd->status.inventory[i].card[j]) == IT_CARD )
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
@ -9683,14 +9683,14 @@ BUILDIN_FUNC(successremovecards)
|
|||||||
if (num > 0 && num <= ARRAYLENGTH(equip))
|
if (num > 0 && num <= ARRAYLENGTH(equip))
|
||||||
i=pc_checkequip(sd,equip[num-1]);
|
i=pc_checkequip(sd,equip[num-1]);
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0 || !sd->inventory_data[i]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
|
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for( c = MAX_SLOTS - 1; c >= 0; --c )
|
for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c )
|
||||||
{
|
{
|
||||||
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD )
|
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD )
|
||||||
{// extract this card from the item
|
{// extract this card from the item
|
||||||
@ -9761,13 +9761,13 @@ BUILDIN_FUNC(failedremovecards)
|
|||||||
if (num > 0 && num <= ARRAYLENGTH(equip))
|
if (num > 0 && num <= ARRAYLENGTH(equip))
|
||||||
i=pc_checkequip(sd,equip[num-1]);
|
i=pc_checkequip(sd,equip[num-1]);
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0 || !sd->inventory_data[i])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
|
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for( c = MAX_SLOTS - 1; c >= 0; --c )
|
for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c )
|
||||||
{
|
{
|
||||||
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD )
|
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD )
|
||||||
{
|
{
|
||||||
@ -11098,8 +11098,8 @@ BUILDIN_FUNC(checkequipedcard)
|
|||||||
|
|
||||||
if(sd){
|
if(sd){
|
||||||
for(i=0;i<MAX_INVENTORY;i++){
|
for(i=0;i<MAX_INVENTORY;i++){
|
||||||
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount){
|
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]){
|
||||||
for(n=0;n<MAX_SLOTS;n++){
|
for(n=0;n<sd->inventory_data[i]->slot;n++){
|
||||||
if(sd->status.inventory[i].card[n]==c){
|
if(sd->status.inventory[i].card[n]==c){
|
||||||
script_pushint(st,1);
|
script_pushint(st,1);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1949,7 +1949,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
|
|||||||
//Card script execution.
|
//Card script execution.
|
||||||
if(itemdb_isspecial(sd->status.inventory[index].card[0]))
|
if(itemdb_isspecial(sd->status.inventory[index].card[0]))
|
||||||
continue;
|
continue;
|
||||||
for(j=0;j<sd->inventory_data[index]->slot;j++){
|
for(j=0;j<MAX_SLOTS;j++){ // Uses MAX_SLOTS to support Soul Bound system [Inkfish]
|
||||||
current_equip_card_id= c= sd->status.inventory[index].card[j];
|
current_equip_card_id= c= sd->status.inventory[index].card[j];
|
||||||
if(!c)
|
if(!c)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user