Since ACE is completely removed,can you guys share a better way for this function>? EDIT 2
Ok i managed to convert most string,all it left is something that i never met before
void spawnZombies(Creature* creature, uint32 count)
{
zombiesSpawned = zombiesSpawned + count;
for (uint32 i = 1; i <= count; i++){
ACE_Based::Sleep(10);
uint32 NPC_ID = rand() % 6 + 1;
switch ((rand() % 6 + 1))
{
case 1:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C1);
break;
case 2:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C2);
break;
case 3:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C3);
break;
case 4:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C4);
break;
case 5:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C5);
break;
case 6:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C6);
break;
default: TC_LOG_INFO(“misc”,“spawn default”); break;
}
}
}
Double-click on the error C2653 and as +Rochet2 said, remove the line with ACE. Better yet, replace it with another sleep function. In C++ 11 you can use standard libraries, or you can use Boost since Trinity replaced ACE with that.
Well that may be but my intent wasn’t to provide debug support for the script. I was merely suggesting a replacement for the now deprecated ACE. It’s up to the OP to decide wether he uses it or not.