summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-11 15:01:00 +0100
committerHaru <haru@dotalux.com>2013-12-11 15:03:52 +0100
commit68d6c8bc110bbecd39c47b0e00445b8b4b5eb278 (patch)
tree98804fe393e6559399e5ff0c86a73026c889a1f8 /src/map/map.c
parent27cf11151de917892b22794c1aa798620a484850 (diff)
downloadhercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.gz
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.bz2
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.xz
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.zip
Corrected some local 'mapindex' variables shadowing the global one
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/map.c b/src/map/map.c
index d70f95dff..b68a1f6a5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2339,12 +2339,12 @@ int16 map_mapname2mapid(const char* name) {
/*==========================================
* Returns the map of the given mapindex. [Skotlex]
*------------------------------------------*/
-int16 map_mapindex2mapid(unsigned short mapindex) {
+int16 map_mapindex2mapid(unsigned short map_index) {
- if (!mapindex || mapindex > MAX_MAPINDEX)
+ if (!map_index || map_index > MAX_MAPINDEX)
return -1;
- return map->index2mapid[mapindex];
+ return map->index2mapid[map_index];
}
/*==========================================
@@ -2816,15 +2816,15 @@ int map_eraseallipport(void) {
/*==========================================
* Delete mapindex from db of another map server
*------------------------------------------*/
-int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
+int map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) {
struct map_data_other_server *mdos;
- mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)mapindex);
+ mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)map_index);
if(!mdos || mdos->cell) //Map either does not exists or is a local map.
return 0;
if(mdos->ip==ip && mdos->port == port) {
- uidb_remove(map->map_db,(unsigned int)mapindex);
+ uidb_remove(map->map_db,(unsigned int)map_index);
aFree(mdos);
return 1;
}