Browse Source

Removed redundant boolean for IsFullyLoggedIn, replaced with IsReadyForUpdatees

Emagi 1 year ago
parent
commit
aedc80a827

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

@@ -55,7 +55,6 @@ Player::Player(){
 	spawn_index = 1;
 	info = 0;
 	movement_packet = 0;
-	fully_logged_in = false;
 	last_movement_activity = 0;
 	//speed = 0;
 	packet_num = 0;
@@ -2987,13 +2986,6 @@ void Player::ClearEverything(){
 	spawn_pos_packet_list.clear();
 	pos_mutex.releasewritelock(__FUNCTION__, __LINE__);
 }
-
-bool Player::IsFullyLoggedIn() {
-	return fully_logged_in;
-}
-void Player::SetFullyLoggedIn(bool val) {
-	fully_logged_in = val;
-}
 bool Player::IsResurrecting(){
 	return resurrecting;
 }

+ 0 - 3
EQ2/source/WorldServer/Player.h

@@ -619,8 +619,6 @@ public:
 	int32	GetSpawnDeleteTime(int32 id);
 	void	ClearRemovalTimers();
 	void	ClearEverything();
-	bool	IsFullyLoggedIn();
-	void	SetFullyLoggedIn(bool val);
 	bool	IsResurrecting();
 	void	SetResurrecting(bool val);
 	int8	GetArrowColor(int8 spawn_level);
@@ -1092,7 +1090,6 @@ private:
 	Spawn*              combat_target;
 	int32				char_id;
 	bool				quickbar_updated;
-	bool				fully_logged_in;
 	bool				resurrecting;
 	PlayerInfo*			info;
 	vector<SpellBookEntry*> spells;

+ 1 - 3
EQ2/source/WorldServer/client.cpp

@@ -5763,7 +5763,7 @@ void Client::AddPendingQuestUpdate(int32 quest_id, int32 step_id, int32 progress
 }
 
 void Client::ProcessQuestUpdates() {
-	if(!GetPlayer()->IsFullyLoggedIn())
+	if(!IsReadyForUpdates())
 		return;
 
 	if (quest_pending_updates.size() > 0) {
@@ -9177,8 +9177,6 @@ void Client::SearchStore(int32 page) {
 }
 
 void Client::SetReadyForUpdates() {
-	GetPlayer()->SetFullyLoggedIn(true);
-
 	if (!ready_for_updates)
 		database.loadCharacterProperties(this);
 

+ 1 - 1
EQ2/source/WorldServer/zoneserver.cpp

@@ -1933,7 +1933,7 @@ Spawn* ZoneServer::FindSpawn(Player* searcher, const char* name){
 }
 
 void ZoneServer::AddChangedSpawn(Spawn* spawn) {
-	if (!spawn || (spawn->IsPlayer() && !spawn->info_changed && !spawn->vis_changed) || (spawn->IsPlayer() && ((Player*)spawn)->IsFullyLoggedIn() == false))
+	if (!spawn || (spawn->IsPlayer() && !spawn->info_changed && !spawn->vis_changed) || (spawn->IsPlayer() && ((Player*)spawn)->GetClient() && ((Player*)spawn)->GetClient()->IsReadyForUpdates() == false))
 		return;
 	
     MChangedSpawns.lock_shared();