VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Bugs Server Bugs Server Bugs (Closed)
  • Search

Is_online Attribute error

Closed Server Bugs

Moderators: Community Managers, Developers

Locked
  • Print view
Advanced search
3 posts • Page 1 of 1
jimbo
Posts: 89
Joined: Fri Aug 01, 2014 3:17 am
Location: Perth, Australia
Is_online Attribute error
  • Quote

Post by jimbo » Sat Nov 29, 2014 2:33 am

Hi
While working on getting Friends to appear online/offline - I've come up with a bug where the 'is_online" attribute is not getting set correctly.

Scenario - if I start my server up (version 850) and log my toon in - the column is_online in character table is set to 'true' - all good
If I then log off - it is set to 'false' - all good.
If I log back in (without the server being restarted) - it stays as false.

It seems lie the code in ChunkServer::HandleClientAuthConfirm detects that the character
has already been loaded into the server (i.e it remembers) so it does not execute the code that normally sets the 'is_online" value.

A suggested fix for this is as shown below in blue ....

shared_ptr<WorldCharacter> character;
if (name){
string str_name = name;
character = character_list.GetCharacter(str_name);
if (character){
client->SetCharacterId(character->GetCharacterID());
client->SetCharacter(character);
database.ToggleIsOnline(character->GetCharacterID(), true);
}
else {
auto c_list = unreal_channel_list.GetCharacterChannelList(client->GetAccountID());
if (c_list)
c_list->IncrementCharCount();
character = make_shared<WorldCharacter>();
database.LoadCharacter(database.GetCharacterID(name), character.get());
client->SetCharacterId(character->GetCharacterID());
client->SetCharacter(character);
character_list.SetCharacter(str_name, character);
}
character->SetZoning(true);
character->SetProcessingAuthConfirmPacket(true);

Jim
Top

User avatar
Ratief
Developer
Developer
Posts: 393
Joined: Thu Feb 06, 2014 8:21 am
Re: Is_online Attribute error
  • Quote

Post by Ratief » Sat Nov 29, 2014 2:00 pm

I actually found this issue as the entire client must be reinitialized when this happens. It happens when you log in before your character object is unloaded from the server. Also, that section of code is pretty messed up as the character object is ALWAYS loaded at that point. The ChunkServer will never load a character object.

I have a fix in mind, but I need to get this character sheet code committed first.
Top

Lokked
Principle Developer
Principle Developer
Posts: 600
Joined: Wed Aug 06, 2014 3:15 pm
Re: Is_online Attribute error
  • Quote

Post by Lokked » Sat Nov 29, 2014 7:43 pm

I'm assuming you are logging back in right away. If you actually allow the character object to be destroyed (it takes almost a minute after a Force Close), everything will work normally.

This would fix a lot of things, if either:
- We cause the character object to be destroyed as soon as the Client objects are destroyed.
Or
- We properly define a list of Object fields that should be reset on a WorldCharacter and Client object when logging in for the first time, and do this.


This might help for now:
Search for these defines and change their values to what I've listed below:
#define CHECK_CHARACTER_DELETES 1000 // This causes character object checks every second instead of every 30 seconds.
#define CHARACTER_DELETION_DELAY_MS 0 // This causes the character object to be deleted as soon as it's on the Delete list

John, you could try this on New Telon, but I don't know how inappropriate this would be on a server with latency. I only did this on my Server, as it causes the character object (and thus the PC spawn itself) to leave the world as soon as the Client object is destroyed, which is what I believe should happen.
Top


Locked
  • Print view

3 posts • Page 1 of 1

Return to “Server Bugs (Closed)”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD