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];
|
return Players[playerId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<int, Player> getPlayerList()
|
||||||
|
{
|
||||||
|
return Players;
|
||||||
|
}
|
||||||
|
|
||||||
public Dragon getDragon (int dragonId)
|
public Dragon getDragon (int dragonId)
|
||||||
{
|
{
|
||||||
return Dragons[dragonId];
|
return Dragons[dragonId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<int, Dragon> getDragonList()
|
||||||
|
{
|
||||||
|
return Dragons;
|
||||||
|
}
|
||||||
|
|
||||||
public Map getMapObject ()
|
public Map getMapObject ()
|
||||||
{
|
{
|
||||||
return Map;
|
return Map;
|
||||||
|
|||||||
@@ -300,11 +300,22 @@ namespace WorldOfPeacecraft
|
|||||||
|
|
||||||
private void ProcessPlayer (Block playerBlock)
|
private void ProcessPlayer (Block playerBlock)
|
||||||
{
|
{
|
||||||
lock (Backend) {
|
int id = MapPlayer(playerBlock).GetId();
|
||||||
Backend.SetPlayer (MapPlayer (playerBlock));
|
if (Backend.getPlayer(id) == null)
|
||||||
}
|
{
|
||||||
Backend.RefreshGui ();
|
lock (Backend)
|
||||||
|
{
|
||||||
|
Backend.SetPlayer(MapPlayer(playerBlock));
|
||||||
|
}
|
||||||
|
Backend.RefreshGui();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MapPlayerUPD(playerBlock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void ProcessMapcell (Block mapcellBlock)
|
private void ProcessMapcell (Block mapcellBlock)
|
||||||
{
|
{
|
||||||
@@ -405,6 +416,21 @@ namespace WorldOfPeacecraft
|
|||||||
int y = playerBlock.GetIntValue (ValueY);
|
int y = playerBlock.GetIntValue (ValueY);
|
||||||
return new Player (id, x, y, desc, busy, score);
|
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)
|
private Tile MapMapcell (Block cellBlock)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user