ソースを参照

Fix for a few compiler warnings

Devn00b 6 ヶ月 前
コミット
70df4d5624

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

@@ -2566,7 +2566,7 @@ int EQ2Emu_lua_RemoveSpellBonus(lua_State* state) {
 		ZoneServer* zone = nullptr;
 		if (luaspell->caster != nullptr)
 			zone = luaspell->caster->GetZone();
-		if(!zone && spawn) {
+		if(!zone) {
 			zone = spawn->GetZone(); // workaround to try to establish a zone to find the targets and remove the spells
 		}
 		Spawn* target = 0;

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

@@ -4876,43 +4876,43 @@ void WorldDatabase::LoadSpells()
 			std::string givenType(given_by);
 			boost::algorithm::to_lower(givenType);
 			if(givenType == "unset" || givenType.length() < 1) {
-				data->given_by_type == GivenByType::GivenBy_Unset;
+				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 */