diff options
author | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-20 14:38:18 +0000 |
---|---|---|
committer | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-20 14:38:18 +0000 |
commit | 2630f7d1fa82ff5a129efca35094da6b79a53fd0 (patch) | |
tree | 17b23dc7591e1d6f3bbf994067d9cc4eea72ee12 /src/map/atcommand.c | |
parent | b22297197f06ac00eecf38fe98d7b9fdb5478a8a (diff) | |
download | hercules-2630f7d1fa82ff5a129efca35094da6b79a53fd0.tar.gz hercules-2630f7d1fa82ff5a129efca35094da6b79a53fd0.tar.bz2 hercules-2630f7d1fa82ff5a129efca35094da6b79a53fd0.tar.xz hercules-2630f7d1fa82ff5a129efca35094da6b79a53fd0.zip |
Removed use of emote packet to send red mute icon.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@270 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b93fc3c34..2739a5cf8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -565,6 +565,18 @@ char * job_name(int class) { return "Unknown Job"; } +// compare function for sorting high to lowest +int hightolow_compare (const void * a, const void * b) +{ + return ( *(int*)b - *(int*)a ); +} + +// compare function for sorting lowest to highest +int lowtohigh_compare (const void * a, const void * b) +{ + return ( *(int*)a - *(int*)b ); +} + //----------------------------------------------------------- // Return the message string of the specified number by [Yor] //----------------------------------------------------------- @@ -1600,11 +1612,6 @@ int atcommand_whogm( return 0; } -int compare (const void * a, const void * b) -{ - return ( *(int*)b - *(int*)a ); -} - int atcommand_whozeny( const int fd, struct map_session_data* sd, const char* command, const char* message) @@ -1639,7 +1646,7 @@ int atcommand_whozeny( } } - qsort(zeny, count, sizeof(int), compare); + qsort(zeny, count, sizeof(int), hightolow_compare); for (c = 0; c < count && c < 50; c++) { if(!zeny[c]) continue; @@ -1667,6 +1674,8 @@ int atcommand_whozeny( return 0; } + +// cause random emote on all online players [Valaris] int atcommand_happyhappyjoyjoy( const int fd, struct map_session_data* sd, const char* command, const char* message) @@ -1677,7 +1686,9 @@ int atcommand_happyhappyjoyjoy( for (i = 0; i < fd_max; i++) { if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth) { - e=rand()%40; + e=rand()%40; + if(e==34) + e = 0; clif_emotion(&pl_sd->bl,e); } } |