Some cleanups. (might break build for scripts as they are a WIP)

This commit is contained in:
hondacrx
2023-10-08 10:35:31 -04:00
parent fa10b981bd
commit cda53c8e7f
208 changed files with 2266 additions and 2329 deletions
+5 -5
View File
@@ -31,7 +31,7 @@ namespace Game.Chat
return false;
}
if (Global.GuildMgr.GetGuildByName(guildName))
if (Global.GuildMgr.GetGuildByName(guildName) != null)
{
handler.SendSysMessage(CypherStrings.GuildRenameAlreadyExists);
return false;
@@ -122,7 +122,7 @@ namespace Game.Chat
return false;
Guild targetGuild = Global.GuildMgr.GetGuildById(guildId);
if (!targetGuild)
if (targetGuild == null)
return false;
return targetGuild.ChangeMemberRank(null, player.GetGUID(), (GuildRankId)rank);
@@ -144,13 +144,13 @@ namespace Game.Chat
}
Guild guild = Global.GuildMgr.GetGuildByName(oldGuildName);
if (!guild)
if (guild == null)
{
handler.SendSysMessage(CypherStrings.CommandCouldnotfind, oldGuildName);
return false;
}
if (Global.GuildMgr.GetGuildByName(newGuildName))
if (Global.GuildMgr.GetGuildByName(newGuildName) != null)
{
handler.SendSysMessage(CypherStrings.GuildRenameAlreadyExists, newGuildName);
return false;
@@ -185,7 +185,7 @@ namespace Game.Chat
guild = target.GetConnectedPlayer().GetGuild();
}
if (!guild)
if (guild == null)
return false;
// Display Guild Information