Core/Refactor: Part 2

This commit is contained in:
hondacrx
2018-05-07 22:07:35 -04:00
parent 216db1c23a
commit 9b40067017
93 changed files with 321 additions and 388 deletions
+5 -5
View File
@@ -341,7 +341,7 @@ namespace Game
bool allowTwoSideAccounts = !Global.WorldMgr.IsPvPRealm() || HasPermission(RBACPermissions.TwoSideCharacterCreation);
int skipCinematics = WorldConfig.GetIntValue(WorldCfg.SkipCinematics);
Action<SQLResult> finalizeCharacterCreation = result1 =>
void finalizeCharacterCreation(SQLResult result1)
{
bool haveSameRace = false;
int demonHunterReqLevel = WorldConfig.GetIntValue(WorldCfg.CharacterCreatingMinLevelForDemonHunter);
@@ -479,7 +479,7 @@ namespace Game
Global.WorldMgr.AddCharacterInfo(newChar.GetGUID(), GetAccountId(), newChar.GetName(), newChar.GetByteValue(PlayerFields.Bytes3, PlayerFieldOffsets.Bytes3OffsetGender), (byte)newChar.GetRace(), (byte)newChar.GetClass(), (byte)newChar.getLevel(), false);
newChar.CleanupsBeforeDelete();
};
}
if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo.ClassId == Class.DemonHunter)
{
@@ -2169,12 +2169,12 @@ namespace Game
uint zoneId = GetPlayer().GetZoneId();
uint team = (uint)GetPlayer().GetTeam();
List<int> graveyardIds = new List<int>();
List<uint> graveyardIds = new List<uint>();
var range = Global.ObjectMgr.GraveYardStorage.LookupByKey(zoneId);
for (int i = 0; i < range.Count && graveyardIds.Count < 16; ++i) // client max
for (uint i = 0; i < range.Count && graveyardIds.Count < 16; ++i) // client max
{
var gYard = range[i];
var gYard = range[(int)i];
if (gYard.team == 0 || gYard.team == team)
graveyardIds.Add(i);
}
+1 -1
View File
@@ -96,7 +96,7 @@ namespace Game
}
var items = Global.ObjectMgr.GetGameObjectQuestItemList(packet.GameObjectID);
foreach (int item in items)
foreach (uint item in items)
stats.QuestItems.Add(item);
unsafe
+1 -1
View File
@@ -63,7 +63,7 @@ namespace Game
if (!_collectionMgr.HasToy(itemId))
return;
var effect = item.Effects.Find(eff => { return packet.Cast.SpellID == eff.SpellID; });
var effect = item.Effects.Find(eff => packet.Cast.SpellID == eff.SpellID);
if (effect == null)
return;