Misc fixes.
This commit is contained in:
@@ -64,8 +64,10 @@ namespace Framework.Networking
|
|||||||
AsyncAcceptSocket(mgrHandler);
|
AsyncAcceptSocket(mgrHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ObjectDisposedException)
|
catch (ObjectDisposedException ex)
|
||||||
{ }
|
{
|
||||||
|
Log.outException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
@@ -74,7 +76,6 @@ namespace Framework.Networking
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_closed = true;
|
_closed = true;
|
||||||
_listener.Stop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Game.BattleGrounds
|
|||||||
public void DeleteAllBattlegrounds()
|
public void DeleteAllBattlegrounds()
|
||||||
{
|
{
|
||||||
foreach (var data in bgDataStore.Values.ToList())
|
foreach (var data in bgDataStore.Values.ToList())
|
||||||
while(data.m_Battlegrounds.Empty())
|
while(!data.m_Battlegrounds.Empty())
|
||||||
data.m_Battlegrounds.First().Value.Dispose();
|
data.m_Battlegrounds.First().Value.Dispose();
|
||||||
|
|
||||||
bgDataStore.Clear();
|
bgDataStore.Clear();
|
||||||
|
|||||||
@@ -829,7 +829,7 @@ namespace Game
|
|||||||
{
|
{
|
||||||
AdventureJournalDataInfo dataInfo;
|
AdventureJournalDataInfo dataInfo;
|
||||||
dataInfo.AdventureJournalID = (int)adventureJournal.Id;
|
dataInfo.AdventureJournalID = (int)adventureJournal.Id;
|
||||||
dataInfo.Priority = (int)adventureJournal.PriorityMax;
|
dataInfo.Priority = adventureJournal.PriorityMax;
|
||||||
response.AdventureJournalDatas.Add(dataInfo);
|
response.AdventureJournalDatas.Add(dataInfo);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,27 @@ namespace Game.Maps
|
|||||||
|
|
||||||
public void DiscoverGridMapFiles()
|
public void DiscoverGridMapFiles()
|
||||||
{
|
{
|
||||||
|
string tileListName = $"{Global.WorldMgr.GetDataPath()}/maps/{GetId():D4}.tilelist";
|
||||||
|
// tile list is optional
|
||||||
|
if (File.Exists(tileListName))
|
||||||
|
{
|
||||||
|
using (var reader = new BinaryReader(new FileStream(tileListName, FileMode.Open, FileAccess.Read)))
|
||||||
|
{
|
||||||
|
var mapMagic = reader.ReadUInt32();
|
||||||
|
var versionMagic = reader.ReadUInt32();
|
||||||
|
if (mapMagic == MapConst.MapMagic && versionMagic == MapConst.MapVersionMagic)
|
||||||
|
{
|
||||||
|
var build = reader.ReadUInt32();
|
||||||
|
byte[] tilesData = reader.ReadArray<byte>(MapConst.MaxGrids * MapConst.MaxGrids);
|
||||||
|
for (uint gx = 0; gx < MapConst.MaxGrids; ++gx)
|
||||||
|
for (uint gy = 0; gy < MapConst.MaxGrids; ++gy)
|
||||||
|
i_gridFileExists[(int)(gx * MapConst.MaxGrids + gy)] = tilesData[(int)(gx * MapConst.MaxGrids + gy)] == 49; // char of 1
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (uint gx = 0; gx < MapConst.MaxGrids; ++gx)
|
for (uint gx = 0; gx < MapConst.MaxGrids; ++gx)
|
||||||
for (uint gy = 0; gy < MapConst.MaxGrids; ++gy)
|
for (uint gy = 0; gy < MapConst.MaxGrids; ++gy)
|
||||||
i_gridFileExists[(int)(gx * MapConst.MaxGrids + gy)] = ExistMap(GetId(), gx, gy);
|
i_gridFileExists[(int)(gx * MapConst.MaxGrids + gy)] = ExistMap(GetId(), gx, gy);
|
||||||
|
|||||||
Reference in New Issue
Block a user