Jelajahi Sumber

Fix pull push collisions with code

Emagi 6 bulan lalu
induk
melakukan
ecf3d0b904

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

@@ -320,7 +320,7 @@ int	EQ2Emu_lua_PerformCameraShake(lua_State* state) {
 				 v2 = 0.1;
 		*/
 		packet->setDataByName("intensity", intensity);
-		if ( client->GetVersion() > 546 )
+		if ( client->GetVersion() > 561 )
 			packet->setDataByName("direction", direction);
 		client->QueuePacket(packet->serialize());
 		safe_delete(packet);
@@ -3659,7 +3659,7 @@ int EQ2Emu_lua_HasQuest(lua_State* state) {
 	}
 	int32 quest_id = lua_interface->GetInt32Value(state, 2);
 	if (quest_id > 0) {
-		lua_interface->SetBooleanValue(state, (((Player*)player)->HasActiveQuest(quest_id) > 0));
+		lua_interface->SetBooleanValue(state, (((Player*)player)->HasActiveQuest(quest_id) == TRUE));
 		return 1;
 	} else {
 		lua_interface->LogError("%s: LUA HasQuest command error: quest_id is not valid", lua_interface->GetScriptName(state));

+ 14 - 14
EQ2/source/WorldServer/WorldDatabase.cpp

@@ -2490,7 +2490,7 @@ int32 WorldDatabase::SaveCharacter(PacketStruct* create, int32 loginID){
 
 	AddNewPlayerToServerGuild(loginID, char_id);
 
-	if (create->GetVersion() <= 546) {
+	if (create->GetVersion() <= 561) {
 		float classic_multiplier = 250.0f;
 		SaveCharacterFloats(char_id, "skin_color", create->getType_float_ByName("skin_color", 0), create->getType_float_ByName("skin_color", 1), create->getType_float_ByName("skin_color", 2), classic_multiplier);
 		SaveCharacterFloats(char_id, "eye_color", create->getType_float_ByName("eye_color", 0), create->getType_float_ByName("eye_color", 1), create->getType_float_ByName("eye_color", 2), classic_multiplier);
@@ -3871,7 +3871,7 @@ void WorldDatabase::UpdateStartingZone(int32 char_id, int8 class_id, int8 race_i
 	int32 startingZoneRuleFlag = rule_manager.GetGlobalRule(R_World, StartingZoneRuleFlag)->GetInt32();
 	bool enforceRacialAlignment = rule_manager.GetGlobalRule(R_World, EnforceRacialAlignment)->GetBool();
 	
-	if((startingZoneRuleFlag == 1 || startingZoneRuleFlag == 2) && packetVersion > 546)
+	if((startingZoneRuleFlag == 1 || startingZoneRuleFlag == 2) && packetVersion > 561)
 	{
 		LogWrite(PLAYER__INFO, 0, "Player", "Starting zone rule flag %u override choice %u to deity value of 0", startingZoneRuleFlag, choice);
 		choice = 0;
@@ -4879,40 +4879,40 @@ void WorldDatabase::LoadSpells()
 				data->given_by_type == GivenByType::GivenBy_Unset;
 			}
 			else if(givenType == "tradeskillclass") {
-				data->given_by_type == GivenByType::GivenBy_TradeskillClass;
+				data->given_by_type = GivenByType::GivenBy_TradeskillClass;
 			}
 			else if(givenType == "spellscroll") {
-				data->given_by_type == GivenByType::GivenBy_SpellScroll;
+				data->given_by_type = GivenByType::GivenBy_SpellScroll;
 			}
 			else if(givenType == "alternateadvancement") {
-				data->given_by_type == GivenByType::GivenBy_AltAdvancement;
+				data->given_by_type = GivenByType::GivenBy_AltAdvancement;
 			}
 			else if(givenType == "race") {
-				data->given_by_type == GivenByType::GivenBy_Race;
+				data->given_by_type = GivenByType::GivenBy_Race;
 			}
 			else if(givenType == "racialinnate") {
-				data->given_by_type == GivenByType::GivenBy_RacialInnate;
+				data->given_by_type = GivenByType::GivenBy_RacialInnate;
 			}
 			else if(givenType == "racialtradition") {
-				data->given_by_type == GivenByType::GivenBy_RacialTradition;
+				data->given_by_type = GivenByType::GivenBy_RacialTradition;
 			}
 			else if(givenType == "class") {
-				data->given_by_type == GivenByType::GivenBy_Class;
+				data->given_by_type = GivenByType::GivenBy_Class;
 			}
 			else if(givenType == "charactertrait") {
-				data->given_by_type == GivenByType::GivenBy_CharacterTrait;
+				data->given_by_type = GivenByType::GivenBy_CharacterTrait;
 			}
 			else if(givenType == "focusabilities") {
-				data->given_by_type == GivenByType::GivenBy_FocusAbility;
+				data->given_by_type = GivenByType::GivenBy_FocusAbility;
 			}
 			else if(givenType == "classtraining") {
-				data->given_by_type == GivenByType::GivenBy_ClassTraining;
+				data->given_by_type = GivenByType::GivenBy_ClassTraining;
 			}
 			else if(givenType == "warderspell") {
-				data->given_by_type == GivenByType::GivenBy_WarderSpell;
+				data->given_by_type = GivenByType::GivenBy_WarderSpell;
 			}
 			else {
-				data->given_by_type == GivenByType::GivenBy_Unset;	
+				data->given_by_type = GivenByType::GivenBy_Unset;	
 			}
 			
 			/* Cast Messaging */