Core/Refactor: Part 4

This commit is contained in:
hondacrx
2018-05-27 15:40:06 -04:00
parent d94ad385b1
commit 2c3479c6e2
59 changed files with 159 additions and 223 deletions
@@ -379,7 +379,6 @@ namespace Game.Chat
uint entry = 0;
GameObjectTypes type = 0;
uint displayId = 0;
string name;
uint lootId = 0;
if (args.Empty())
@@ -415,7 +414,7 @@ namespace Game.Chat
type = gameObjectInfo.type;
displayId = gameObjectInfo.displayId;
name = gameObjectInfo.name;
string name = gameObjectInfo.name;
lootId = gameObjectInfo.GetLootId();
handler.SendSysMessage(CypherStrings.GoinfoEntry, entry);
+1 -3
View File
@@ -171,14 +171,12 @@ namespace Game.Chat.Commands
if (count == 0)
return false;
SQLResult result;
// inventory case
uint inventoryCount = 0;
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHAR_INVENTORY_COUNT_ITEM);
stmt.AddValue(0, itemId);
result = DB.Characters.Query(stmt);
SQLResult result = DB.Characters.Query(stmt);
if (!result.IsEmpty())
inventoryCount = result.Read<uint>(0);
+1 -2
View File
@@ -228,7 +228,6 @@ namespace Game.Chat.Commands
uint accountId = 0;
string accountName;
uint id = 0;
RBACCommandData data;
RBACData rdata = null;
bool useSelectedPlayer = false;
@@ -293,7 +292,7 @@ namespace Game.Chat.Commands
if (checkParams && handler.HasLowerSecurityAccount(null, accountId, true))
return null;
data = new RBACCommandData();
RBACCommandData data = new RBACCommandData();
if (rdata == null)
{
+1 -1
View File
@@ -185,7 +185,7 @@ namespace Game.Chat.Commands
ulong titles2 = titles;
foreach (CharTitlesRecord tEntry in CliDB.CharTitlesStorage.Values)
titles2 &= ~(1ul << (int)tEntry.MaskID);
titles2 &= ~(1ul << tEntry.MaskID);
titles &= ~titles2; // remove not existed titles
+2 -6
View File
@@ -364,7 +364,6 @@ namespace Game.Chat.Commands
string path_number = args.NextString();
uint pathid;
ulong guidLow;
Creature target = handler.getSelectedCreature();
// Did player provide a path_id?
@@ -389,7 +388,7 @@ namespace Game.Chat.Commands
return true;
}
guidLow = target.GetSpawnId();
ulong guidLow = target.GetSpawnId();
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_CREATURE_ADDON_BY_GUID);
stmt.AddValue(0, guidLow);
@@ -445,9 +444,6 @@ namespace Game.Chat.Commands
return false;
}
// Next arg is: <PATHID> <WPNUM> <ARGUMENT>
string arg_str;
// Did user provide a GUID
// or did the user select a creature?
// . variable lowguid is filled with the GUID of the NPC
@@ -502,7 +498,7 @@ namespace Game.Chat.Commands
// We have the waypoint number and the GUID of the "master npc"
// Text is enclosed in "<>", all other arguments not
arg_str = args.NextString();
string arg_str = args.NextString();
// Check for argument
if (show != "del" && show != "move" && arg_str == null)