summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-02-21 00:20:27 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-02-21 00:20:27 +0000
commitd9dd828fb28802edf9573179826fdbaca50e4828 (patch)
tree095124abd128534c9b4262ab10d5d0cb0564fe72
parentc77869e7bf80ddec31cf48b77148c15d0ccaa48f (diff)
downloadhercules-d9dd828fb28802edf9573179826fdbaca50e4828.tar.gz
hercules-d9dd828fb28802edf9573179826fdbaca50e4828.tar.bz2
hercules-d9dd828fb28802edf9573179826fdbaca50e4828.tar.xz
hercules-d9dd828fb28802edf9573179826fdbaca50e4828.zip
Adjusted the 'rare drop announce' code to only process if there's a valid mvp_sd.
This eliminates "??? won item" announces that occured when there were no damagelog entries and the killer src was NULL. Examples include @killmonster use, and cases where a homunculus gets killed while attacking, and its delayed damage kills the target. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14249 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/mob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index de9b66ba1..a0066bfa3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2220,12 +2220,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
ditem = mob_setdropitem(md->db->dropitem[i].nameid, 1);
//A Rare Drop Global Announce by Lupus
- if( drop_rate <= battle_config.rare_drop_announce )
+ if( mvp_sd && drop_rate <= battle_config.rare_drop_announce )
{
struct item_data *i_data;
char message[128];
i_data = itemdb_search(ditem->item_data.nameid);
- sprintf (message, msg_txt(541), (mvp_sd?mvp_sd->status.name:"???"), md->name, i_data->jname, (float)drop_rate/100);
+ sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, (float)drop_rate/100);
//MSG: "'%s' won %s's %s (chance: %0.02f%%)"
intif_broadcast(message,strlen(message)+1,0);
}