소스 검색

- Fixed loot pending requests for clients that come from LUA scripts (eg. not loot chests from corpses)
* Loot window now updates
* Loot window now closes when all items are looted
* This was prominently seen in the far journey quest getting Waulon's hat from the spawn chest
- Disabled sending AA's to older clients incl KoS client since we don't support AA yet

Emagi 6 달 전
부모
커밋
a41e6f1bf8
2개의 변경된 파일27개의 추가작업 그리고 8개의 파일을 삭제
  1. 11 6
      EQ2/source/WorldServer/Commands/Commands.cpp
  2. 16 2
      EQ2/source/WorldServer/client.cpp

+ 11 - 6
EQ2/source/WorldServer/Commands/Commands.cpp

@@ -11569,7 +11569,8 @@ void Commands::Command_AchievementAdd(Client* client, Seperator* sep) {
 	else {
 		client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Usage:  /useability {spell_id} [spell_tier]");
 	}
-	master_aa_list.DisplayAA(client, 0, 0);
+	if(client->GetVersion() > 561)
+		master_aa_list.DisplayAA(client, 0, 0);
 }
 
 void Commands::Command_Editor(Client* client, Seperator* sep) {
@@ -11657,7 +11658,8 @@ void Commands::Switch_AA_Profile(Client* client, Seperator* sep) {
 		if (sep && sep->IsSet(0)) {
 		string type = sep->arg[0];
 		int8 newtemplate = atoul(sep->arg[1]);
-		master_aa_list.DisplayAA(client, newtemplate, 1);
+		if(client->GetVersion() > 561)
+			master_aa_list.DisplayAA(client, newtemplate, 1);
 	}
 }
 void Commands::Get_AA_Xml(Client* client, Seperator* sep) {
@@ -11724,7 +11726,8 @@ void Commands::Add_AA(Client* client, Seperator* sep) {
 	else {
 		client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Usage:  /useability {spell_id} [spell_tier]");
 	}
-	master_aa_list.DisplayAA(client, 0, 0);
+	if(client->GetVersion() > 561)
+		master_aa_list.DisplayAA(client, 0, 0);
 }
 void Commands::Commit_AA_Profile(Client* client, Seperator* sep) {
 	PrintSep(sep, "Commit_AA_Profile");
@@ -11736,7 +11739,8 @@ void Commands::Commit_AA_Profile(Client* client, Seperator* sep) {
 void Commands::Begin_AA_Profile(Client* client, Seperator* sep) {
 	PrintSep(sep, "Begin_AA_Profile");
 	if (sep && sep->IsSet(0)) {
-		master_aa_list.DisplayAA(client, 100, 2);
+		if(client->GetVersion() > 561)
+			master_aa_list.DisplayAA(client, 100, 2);
 	}
 }
 void Commands::Back_AA(Client* client, Seperator* sep) {
@@ -11754,8 +11758,9 @@ void Commands::Remove_AA(Client* client, Seperator* sep) {
 
 void Commands::Cancel_AA_Profile(Client* client, Seperator* sep) {
 	MasterAAList master_aa_list;
-	PrintSep(sep, "Cancel_AA_Profile");
-	master_aa_list.DisplayAA(client, 0, 0);
+	PrintSep(sep, "Cancel_AA_Profile");	
+	if(client->GetVersion() > 561)
+		master_aa_list.DisplayAA(client, 0, 0);
 
 }
 void Commands::Save_AA_Profile(Client* client, Seperator* sep) {

+ 16 - 2
EQ2/source/WorldServer/client.cpp

@@ -2914,6 +2914,7 @@ void Client::HandleLootItemRequestPacket(EQApplicationPacket* app) {
 			Item* item = nullptr;
 			vector<Item*>* items = player->GetPendingLootItems(loot_id);
 			if (items) {
+				int32 items_looted = 0;
 				int32 item_id = packet->getType_int32_ByName("item_id_0");
 				for (int32 i = 0; i < items->size(); i++) {
 					Item* master_item = items->at(i);
@@ -2929,6 +2930,9 @@ void Client::HandleLootItemRequestPacket(EQApplicationPacket* app) {
 									if (outapp)
 										QueuePacket(outapp);
 								}
+								if(master_item->details.item_id == item_id) {
+									break;
+								}
 							}
 						}
 
@@ -2936,6 +2940,14 @@ void Client::HandleLootItemRequestPacket(EQApplicationPacket* app) {
 							break;
 					}
 				}
+				if((loot_all && !item_id || loot_all && item_id && items->size() == 1) || items->size() < 1) {
+					CloseLoot(loot_id);
+				}
+				else {
+					vector<Item*>* items = player->GetPendingLootItems(loot_id);
+					SendLootResponsePacket(spawn->GetLootCoins(), items, spawn, true);
+					safe_delete(items);
+				}
 				safe_delete(items);
 				safe_delete(packet);
 				return;
@@ -5480,8 +5492,6 @@ void Client::SendLootResponsePacket(int32 total_coins, vector<Item*>* items, Spa
 
 		SimpleMessage(type, message.c_str());
 	}
-	if (!items || items->size() == 0)
-		CloseLoot(entity->GetID());
 
 	entity->StartLootTimer(GetPlayer());
 
@@ -5618,6 +5628,10 @@ void Client::SendLootResponsePacket(int32 total_coins, vector<Item*>* items, Spa
 		}
 		safe_delete_array(data);
 		safe_delete(packet);
+		
+		if (!items || items->size() == 0)
+			CloseLoot(entity->GetID());
+		
 	}
 
 }