* Added check on stackable items to 'checkweight' (bugreport:1569, bugreport:2756, bugreport 2994) [Inkfish]
* Fixed flee penalty wasn't applied for battleground and wouldn't be restored on map change [Inkfish] git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13735 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9148464d0a
commit
ed83c8817d
@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
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.
|
||||||
|
|
||||||
2009/05/07
|
2009/05/07
|
||||||
|
* Added check on stackable items to 'checkweight' (bugreport:1569, bugreport:2756, bugreport 2994) [Inkfish]
|
||||||
|
* Fixed flee penalty wasn't applied for battleground and wouldn't be restored on map change [Inkfish]
|
||||||
* Fixed players can pull water from ME cell (follow up to r13730) [Inkfish]
|
* Fixed players can pull water from ME cell (follow up to r13730) [Inkfish]
|
||||||
2009/05/04
|
2009/05/04
|
||||||
* Added the md5() script command. [brianluau]
|
* Added the md5() script command. [brianluau]
|
||||||
|
@ -6890,7 +6890,7 @@ void clif_wedding_effect(struct block_list *bl)
|
|||||||
clif_send(buf, packet_len(0x1ea), bl, AREA);
|
clif_send(buf, packet_len(0x1ea), bl, AREA);
|
||||||
}
|
}
|
||||||
/*==========================================
|
/*==========================================
|
||||||
* ‚ ‚Č‚˝‚É<EFBFBD>§‚˘‚˝‚˘Žg—pŽž–Ľ‘O‹©‚Ń
|
* ?なたに逢いたい使用時名前叫び
|
||||||
*------------------------------------------
|
*------------------------------------------
|
||||||
|
|
||||||
void clif_callpartner(struct map_session_data *sd)
|
void clif_callpartner(struct map_session_data *sd)
|
||||||
@ -8012,11 +8012,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( map_flag_gvg(sd->bl.m) )
|
if( map_flag_gvg(sd->bl.m) )
|
||||||
{
|
|
||||||
clif_set0199(sd,3);
|
clif_set0199(sd,3);
|
||||||
if( battle_config.gvg_flee_penalty != 100 || battle_config.bg_flee_penalty != 100 )
|
|
||||||
status_calc_bl(&sd->bl, SCB_FLEE); //Apply flee penalty
|
|
||||||
}
|
|
||||||
|
|
||||||
// info about nearby objects
|
// info about nearby objects
|
||||||
// must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange)
|
// must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange)
|
||||||
@ -8129,6 +8125,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
|||||||
|
|
||||||
if( sd->state.changemap )
|
if( sd->state.changemap )
|
||||||
{// restore information that gets lost on map-change
|
{// restore information that gets lost on map-change
|
||||||
|
if( battle_config.gvg_flee_penalty != 100 || battle_config.bg_flee_penalty != 100 )
|
||||||
|
status_calc_bl(&sd->bl, SCB_FLEE); //Refresh flee penalty
|
||||||
|
|
||||||
if( night_flag && map[sd->bl.m].flag.nightenabled )
|
if( night_flag && map[sd->bl.m].flag.nightenabled )
|
||||||
{ //Display night.
|
{ //Display night.
|
||||||
if( !sd->state.night )
|
if( !sd->state.night )
|
||||||
|
@ -5104,18 +5104,21 @@ BUILDIN_FUNC(checkweight)
|
|||||||
}
|
}
|
||||||
|
|
||||||
weight = itemdb_weight(nameid)*amount;
|
weight = itemdb_weight(nameid)*amount;
|
||||||
if(amount > MAX_AMOUNT || weight + sd->weight > sd->max_weight){
|
if( amount > MAX_AMOUNT || weight + sd->weight > sd->max_weight )
|
||||||
script_pushint(st,0);
|
script_pushint(st,0);
|
||||||
} else {
|
else if( itemdb_isstackable(nameid) )
|
||||||
//Check if the inventory ain't full.
|
{
|
||||||
//TODO: Currently does not checks if you can just stack it on top of another item you already have....
|
if( (i = pc_search_inventory(sd,nameid)) >= 0 )
|
||||||
|
script_pushint(st,amount + sd->status.inventory[i].amount > MAX_AMOUNT ? 0 : 1);
|
||||||
i = pc_search_inventory(sd,0);
|
else
|
||||||
if (i >= 0) //Empty slot available.
|
script_pushint(st,pc_search_inventory(sd,0) >= 0 ? 1 : 0);
|
||||||
script_pushint(st,1);
|
}
|
||||||
else //Inventory full
|
else
|
||||||
script_pushint(st,0);
|
{
|
||||||
|
for( i = 0; i < MAX_INVENTORY && amount; ++i )
|
||||||
|
if( sd->status.inventory[i].nameid == 0 )
|
||||||
|
amount--;
|
||||||
|
script_pushint(st,amount ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user