Cleaned up rental item expiration
* Boarding Halter will now properly be removed on expiration when a player is logged out. (fixes #1035) * Removed hard coded checks for other official rental items. * Rental items now call the OnUnequip Script of the item which can be used to remove player states. * Updated various items in the database to match the new format.
This commit is contained in:
parent
dce5907062
commit
074bdded09
@ -4848,9 +4848,9 @@
|
||||
12284,Internet_Cafe3,Internet Cafe3,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_MATKPOTION,5400000,40; },{},{}
|
||||
12285,Internet_Cafe4,Internet Cafe4,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_ATKPOTION,5400000,24; sc_start SC_MATKPOTION,5400000,24; },{},{}
|
||||
12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_Masquerade_2),1; },{},{}
|
||||
12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 1; },{},{}
|
||||
12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 2; },{},{}
|
||||
12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 3; },{},{}
|
||||
12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 1; },{},{ setfont 0; }
|
||||
12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 2; },{},{ setfont 0; }
|
||||
12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 3; },{},{ setfont 0; }
|
||||
12290,Mysterious_Can,Mysterious Can Magic Powder,2,10,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,0; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,120000,5; },{},{}
|
||||
12291,Mysterious_PET_Bottle,Mysterious PET Bottle,2,10,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,0; skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,120000,5; },{},{}
|
||||
12292,Unripe_Fruit,Unripe Fruit,0,500,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,0; },{},{}
|
||||
@ -4865,12 +4865,12 @@
|
||||
12301,Doppelganger_Scroll,Doppelganger Contract,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1966,1800000; },{},{}
|
||||
12302,Ygnizem_Scroll,Egnigem Cenia Contract,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_create 1967,1800000; },{},{}
|
||||
12303,Water_Of_Blessing,Blessing Of Water,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
|
||||
12304,Picture_Diary,Diary Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 4; },{},{}
|
||||
12305,Mini_Heart,Mini Heart Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 5; },{},{}
|
||||
12306,Newcomer,Freshman Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 6; },{},{}
|
||||
12307,Kid,Kid Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 7; },{},{}
|
||||
12308,Magic_Castle,Magic Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 8; },{},{}
|
||||
12309,Bulging_Head,JJangu Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 9; },{},{}
|
||||
12304,Picture_Diary,Diary Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 4; },{},{ setfont 0; }
|
||||
12305,Mini_Heart,Mini Heart Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 5; },{},{ setfont 0; }
|
||||
12306,Newcomer,Freshman Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 6; },{},{ setfont 0; }
|
||||
12307,Kid,Kid Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 7; },{},{ setfont 0; }
|
||||
12308,Magic_Castle,Magic Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 8; },{},{ setfont 0; }
|
||||
12309,Bulging_Head,JJangu Magic Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ setfont 9; },{},{ setfont 0; }
|
||||
12310,Spray_Of_Flowers,Spray Of Flowers,2,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCFLEE,600000,10; },{},{}
|
||||
12311,Large_Spray_Of_Flowers,Huge Spray Of Flowers,11,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ALL_PARTYFLEE",1; },{},{}
|
||||
12312,Thick_Manual50,Thick Battle Manual,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,3600000,50; },{},{}
|
||||
|
@ -3886,9 +3886,9 @@
|
||||
5885,Blue_Wizardry_Hat_C,Blue Mage Hat C,4,20,,300,,1,,0,0x00810204,63,2,256,,0,1,285,{ bonus bInt,2; bonus bMaxSP,150; },{},{}
|
||||
5886,Yellow_Wizardry_Hat_C,Yellow Mage Hat C,4,20,,300,,1,,0,0x00810204,63,2,256,,0,1,286,{ bonus bInt,2; bonus bMaxSP,150; },{},{}
|
||||
5887,Half_L_Magestic_Goat,Half L Majestic Goat,4,20,,800,,5,,0,0xFFFFFFFF,63,2,256,,0,1,380,{ bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddRace,RC_Player,10; bonus bBaseAtk,(JobLevel*2)/7; },{},{}
|
||||
5892,RCC2013_1ST_CROWN,RCC2013 1ST CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1106,{ bonus bAllStats,5; sc_start SC_SPEEDUP0,-1,25; skill "AL_TELEPORT",1; },{ sc_end SC_SPEEDUP0; },{}
|
||||
5893,RCC2013_2ND_CROWN,RCC2013 2ND CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1107,{ bonus bAllStats,4; sc_start SC_SPEEDUP0,-1,25; skill "AL_TELEPORT",1; },{ sc_end SC_SPEEDUP0; },{}
|
||||
5894,RCC2013_3RD_CROWN,RCC2013 3RD CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1108,{ bonus bAllStats,3; sc_start SC_SPEEDUP0,-1,25; skill "AL_TELEPORT",1; },{ sc_end SC_SPEEDUP0; },{}
|
||||
5892,RCC2013_1ST_CROWN,RCC2013 1ST CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1106,{ bonus bAllStats,5; skill "AL_TELEPORT",1; },{ sc_start SC_SPEEDUP0,-1,25; },{ sc_end SC_SPEEDUP0; }
|
||||
5893,RCC2013_2ND_CROWN,RCC2013 2ND CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1107,{ bonus bAllStats,4; skill "AL_TELEPORT",1; },{ sc_start SC_SPEEDUP0,-1,25; },{ sc_end SC_SPEEDUP0; }
|
||||
5894,RCC2013_3RD_CROWN,RCC2013 3RD CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1108,{ bonus bAllStats,3; skill "AL_TELEPORT",1; },{ sc_start SC_SPEEDUP0,-1,25; },{ sc_end SC_SPEEDUP0; }
|
||||
5895,RCC2013_ANV_Hat,RCC2013 ANV Hat,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1109,{ bonus bAllStats,1; bonus2 bAddClass,Class_All,2; bonus bMatkRate,2; },{},{}
|
||||
5918,Gambler_Seal,Gambler Seal,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,,,1,1202,{ bonus bCritical,3; bonus bCritAtkRate,3; bonus2 bSubSkill,"RA_ARROWSTORM",10; bonus2 bSubSkill,"SR_GATEOFHELL",10; .@dex = readparam(bDex); .@luk = readparam(bLuk); bonus bCritAtkRate,-(.@dex/10)*2; bonus bCritical,.@luk/10; bonus bBaseAtk,(.@luk/10)*2; bonus bMatk,(.@luk/10)*2; if (.@luk > 120) { bonus bCritical,10; bonus bCritAtkRate,10; bonus2 bSubSkill,"RA_ARROWSTORM",30; bonus2 bSubSkill,"SR_GATEOFHELL",30; } else if (.@luk > 108) { bonus bCritical,5; bonus bCritAtkRate,10; } },{},{}
|
||||
5920,Medical_Boots,Medical Boots,4,0,,300,,10,,0,0xFFFFFFFF,63,2,64,,10,1,,{ .@r = getrefine(); bonus bHealPower,10+((.@r/2) * 2); bonus2 bSkillUseSP,"AB_CHEAL",(.@r * 5); },{},{}
|
||||
@ -6298,9 +6298,9 @@
|
||||
12284,Internet_Cafe3,Internet Cafe3,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_INCINT,5400000,8; sc_start SC_INCVIT,5400000,4; sc_start SC_INCDEX,5400000,6; sc_start SC_MATKPOTION,5400000,40; },{},{}
|
||||
12285,Internet_Cafe4,Internet Cafe4,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_INCDEX,5400000,8; sc_start SC_INCLUK,5400000,4; sc_start SC_INCAGI,5400000,6; sc_start SC_ATKPOTION,5400000,24; sc_start SC_MATKPOTION,5400000,24; },{},{}
|
||||
12286,Masquerade_Ball_Box2,Masquerade Ball Box2,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getrandgroupitem(IG_Masquerade_2,1); },{},{}
|
||||
12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 1; },{},{}
|
||||
12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 2; },{},{}
|
||||
12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 3; },{},{}
|
||||
12287,Love_Angel,Love Angel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 1; },{},{ setfont 0; }
|
||||
12288,Squirrel,Squirrel Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 2; },{},{ setfont 0; }
|
||||
12289,Gogo,Gogo Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 3; },{},{ setfont 0; }
|
||||
12290,Mysterious_Can,Mysterious Can Magic Powder,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 5,0; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,120000,5; },{},{}
|
||||
12291,Mysterious_PET_Bottle,Mysterious PET Bottle,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 5,0; skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,120000,5; },{},{}
|
||||
12292,Unripe_Fruit,Unripe Yggdrasilberry,0,500,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 20,0; },{},{}
|
||||
@ -6315,12 +6315,12 @@
|
||||
12301,Doppelganger_Scroll,Doppelganger Contract,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ mercenary_create 1966,1800000; },{},{}
|
||||
12302,Ygnizem_Scroll,Egnigem Cenia Contract,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ mercenary_create 1967,1800000; },{},{}
|
||||
12303,Water_Of_Blessing,Blessing Of Water,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
|
||||
12304,Picture_Diary,Diary Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 4; },{},{}
|
||||
12305,Mini_Heart,Mini Heart Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 5; },{},{}
|
||||
12306,Newcomer,Freshman Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 6; },{},{}
|
||||
12307,Kid,Kid Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 7; },{},{}
|
||||
12308,Magic_Castle,Magic Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 8; },{},{}
|
||||
12309,Bulging_Head,JJangu Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 9; },{},{}
|
||||
12304,Picture_Diary,Diary Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 4; },{},{ setfont 0; }
|
||||
12305,Mini_Heart,Mini Heart Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 5; },{},{ setfont 0; }
|
||||
12306,Newcomer,Freshman Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 6; },{},{ setfont 0; }
|
||||
12307,Kid,Kid Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 7; },{},{ setfont 0; }
|
||||
12308,Magic_Castle,Magic Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 8; },{},{ setfont 0; }
|
||||
12309,Bulging_Head,JJangu Magic Powder,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setfont 9; },{},{ setfont 0; }
|
||||
12310,Spray_Of_Flowers,Spray Of Flowers,2,0,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FLEEFOOD,300000,5; },{},{}
|
||||
12311,Large_Spray_Of_Flowers,Huge Spray Of Flowers,11,0,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ itemskill "ALL_PARTYFLEE",5; },{},{}
|
||||
12312,Thick_Manual50,Thick Battle Manual,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_EXPBOOST,3600000,50; },{},{}
|
||||
@ -6628,7 +6628,7 @@
|
||||
12619,Cgrade_Pocket,C Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Cgrade_Pocket); },{},{}
|
||||
12620,Dgrade_Pocket,D Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Dgrade_Pocket); },{},{}
|
||||
12621,Egrade_Pocket,E Grade Coin Bag,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getgroupitem(IG_Egrade_Pocket); },{},{}
|
||||
12622,Boarding_Halter,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_ALL_RIDING,-1,1; },{},{}
|
||||
12622,Boarding_Halter,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ setmounting(); },{},{ if (ismounting()) setmounting(); }
|
||||
12623,High_Weapon_Box,Advanced Weapons Box,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getrandgroupitem(IG_Advanced_Weapons_Box,1); },{},{}
|
||||
12624,Delicious_Jelly,Delicious Jelly,0,20,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ percentheal 3,3; },{},{}
|
||||
12625,Sapa_Feat_Cert_Pack,Sapa Feat Cert Pack,2,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
|
||||
|
@ -223,7 +223,8 @@ OnEquip_Script: Script to execute when the item is equipped.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
OnUnequip_Script: Script to execute when the item is unequipped.
|
||||
OnUnequip_Script: Script to execute when the item is unequipped
|
||||
or when a rental item expires.
|
||||
Warning, not all item bonuses will work here as expected.
|
||||
|
||||
---------------------------------------
|
||||
|
@ -4480,6 +4480,10 @@ in <time> seconds and be automatically deleted. When receiving a rental item,
|
||||
the character will receive a message in their chat window. The character will
|
||||
also receive warning messages in their chat window before the item disappears.
|
||||
|
||||
When rentals expire it will call the OnUnequip Script of the item. This can be used
|
||||
for special cases such as removing a status change or resetting a variable or state
|
||||
of the player.
|
||||
|
||||
This command can not be used to rent stackable items. Rental items cannot be
|
||||
dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75)
|
||||
Note: 'delitem' in an NPC script can still remove rental items.
|
||||
|
@ -317,6 +317,14 @@ int chmapif_parse_askscdata(int fd){
|
||||
WFIFOW(fd,12) = count;
|
||||
WFIFOSET(fd,WFIFOW(fd,2));
|
||||
}
|
||||
} else { // No Status Changes to load but still send a response
|
||||
WFIFOHEAD(fd,14);
|
||||
WFIFOW(fd,0) = 0x2b1d;
|
||||
WFIFOW(fd,2) = 14;
|
||||
WFIFOL(fd,4) = aid;
|
||||
WFIFOL(fd,8) = cid;
|
||||
WFIFOW(fd,12) = 0;
|
||||
WFIFOSET(fd,WFIFOW(fd,2));
|
||||
}
|
||||
Sql_FreeResult(sql_handle);
|
||||
#endif
|
||||
|
@ -101,15 +101,6 @@ enum item_itemid
|
||||
ITEMID_M_AWAKENING_POTION = 12242,
|
||||
ITEMID_M_BERSERK_POTION = 12243,
|
||||
ITEMID_COMP_BATTLE_MANUAL = 12263,
|
||||
ITEMID_LOVE_ANGEL = 12287,
|
||||
ITEMID_SQUIRREL = 12288,
|
||||
ITEMID_GOGO = 12289,
|
||||
ITEMID_PICTURE_DIARY = 12304,
|
||||
ITEMID_MINI_HEART = 12305,
|
||||
ITEMID_NEWCOMER = 12306,
|
||||
ITEMID_KID = 12307,
|
||||
ITEMID_MAGIC_CASTLE = 12308,
|
||||
ITEMID_BULGING_HEAD = 12309,
|
||||
ITEMID_THICK_BATTLE_MANUAL = 12312,
|
||||
ITEMID_ANCILLA = 12333,
|
||||
ITEMID_DUN_TELE_SCROLL3 = 12352,
|
||||
|
109
src/map/pc.c
109
src/map/pc.c
@ -472,87 +472,6 @@ void pc_inventory_rental_clear(struct map_session_data *sd)
|
||||
}
|
||||
}
|
||||
|
||||
/** Assumes I is valid (from default areas where it is called, it is) */
|
||||
void pc_rental_expire(struct map_session_data *sd, int i)
|
||||
{
|
||||
unsigned short nameid = sd->status.inventory[i].nameid;
|
||||
|
||||
/* Soon to be dropped, we got plans to integrate it with item db */
|
||||
switch( nameid ) {
|
||||
case ITEMID_REINS_OF_MOUNT:
|
||||
if( &sd->sc && sd->sc.data[SC_ALL_RIDING] )
|
||||
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
|
||||
break;
|
||||
case ITEMID_LOVE_ANGEL:
|
||||
if( sd->status.font == 1 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_SQUIRREL:
|
||||
if( sd->status.font == 2 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_GOGO:
|
||||
if( sd->status.font == 3 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_PICTURE_DIARY:
|
||||
if( sd->status.font == 4 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_MINI_HEART:
|
||||
if( sd->status.font == 5 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_NEWCOMER:
|
||||
if( sd->status.font == 6 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_KID:
|
||||
if( sd->status.font == 7 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_MAGIC_CASTLE:
|
||||
if( sd->status.font == 8 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
case ITEMID_BULGING_HEAD:
|
||||
if( sd->status.font == 9 ) {
|
||||
sd->status.font = 0;
|
||||
clif_font(sd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Remove visuals effect from headgear
|
||||
if( &sd->sc && sd->sc.data[SC_MOONSTAR] )
|
||||
status_change_end(&sd->bl, SC_MOONSTAR, INVALID_TIMER);
|
||||
if( &sd->sc && sd->sc.data[SC_SUPER_STAR] )
|
||||
status_change_end(&sd->bl, SC_SUPER_STAR, INVALID_TIMER);
|
||||
if( &sd->sc && sd->sc.data[SC_DECORATION_OF_MUSIC] )
|
||||
status_change_end(&sd->bl, SC_DECORATION_OF_MUSIC, INVALID_TIMER);
|
||||
if( &sd->sc && sd->sc.data[SC_STRANGELIGHTS] )
|
||||
status_change_end(&sd->bl, SC_STRANGELIGHTS, INVALID_TIMER);
|
||||
|
||||
clif_rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
|
||||
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
|
||||
}
|
||||
|
||||
void pc_inventory_rentals(struct map_session_data *sd)
|
||||
{
|
||||
int i, c = 0;
|
||||
@ -563,9 +482,12 @@ void pc_inventory_rentals(struct map_session_data *sd)
|
||||
continue; // Nothing here
|
||||
if( sd->status.inventory[i].expire_time == 0 )
|
||||
continue;
|
||||
if( sd->status.inventory[i].expire_time <= time(NULL) )
|
||||
pc_rental_expire(sd, i);
|
||||
else {
|
||||
if( sd->status.inventory[i].expire_time <= time(NULL) ) {
|
||||
if (sd->inventory_data[i]->unequip_script)
|
||||
run_script(sd->inventory_data[i]->unequip_script, 0, sd->bl.id, fake_nd->bl.id);
|
||||
clif_rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
|
||||
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_OTHER);
|
||||
} else {
|
||||
expire_tick = (unsigned int)(sd->status.inventory[i].expire_time - time(NULL)) * 1000;
|
||||
clif_rental_time(sd->fd, sd->status.inventory[i].nameid, (int)(expire_tick / 1000));
|
||||
next_tick = umin(expire_tick, next_tick);
|
||||
@ -11322,17 +11244,22 @@ void pc_damage_log_clear(struct map_session_data *sd, int id)
|
||||
}
|
||||
}
|
||||
|
||||
/* Status change data arrived from char-server */
|
||||
/**
|
||||
* Status change data arrived from char-server
|
||||
* @param sd: Player data
|
||||
*/
|
||||
void pc_scdata_received(struct map_session_data *sd) {
|
||||
// Nothing todo yet
|
||||
return;
|
||||
pc_inventory_rentals(sd); // Needed here to remove rentals that have Status Changes after chrif_load_scdata has finished
|
||||
}
|
||||
|
||||
/** Check expiration time and rental items
|
||||
* @param sd
|
||||
*/
|
||||
/**
|
||||
* Check player account expiration time and rental item expirations
|
||||
* @param sd: Player data
|
||||
*/
|
||||
void pc_check_expiration(struct map_session_data *sd) {
|
||||
pc_inventory_rentals(sd);
|
||||
#ifndef ENABLE_SC_SAVING
|
||||
pc_inventory_rentals(sd); // Check here if Status Change saving is disabled
|
||||
#endif
|
||||
|
||||
if (sd->expiration_time != 0) { //Don't display if it's unlimited or unknow value
|
||||
time_t exp_time = sd->expiration_time;
|
||||
|
@ -1180,7 +1180,6 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data); // by [y
|
||||
void pc_inventory_rentals(struct map_session_data *sd);
|
||||
void pc_inventory_rental_clear(struct map_session_data *sd);
|
||||
void pc_inventory_rental_add(struct map_session_data *sd, unsigned int seconds);
|
||||
void pc_rental_expire(struct map_session_data *sd, int i);
|
||||
|
||||
int pc_read_motd(void); // [Valaris]
|
||||
int pc_disguise(struct map_session_data *sd, int class_);
|
||||
|
@ -10909,7 +10909,6 @@ int status_change_clear(struct block_list* bl, int type)
|
||||
case SC_S_LIFEPOTION:
|
||||
case SC_L_LIFEPOTION:
|
||||
case SC_PUSH_CART:
|
||||
case SC_ALL_RIDING:
|
||||
case SC_LIGHT_OF_REGENE:
|
||||
case SC_STYLE_CHANGE:
|
||||
case SC_MOONSTAR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user