summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-05 17:59:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-05 17:59:28 +0000
commitf97561eb2ee94d591170e1f578c0cf736669b210 (patch)
tree53d275f73c8848a1d59d642d032a745263015a76 /src/map/chrif.c
parentf7cf35aaad2512e7f329954946aac5e2a24cdfb7 (diff)
downloadhercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.gz
hercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.bz2
hercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.xz
hercules-f97561eb2ee94d591170e1f578c0cf736669b210.zip
- Fixed skill_unitsetting using layout->count for the for instead of group->count
- Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly increase dex/agi by 40% per level. - Fixed char-sql server not deleting character variables git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6984 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index f9a9e7620..ff88945a0 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -312,7 +312,7 @@ int chrif_removemap(int fd){
*/
int chrif_changemapserver(struct map_session_data *sd, short map, int x, int y, int ip, short port)
{
- int /*i, */s_ip=0;
+ int s_ip;
nullpo_retr(-1, sd);
@@ -323,13 +323,11 @@ int chrif_changemapserver(struct map_session_data *sd, short map, int x, int y,
pc_authfail(sd);
return -1;
}
-
- s_ip = 0;
- //for(i = 0; i < fd_max; i++)
- // if (session[i] && session[i]->session_data == sd) {
- s_ip = session[sd->fd]->client_addr.sin_addr.s_addr; // For what you're looping it? [Lance]
- // break;
- // }
+
+ if (sd->fd && sd->fd < fd_max && session[sd->fd])
+ s_ip = session[sd->fd]->client_addr.sin_addr.s_addr;
+ else //Not connected? Can't retrieve IP
+ s_ip = 0;
WFIFOHEAD(char_fd, 35);
WFIFOW(char_fd, 0) = 0x2b05;