Misc fixes
This commit is contained in:
@@ -3870,7 +3870,7 @@ namespace Game
|
||||
|
||||
public CreatureData NewOrExistCreatureData(ulong spawnId)
|
||||
{
|
||||
if (creatureDataStorage.ContainsKey(spawnId))
|
||||
if (!creatureDataStorage.ContainsKey(spawnId))
|
||||
creatureDataStorage[spawnId] = new CreatureData();
|
||||
return creatureDataStorage[spawnId];
|
||||
}
|
||||
@@ -10429,12 +10429,11 @@ namespace Game
|
||||
TaxiNodeFlags requireFlag = (team == Team.Alliance) ? TaxiNodeFlags.ShowOnAllianceMap : TaxiNodeFlags.ShowOnHordeMap;
|
||||
foreach (var node in CliDB.TaxiNodesStorage.Values)
|
||||
{
|
||||
var i = node.Id;
|
||||
if (node.ContinentID != mapid || !node.GetFlags().HasFlag(requireFlag) || node.GetFlags().HasFlag(TaxiNodeFlags.IgnoreForFindNearest))
|
||||
if (node.ContinentID != mapid || !node.HasFlag(requireFlag) || node.HasFlag(TaxiNodeFlags.IgnoreForFindNearest))
|
||||
continue;
|
||||
|
||||
uint field = (i - 1) / 8;
|
||||
byte submask = (byte)(1 << (int)((i - 1) % 8));
|
||||
uint field = (node.Id - 1) / 8;
|
||||
byte submask = (byte)(1 << (int)((node.Id - 1) % 8));
|
||||
|
||||
// skip not taxi network nodes
|
||||
if ((CliDB.TaxiNodesMask[field] & submask) == 0)
|
||||
@@ -10446,14 +10445,14 @@ namespace Game
|
||||
if (dist2 < dist)
|
||||
{
|
||||
dist = dist2;
|
||||
id = i;
|
||||
id = node.Id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
found = true;
|
||||
dist = dist2;
|
||||
id = i;
|
||||
id = node.Id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user