|
||
|
|||||||
| Modification Suggestions This is where you can suggest a modifcation to RunUO! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Nov 2004
Posts: 16
|
If possible, could there be a change to the Region.GetPlayerCount() method so that it will only count players, not staff. It is a problem that when a staff member goes to the gauntlet, he will often trigger an increased spawn count. This is quite annoying for players, but it also effectively notifies the players that a staff member is watching them.
If there is ever a need to count staff and player together in a regions, could this method take a boolean or could a second method be added so you could count both with/without staff. Since core modifications are discouraged for support reasons, it would be very handy for the RUNUO team fix this in the region code. |
|
|
|
|
|
#2 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
Just make a RegionUtility class, and it it write this method yourself. It'd be pretty simple.
something like Code:
public static int CountPlayersInRegion(Region region, bool countStaff)
{
int count = 0;
foreach( Mobile m in World.Mobiles.Values )
{
if( m != null && m.Player && m.Region == region )
{
if(((PlayerMobile)m).AccessLevel != AccessLevel.Player && !countStaff)
continue;
count++;
}
}
return count;
}
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#3 (permalink) |
|
Newbie
Join Date: Nov 2004
Posts: 16
|
Jeff, thanks for the post. I do realize it can be worked around, however depending on the player count and the slice interval I can see this iteration could be pretty inefficient compared to having this change made in the core Region.cs code.
I just wanted to enter it as a suggestion for to consideration, since hidden staff should probably not trigger spawn count increases whenever they enter the Gauntlet. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|