Group functions

Since ACE is completely removed,can you guys share a better way for this function>?
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++){
uint32 NPC_ID = rand() % 6 + 1;
switch ((rand() % 6 + 1))
case 1:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C1);
case 2:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C2);
case 3:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C3);
case 4:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C4);
case 5:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C5);
case 6:
creature->SummonCreature(ZOMBIE_NPCS[NPC_ID], Spawn_C6);
default: TC_LOG_INFO(“misc”,“spawn default”); break;

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.


// or


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.