Added several warning messages (#4062)
* enablenpc / disablenpc / hideoffnpc / hideonnpc now display the npc source when the npc named doesn't exist * Added the NPC source to status_set_viewdata when no view data has been found * Added export_deprecated_constant3 to display the constant name replacing the deprecated * Removed the debug message from `@ warp` when the map name is wrong * Added clif_name_area to UMOB_LEVEL on setunitdata and a capvalue to UPET_HUNGER * areamonster now checks if the monster ID exists Thanks to @Normynator and @aleos89 for the review!
This commit is contained in:
@@ -233,14 +233,14 @@ int npc_enable_sub(struct block_list *bl, va_list ap)
|
||||
/*==========================================
|
||||
* Disable / Enable NPC
|
||||
*------------------------------------------*/
|
||||
int npc_enable(const char* name, int flag)
|
||||
bool npc_enable(const char* name, int flag)
|
||||
{
|
||||
struct npc_data* nd = npc_name2id(name);
|
||||
|
||||
if (nd==NULL)
|
||||
{
|
||||
ShowError("npc_enable: Attempted to %s a non-existing NPC '%s' (flag=%d).\n", (flag&3) ? "show" : "hide", name, flag);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flag&1) {
|
||||
@@ -267,7 +267,7 @@ int npc_enable(const char* name, int flag)
|
||||
if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) )// check if player standing on a OnTouchArea
|
||||
map_foreachinallarea( npc_enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd );
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
|
||||
Reference in New Issue
Block a user