Moved the new novending cell check from the internal code to the client-server interface (allows server to force-open shop if needed)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11580 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e0cccf7d12
commit
e3ab4cdcfe
@ -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.
|
||||||
|
|
||||||
2007/10/26
|
2007/10/26
|
||||||
|
* Moved the new novending cell check from the internal code to the
|
||||||
|
client-server interface (allows server to force-open shop if needed)
|
||||||
* Removed confusing map_nick2sd_nocase(), let the charserver handle it
|
* Removed confusing map_nick2sd_nocase(), let the charserver handle it
|
||||||
* Added correct packet for attachment retrieval failure when overweight
|
* Added correct packet for attachment retrieval failure when overweight
|
||||||
* Fixed one more mistake in r11571 (Sql->SqlStmt) [ultramage]
|
* Fixed one more mistake in r11571 (Sql->SqlStmt) [ultramage]
|
||||||
|
@ -10025,7 +10025,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd)
|
|||||||
|
|
||||||
if( sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOROOM )
|
if( sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOROOM )
|
||||||
return;
|
return;
|
||||||
if (map[sd->bl.m].flag.novending) {
|
if( map[sd->bl.m].flag.novending || map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) {
|
||||||
clif_displaymessage (sd->fd, msg_txt(276)); // "You can't open shop on this map"
|
clif_displaymessage (sd->fd, msg_txt(276)); // "You can't open shop on this map"
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus
|
#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus
|
||||||
#include "../common/timer.h" // INVALID_TIMER
|
#include "../common/timer.h" // INVALID_TIMER
|
||||||
#include "battle.h" // battle_config
|
#include "battle.h" // battle_config
|
||||||
#include "map.h" // struct map_session_data
|
#include "map.h" // JOB_*, struct map_session_data
|
||||||
#include "status.h" // OPTION_*
|
#include "status.h" // OPTION_*
|
||||||
#include "unit.h" // unit_stop_attack(), unit_stop_walking()
|
#include "unit.h" // unit_stop_attack(), unit_stop_walking()
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ int status_set_sp(struct block_list *bl, unsigned int sp, int flag)
|
|||||||
|
|
||||||
int status_charge(struct block_list* bl, int hp, int sp)
|
int status_charge(struct block_list* bl, int hp, int sp)
|
||||||
{
|
{
|
||||||
if(!((bl)->type&BL_CONSUME))
|
if(!(bl->type&BL_CONSUME))
|
||||||
return hp+sp; //Assume all was charged so there are no 'not enough' fails.
|
return hp+sp; //Assume all was charged so there are no 'not enough' fails.
|
||||||
return status_damage(NULL, bl, hp, sp, 0, 3);
|
return status_damage(NULL, bl, hp, sp, 0, 3);
|
||||||
}
|
}
|
||||||
|
@ -237,12 +237,6 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) )
|
|
||||||
{
|
|
||||||
clif_displaymessage (sd->fd, msg_txt(276));
|
|
||||||
return; //Can't vend in novending mapflag maps.
|
|
||||||
}
|
|
||||||
|
|
||||||
// check number of items in shop
|
// check number of items in shop
|
||||||
if( count < 1 || count > MAX_VENDING || count > 2 + vending_skill_lvl )
|
if( count < 1 || count > MAX_VENDING || count > 2 + vending_skill_lvl )
|
||||||
{ // invalid item count
|
{ // invalid item count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user