[Resolved] Spawn Group Chances

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
bolly
Retired
Posts: 389
Joined: Mon Sep 21, 2009 3:03 pm
Location: Leeds, UK

[Resolved] Spawn Group Chances

Post by bolly » 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!
Last edited by bolly on Sat Nov 21, 2009 12:48 pm, edited 1 time in total.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawn Group Chances

Post by LethalEncounter » Sat Nov 21, 2009 8:16 am

Ahh good catch, guess it wasn't used enough for anyone to notice :P Fixed now and will appear on SVN tomorrow.

Thanks!

bolly
Retired
Posts: 389
Joined: Mon Sep 21, 2009 3:03 pm
Location: Leeds, UK

Re: Spawn Group Chances

Post by bolly » Sat Nov 21, 2009 12:47 pm

awesome thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests