[Resolved] Spawn Group Chances
Posted: Wed Nov 18, 2009 5:43 am
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!
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!