Group functions

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::thread::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;
}
}
}

http://s1.postimg.org/kzk3homfj/New_Bitmap_Image.jpg

As I said to

you should remove that line. (the one with ace)

The guy who made that had no idea what he was doing. Or then he left that there on purpose or by accident.

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.

std::this_thread::sleep_for(std::chrono::milliseconds(x));

// or

boost::this_thread::sleep(boost::posix_time::milliseconds(x));

Of course you’ll need to research which headers to include, wether they work on both Windows and Linux and which one is the best choice.

No smite. You don’t want to sleep the thread when you spawn the npcs.

Sleeping halts the whole thread making ppl lag for 10 ms for no reason.

The code is a mistake. It doesn’t even look like it was meant as a delay for spawning.

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.