<div class="users_online" style='position: absolute;margin-top: 20px;color: white;font-family: "Myriad Pro";font-size: 12px;'> <?php echo Server_status::online_users(); ?> users online</div>
online_users() need an edit, because counting users online is not the best way.Quote:
for fix user online in index (/views/index/index.php)
remplace line 31 with this:
PHP Code:<div class="users_online" style='position: absolute;margin-top: 20px;color: white;font-family: "Myriad Pro";font-size: 12px;'> <?php echo Server_status::online_users(); ?> users online</div>
$req = $this->db->prepare('SELECT sval FROM server_statistics WHERE skey="active_connections"');
Just look at Npc, Maps, Sessions, Characters, Portals, then explain me why I should create instances for others things ? What should be the benefits in creating instance for packet handling ?Quote:
Noone. You should understand how the emulator works and code it yourself.
And I just wonder, linkpad, you don't like creating instances?
I just checked some classes and all methods are static :confused:
I'm just trying to understand, it always sounds better to me to create an instance and set the Session once in the creation instead of passing it every handling. If you have tried both, which one is more efficient?Quote:
Just look at Npc, Maps, Sessions, Characters, Portals, then explain me why I should create instances for others things ? What should be the benefits in creating instance for packet handling ?
I'm a little bit confused, the Session is instanciated one time when the users connect, then I just parse the Session in packet handling I don't see any others methods I could doQuote:
I'm just trying to understand, it always sounds better to me to create an instance and set the Session once in the creation instead of passing it every handling. If you have tried both, which one is more efficient?
Dont get me wrong, I'm checking on a mobile text viewer so I haven't tried your code, neither saying anything bad about the code.
For example:Quote:
I'm a little bit confused, the Session is instanciated one time when the users connect, then I just parse the Session in packet handling I don't see any others methods I could do
It's that way because it use less ressource, here an example :Quote:
For example:
private static void RocketAttack(Session Session, ClientMessage Message)
DataRouter looks nice, just wonder why it's that way.
I just do the following in the Player class when a user logs in;
AttackManager = new AttackManager(this);
and handling would call like AttackManager.RocketAttack()
btw sorry for spamming the thread.