Browse Source

Fix Player Ready For Updates (DoF client also loads GM properties, speed, gm vision etc).

Image 3 years ago
parent
commit
775c8399fa

+ 1 - 0
EQ2/source/WorldServer/Player.cpp

@@ -54,6 +54,7 @@ Player::Player(){
 	spawn_index = 0;
 	info = 0;
 	movement_packet = 0;
+	fully_logged_in = false;
 	last_movement_activity = 0;
 	//speed = 0;
 	packet_num = 0;

+ 11 - 8
EQ2/source/WorldServer/client.cpp

@@ -970,12 +970,7 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
 	case OP_SysClient: {
 		LogWrite(OPCODE__DEBUG, 1, "Opcode", "Opcode 0x%X (%i): OP_SysClient", opcode, opcode);
 		LogWrite(CCLIENT__DEBUG, 0, "Client", "Client '%s' (%u) is ready for spawn updates.", GetPlayer()->GetName(), GetPlayer()->GetCharacterID());
-		GetPlayer()->SetFullyLoggedIn(true);
-
-		if (!ready_for_updates)
-			database.loadCharacterProperties(this);
-
-		ready_for_updates = true;
+		SetReadyForUpdates();
 		break;
 	}
 	case OP_MapRequest: {
@@ -1529,8 +1524,7 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
 			EQ2_16BitString str = packet->getType_EQ2_16BitString_ByName("signal");
 			if (str.size > 0) {
 				if (strcmp(str.data.c_str(), "sys_client_avatar_ready") == 0) {
-					GetPlayer()->SetFullyLoggedIn(true);
-					ready_for_updates = true;
+					SetReadyForUpdates();
 					GetPlayer()->SendSpawnChanges(true);
 				}
 				const char* zone_script = world.GetZoneScript(player->GetZone()->GetZoneID());
@@ -7498,6 +7492,15 @@ void Client::SearchStore(int32 page) {
 
 }
 
+void Client::SetReadyForUpdates() {
+	GetPlayer()->SetFullyLoggedIn(true);
+
+	if (!ready_for_updates)
+		database.loadCharacterProperties(this);
+
+	ready_for_updates = true;
+}
+
 void Client::SetReadyForSpawns(bool val) {
 	ready_for_spawns = val;
 	if (GetPlayer()->GetActivityStatus() > 0) {

+ 1 - 0
EQ2/source/WorldServer/client.h

@@ -146,6 +146,7 @@ public:
 	bool	IsReadyForSpawns(){ return ready_for_spawns; }
 	bool	IsReadyForUpdates() { return ready_for_updates; }
 	bool	IsZoning(){ return client_zoning; }
+	void	SetReadyForUpdates();
 	void	SetReadyForSpawns(bool val);
 	void	QueuePacket(EQ2Packet* app, bool attemptedCombine=false);
 	void	SendLoginInfo();