Merge branch 'master' of manuel-voegele.de:inf3

This commit is contained in:
Wafa Sadri
2014-06-05 12:48:43 +02:00
2 changed files with 8 additions and 2 deletions

View File

@@ -216,6 +216,11 @@ namespace WorldOfPeacecraft
InitializedEvent.WaitOne(); InitializedEvent.WaitOne();
initialized = true; initialized = true;
} }
public void ChallengeIncome(Challenge c)
{
Challenge(c);
}
} }
} }

View File

@@ -292,9 +292,9 @@ namespace WorldOfPeacecraft
{ {
int id = challengeBlock.GetIntValue(ValueId); int id = challengeBlock.GetIntValue(ValueId);
GameType type; GameType type;
LinkedList<string> value = challengeBlock.GetUnnamedValues(); string sType = challengeBlock.GetStringValue("type");
// TODO check value size, better name // TODO check value size, better name
switch (value.First.Value) switch (sType)
{ {
case EValueDragon: case EValueDragon:
type = GameType.DRAGON; type = GameType.DRAGON;
@@ -310,6 +310,7 @@ namespace WorldOfPeacecraft
} }
bool accepted = challengeBlock.GetBoolValue("accepted"); bool accepted = challengeBlock.GetBoolValue("accepted");
Challenge c = new Challenge(id, type, accepted); Challenge c = new Challenge(id, type, accepted);
Backend.ChallengeIncome(c);
} }
private void ProcessPlayerSelf (Block playerBlock) private void ProcessPlayerSelf (Block playerBlock)