From 09e154b0687a2ba69d5ce6f2456c61db86bc4dec Mon Sep 17 00:00:00 2001 From: zephyrus Date: Wed, 12 Aug 2009 21:44:02 +0000 Subject: - Optimization to instance system. * Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid. * Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name". * Moved all instance features to separated files. * Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h). * Added recomendations for scripts commands by Saithis. - Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chrif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index c725ff30a..0ab4aec51 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -20,6 +20,7 @@ #include "skill.h" #include "status.h" #include "homunculus.h" +#include "instance.h" #include "mercenary.h" #include "chrif.h" #include "quest.h" @@ -316,9 +317,9 @@ int chrif_sendmap(int fd) int i; ShowStatus("Sending maps to char server...\n"); // Sending normal maps, not instances - WFIFOHEAD(fd, 4 + map_instance_start * 4); + WFIFOHEAD(fd, 4 + instance_start * 4); WFIFOW(fd,0) = 0x2afa; - for(i = 0; i < map_instance_start; i++) + for(i = 0; i < instance_start; i++) WFIFOW(fd,4+i*4) = map[i].index; WFIFOW(fd,2) = 4 + i * 4; WFIFOSET(fd,WFIFOW(fd,2)); -- cgit v1.2.3-60-g2f50