diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/mmo.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h index 0abae6092..7df52e450 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -120,7 +120,7 @@ #define MAX_SLOTS 4 //Max amount of a single stacked item #define MAX_AMOUNT 30000 -#define MAX_ZENY 1000000000 +#define MAX_ZENY INT_MAX //Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default ) #define MAX_BANK_ZENY INT_MAX diff --git a/src/map/mob.c b/src/map/mob.c index 8d38fead7..53ad87912 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2402,7 +2402,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { * so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it, * thus why we're unsure on how to best place the setting) */ /* temp, will not be hardcoded for long thudu. */ - if (it->nameid == ITEMID_GOLD_KEY77 || it->nameid == ITEMID_SILVER_KEY77) /* for when not hardcoded: add a check on mvp bonus drop as well */ + // TODO: This should be a field in the item db. + if (mvp_sd != NULL + && (it->nameid == ITEMID_GOLD_KEY77 || it->nameid == ITEMID_SILVER_KEY77)) /* for when not hardcoded: add a check on mvp bonus drop as well */ clif->item_drop_announce(mvp_sd, it->nameid, md->name); // Announce first, or else ditem will be freed. [Lance] diff --git a/src/map/script.c b/src/map/script.c index 0fc4a5a65..007c6e0e1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16845,8 +16845,12 @@ BUILDIN(unittalk) { bl = map->id2bl(unit_id); if( bl != NULL ) { struct StringBuf sbuf; + char blname[NAME_LENGTH]; StrBuf->Init(&sbuf); - StrBuf->Printf(&sbuf, "%s : %s", clif->get_bl_name(bl), message); + safestrncpy(blname, clif->get_bl_name(bl), sizeof(blname)); + if(bl->type == BL_NPC) + strtok(blname, "#"); + StrBuf->Printf(&sbuf, "%s : %s", blname, message); clif->disp_overhead(bl, StrBuf->Value(&sbuf)); StrBuf->Destroy(&sbuf); } |