Merge branch 'master' of manuel-voegele.de:inf3
This commit is contained in:
BIN
pathfinding.dll
Normal file
BIN
pathfinding.dll
Normal file
Binary file not shown.
@@ -79,11 +79,21 @@ namespace WorldOfPeacecraft
|
||||
return Players[playerId];
|
||||
}
|
||||
|
||||
public Dictionary<int, Player> getPlayerList()
|
||||
{
|
||||
return Players;
|
||||
}
|
||||
|
||||
public Dragon getDragon (int dragonId)
|
||||
{
|
||||
return Dragons[dragonId];
|
||||
}
|
||||
|
||||
public Dictionary<int, Dragon> getDragonList()
|
||||
{
|
||||
return Dragons;
|
||||
}
|
||||
|
||||
public Map getMapObject ()
|
||||
{
|
||||
return Map;
|
||||
|
||||
@@ -300,11 +300,22 @@ namespace WorldOfPeacecraft
|
||||
|
||||
private void ProcessPlayer (Block playerBlock)
|
||||
{
|
||||
lock (Backend) {
|
||||
int id = MapPlayer(playerBlock).GetId();
|
||||
if (Backend.getPlayer(id) == null)
|
||||
{
|
||||
lock (Backend)
|
||||
{
|
||||
Backend.SetPlayer(MapPlayer(playerBlock));
|
||||
}
|
||||
Backend.RefreshGui();
|
||||
}
|
||||
else
|
||||
{
|
||||
MapPlayerUPD(playerBlock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ProcessMapcell (Block mapcellBlock)
|
||||
{
|
||||
@@ -406,6 +417,21 @@ namespace WorldOfPeacecraft
|
||||
return new Player (id, x, y, desc, busy, score);
|
||||
}
|
||||
|
||||
private void MapPlayerUPD(Block playerBlock)
|
||||
{
|
||||
int id = playerBlock.GetIntValue(ValueId);
|
||||
int score = playerBlock.GetIntValue(ValuePoints);
|
||||
bool busy = playerBlock.GetBoolValue(ValueBusy);
|
||||
string desc = playerBlock.GetStringValue(ValueDescription);
|
||||
int x = playerBlock.GetIntValue(ValueX);
|
||||
int y = playerBlock.GetIntValue(ValueY);
|
||||
|
||||
Backend.getPlayer(id).SetScore(score);
|
||||
Backend.getPlayer(id).SetDesc(desc);
|
||||
Backend.getPlayer(id).SetX(x);
|
||||
Backend.getPlayer(id).SetY(y);
|
||||
}
|
||||
|
||||
private Tile MapMapcell (Block cellBlock)
|
||||
{
|
||||
CheckBlocksSize (cellBlock, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user