9
3
Prechádzať zdrojové kódy

Fixed bug that caused the server to not be compilable on Linux

LethalEncounter 4 rokov pred
rodič
commit
81bd804af2

+ 1 - 1
EQ2/source/WorldServer/Bots/BotCommands.cpp

@@ -591,7 +591,7 @@ void Commands::Command_Bot_Inv(Client* client, Seperator* sep) {
 				Item* item = bot->GetEquipmentList()->GetItem(i);
 				if (item) {
 					//\\aITEM %u %u:%s\\/a
-					item_list += to_string(i) + ":\t" + item->CreateItemLink(GetVersion(), true) + "\n";
+					item_list += to_string(i) + ":\t" + item->CreateItemLink(client->GetVersion(), true) + "\n";
 				}
 			}
 

+ 2 - 2
EQ2/source/WorldServer/GroundSpawn.cpp

@@ -381,7 +381,7 @@ void GroundSpawn::ProcessHarvest(Client* client) {
 						item->details.count = reward_total;
 
 						// chat box update for normal item (todo: verify output text)
-						client->Message(CHANNEL_HARVESTING, "You %s %i %s from the %s.", GetHarvestMessageName(true).c_str(), item->details.count, item->CreateItemLink(GetVersion(), true).c_str(), GetName());
+						client->Message(CHANNEL_HARVESTING, "You %s %i %s from the %s.", GetHarvestMessageName(true).c_str(), item->details.count, item->CreateItemLink(client->GetVersion(), true).c_str(), GetName());
 						// add Normal item to player inventory
 						client->AddItem(item);
 						//Check if the player has a harvesting quest for this
@@ -415,7 +415,7 @@ void GroundSpawn::ProcessHarvest(Client* client) {
 								client->GetPlayer()->UpdatePlayerStatistic(STAT_PLAYER_RARES_HARVESTED, item_rare->details.count);
 
 								// chat box update for rare item (todo: verify output text)
-								client->Message(CHANNEL_HARVESTING, "You %s %i %s from the %s.", GetHarvestMessageName(true).c_str(), item_rare->details.count, item->CreateItemLink(GetVersion(), true).c_str(), GetName());
+								client->Message(CHANNEL_HARVESTING, "You %s %i %s from the %s.", GetHarvestMessageName(true).c_str(), item_rare->details.count, item->CreateItemLink(client->GetVersion(), true).c_str(), GetName());
 								// add Rare item to player inventory
 								client->AddItem(item_rare);
 								//Check if the player has a harvesting quest for this

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

@@ -3095,7 +3095,6 @@ int EQ2Emu_lua_OfferQuest(lua_State* state) {
 				lua_interface->LogError("%s: LUA OfferQuest command error: new Quest() failed.", lua_interface->GetScriptName(state));
 			}
 			if (client && quest) {
-				client->AddPendingQuest(quest);
 				if (npc)
 					quest->SetQuestGiver(npc->GetDatabaseID());
 				else

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

@@ -2012,7 +2012,7 @@ vector<EQ2Packet*> Player::EquipItem(int16 index, int16 version, int8 slot_id) {
 
 					LogWrite(MISC__TODO, 1, "TODO", "Send popup text in red 'Some of your equipment is broken!'\n\t(%s, function: %s, line #: %i)", __FILE__, __FUNCTION__, __LINE__);
 
-					client->Message(CHANNEL_COLOR_RED, "Your %s is worn out and will not be effective until repaired.", item->CreateItemLink(GetVersion(), true).c_str());
+					client->Message(CHANNEL_COLOR_RED, "Your %s is worn out and will not be effective until repaired.", item->CreateItemLink(client->GetVersion(), true).c_str());
 				}
 			}
 			packets.push_back(equipment_list.serialize(version, this));

+ 3 - 3
EQ2/source/WorldServer/Transmute.cpp

@@ -221,7 +221,7 @@ void Transmute::CompleteTransmutation(Client* client, Player* player) {
 		if (item2) item2 = new Item(item2);
 	}
 
-	client->Message(89, "You transmute %s and create: ", item->CreateItemLink(GetVersion(), false).c_str());
+	client->Message(89, "You transmute %s and create: ", item->CreateItemLink(client->GetVersion(), false).c_str());
 
 	player->item_list.RemoveItem(item, true);
 
@@ -232,7 +232,7 @@ void Transmute::CompleteTransmutation(Client* client, Player* player) {
 
 	if (item1) {
 		item1->details.count = 1;
-		client->Message(89, "     %s", item1->CreateItemLink(GetVersion(), false).c_str());
+		client->Message(89, "     %s", item1->CreateItemLink(client->GetVersion(), false).c_str());
 		client->AddItem(item1);
 
 		if (packet) {
@@ -248,7 +248,7 @@ void Transmute::CompleteTransmutation(Client* client, Player* player) {
 
 	if (item2) {
 		item2->details.count = 1;
-		client->Message(89, "     %s", item2->CreateItemLink(GetVersion(), false).c_str());
+		client->Message(89, "     %s", item2->CreateItemLink(client->GetVersion(), false).c_str());
 		client->AddItem(item2);
 
 		if (packet) {

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

@@ -5008,6 +5008,8 @@ void Client::CheckQuestQueue() {
 	for (itr = quest_queue.begin(); itr != quest_queue.end(); itr++) {
 		queued_quest = *itr;
 		SendQuestUpdateStepImmediately(queued_quest->quest, queued_quest->step, queued_quest->display_quest_helper);
+		//if(queued_quest->quest && queued_quest->quest->GetTurnedIn()) //update the journal so the old quest isn't the one displayed in the client's quest helper
+		//	SendQuestJournal();
 		safe_delete(queued_quest);
 	}
 	quest_queue.clear();
@@ -5419,7 +5421,10 @@ void Client::AcceptQuestReward(Quest* quest, int32 item_id) {
 
 void Client::DisplayQuestRewards(Quest* quest, int64 coin, vector<Item*>* rewards, vector<Item*>* selectable_rewards, map<int32, sint32>* factions, const char* header, int32 status_points, const char* text) {
 	if (coin == 0 && (!rewards || rewards->size() == 0) && (!selectable_rewards || selectable_rewards->size() == 0) && (!factions || factions->size() == 0) && status_points == 0 && text == 0 && (!quest || (quest->GetCoinsReward() == 0 && quest->GetCoinsRewardMax() == 0))) {
-		return;//nothing to give
+		if (quest)
+			text = quest->GetName();
+		else
+			return;//nothing to give
 	}
 	PacketStruct* packet2 = configReader.getStruct("WS_QuestRewardPackMsg", GetVersion());
 	if (packet2) {
@@ -5511,7 +5516,7 @@ void Client::DisplayQuestComplete(Quest* quest) {
 	if (!quest)
 		return;
 	if (GetVersion() <= 546) {
-		DisplayQuestRewards(quest, 0, quest->GetRewardItems(), quest->GetSelectableRewardItems(), quest->GetRewardFactions(), "Quest Reward!", quest->GetStatusPoints());
+		DisplayQuestRewards(quest, 0, quest->GetRewardItems(), quest->GetSelectableRewardItems(), quest->GetRewardFactions(), "Quest Complete!", quest->GetStatusPoints());
 		return;
 	}
 	PacketStruct* packet = configReader.getStruct("WS_QuestComplete", GetVersion());
@@ -5718,8 +5723,7 @@ void Client::GiveQuestReward(Quest* quest) {
 	}
 	if (quest->GetQuestGiver() > 0)
 		GetCurrentZone()->SendSpawnChangesByDBID(quest->GetQuestGiver(), this, false, true);
-	RemovePlayerQuest(quest->GetQuestID(), true, false);
-
+	RemovePlayerQuest(quest->GetQuestID(), true, false);	
 }
 
 void Client::DisplayConversation(int32 conversation_id, int32 spawn_id, vector<ConversationOption>* conversations, const char* text, const char* mp3, int32 key1, int32 key2) {

+ 1 - 1
server/SpawnScripts/FarJourneyFreeport/CaptainVarlos.lua

@@ -107,7 +107,7 @@ function quest_completed(NPC, player)
 end
 
 function drop_anchor(NPC, player)
-	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_026.mp3", "Ingrid! Swing the lead and prepare to drop anchor!", 3011518245, 3851752713)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_026.mp3", "Ingrid! Swing the lead and prepare to drop anchor!", "", 3011518245, 3851752713)
 end
 
 function ready_to_go_ashore(NPC, player)