Page 1 of 1

[Resolved] Spawn Group Chances

Posted: Wed Nov 18, 2009 5:43 am
by bolly
Hey all,

Not tried this before but was messing with spawn groups

I have two npcs both with individual spawn groups that are associated

repopping will only show one - fantastic!

now i want to set the chances but it seems almost 50/50

i targetted both groups and did a /spawn group chance 0.17 and /spawn group chance 0.83 for each one (is that right or should it be 17/83?)

I checked my location group chance table to find nothing in there so not sure if anything is up

bool WorldDatabase::SetGroupSpawnChance(int32 id, float chance){
Query query;
query.RunQuery2(Q_UPDATE, "update spawn_location_group_chances set percentage=%f where group_id = %lu", chance, id);
if(query.GetErrorNumber() && query.GetError() && query.GetErrorNumber() < 0xFFFFFFFF){
LogFile->write(EQEMuLog::Error, "Error in SetGroupSpawnChance query '%s': %s", query.GetQuery(), query.GetError());
return false;
}
return true;
}

should it be a replace into or is another command doing it?

cheers!

Re: Spawn Group Chances

Posted: Sat Nov 21, 2009 8:16 am
by LethalEncounter
Ahh good catch, guess it wasn't used enough for anyone to notice :P Fixed now and will appear on SVN tomorrow.

Thanks!

Re: Spawn Group Chances

Posted: Sat Nov 21, 2009 12:47 pm
by bolly
awesome thanks!