I tried to change back for the time being from the list_special_spawns to list_spawnareas
-
- MYSQL_ROW row;
- MYSQL_RES *result = DB->QStore("SELECT id,map,montype,min,max,respawntime,points, spawntype, triggermontype, triggerammount, agressive, areatrigger, lim, spawnk FROM list_spawnareas");
- //MYSQL_RES *result = DB->QStore("SELECT id, map, montype, min, max, respawntime, x, y, radius, spawntype, triggermontype, triggerammount, agressive, areatrigger, lim, spawnk, aip, refvar, refval FROM list_special_spawns");
-
- if(result == NULL)
- {
- DB->QFree( );
- return false;
- }
- Log( MSG_INFO, "Loaded database data" );
-
I unremarked the first one for the spawnareas and remarked the one with the special_spawns
All compiled ok, but when executed the world server it crashed at this part
Wed Dec 12 17:40:59 2012 - Loading NPC Data
Wed Dec 12 17:40:59 2012 - Loading Telegates data
Wed Dec 12 17:40:59 2012 - Loading RespawnZones data
Wed Dec 12 17:40:59 2012 - Loading SpawnZones data
Wed Dec 12 17:40:59 2012 - Loaded database data
This is where it stopped
Did something get removed from the code as I dont see anymore remarked out in there to re-enable the spawnareas at the moment
-
- bool CWorldServer::LoadMonsterSpawn( )
- {
- Log( MSG_INFO, "Loading SpawnZones data" );
- //clear the respawns data first
-
- for(int i=0;i<MapList.Map.size();i++)
- {
- MapList.Index[i]->MonsterSpawnList.clear();
- }
- MYSQL_ROW row;
- MYSQL_RES *result = DB->QStore("SELECT id,map,montype,min,max,respawntime,points, spawntype, triggermontype, triggerammount, agressive, areatrigger, lim, spawnk FROM list_spawnareas");
- //MYSQL_RES *result = DB->QStore("SELECT id, map, montype, min, max, respawntime, x, y, radius, spawntype, triggermontype, triggerammount, agressive, areatrigger, lim, spawnk, aip, refvar, refval FROM list_special_spawns");
-
- if(result == NULL)
- {
- DB->QFree( );
- return false;
- }
- Log( MSG_INFO, "Loaded database data" );
- while(row = mysql_fetch_row(result))
- {
- bool flag = true;
- char* tmp;
- CSpawnArea* thisspawn = new (nothrow) CSpawnArea;
- if(thisspawn==NULL)
- {
- Log(MSG_ERROR, "Error allocing memory" );
- DB->QFree( );
- return false;
- }
- thisspawn->id = atoi(row[0]);
- if(thisspawn->id > GServer->maxSpawnId)
- GServer->maxSpawnId = thisspawn->id;
- thisspawn->map = atoi(row[1]);
- thisspawn->montype = atoi(row[2]);
- thisspawn->min = 0;//atoi(row[3]);
- thisspawn->max = atoi(row[4]);
- thisspawn->respawntime = atoi(row[5]);
- thisspawn->point.x = atoi(row[6]);
- if(thisspawn->map == 3)
- thisspawn->point.x -= 100; //for some reason some JP map has an X offset.
- thisspawn->point.y = atoi(row[7]);
- thisspawn->radius = atoi(row[8]);
- if (thisspawn->respawntime == 0)
- thisspawn->respawntime=5;
- thisspawn->amon = 0;
- thisspawn->lastRespawnTime = clock();
- thisspawn->type = atoi(row[9]);
- thisspawn->triggertype = atoi(row[10]);
- thisspawn->triggeramount = atoi(row[11]);
- thisspawn->aggressive = atoi(row[12]);
- thisspawn->typeoftrigger = atoi(row[13]);
- thisspawn->limit = atoi(row[14]);
- thisspawn->spawnkey = atoi(row[15]);
- thisspawn->AI = atoi(row[16]);
- thisspawn->RefVar = atoi(row[17]);
- thisspawn->RefVal = atoi(row[18]);
- thisspawn->triggercount = 0;
- //if(thisspawn->id >= 10000) //tower defense spawn
- // thisspawn->triggercount = 10000; //disables the spawn until it is reset to 0
- //if(flag)
- //{
- thisspawn->thisnpc = GetNPCDataByID( thisspawn->montype );
- if(thisspawn->thisnpc == NULL)
- {
- Log( MSG_WARNING, "Invalid montype - Spawn %i will not be added", thisspawn->id );
- delete thisspawn;
- continue;
- }
- MapList.Index[thisspawn->map]->MonsterSpawnList.push_back( thisspawn );
- //}
- }
- DB->QFree( );
- return true;
- }
-
-
I'm still trying to see what is wrong, I would think it is some different between the 2 lines, but have not seen it yet.
Thank you.