Zone idling
How do you go about altering this piece of code so that i can let most zones idle and others i (input) choose not ? c++ not my thing :p
void EntityList::MobProcess() {
#ifdef IDLE_WHEN_EMPTY
if(numclients < 1)
return;
#endif
_ZP(EntityList_MobProcess);
LinkedListIterator<Mob*> iterator(mob_list);
iterator.Reset();
while(iterator.MoreElements())
{
if(!iterator.GetData())
{
iterator.Advance();
continue;
}
if(!iterator.GetData()->Process()){
Mob* mob=iterator.GetData();
if(mob->IsNPC())
entity_list.RemoveNPC(mob->CastToNPC()->GetID());
#ifdef BOTS
else if(mob->IsBot()) {
entity_list.RemoveBot(mob->CastToBot()->GetID());
}
#endif
else{
#ifdef WIN32
struct in_addr in;
in.s_addr = mob->CastToClient()->GetIP();
cout << "Dropping client: Process=false, ip=" << inet_ntoa(in) << ", port=" << mob->CastToClient()->GetPort() << endl;
#endif
zone->StartShutdownTimer();
Group *g = GetGroupByMob(mob);
if(g) {
LogFile->write(EQEMuLog::Error, "About to delete a client still in a group.");
g->DelMember(mob);
}
Raid *r = entity_list.GetRaidByClient(mob->CastToClient());
if(r) {
LogFile->write(EQEMuLog::Error, "About to delete a client still in a raid.");
r->MemberZoned(mob->CastToClient());
}
entity_list.RemoveClient(mob->GetID());
}
iterator.RemoveCurrent();
}
else
iterator.Advance();
}
}
__________________
--You start casting " Extra Content"--
--You Hit your database for 9.999 Damage, you have slain your Server--
-- Please wait reinstalling!--/Sigh
|