mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 00:08:50 -07:00
Loki Day bugfix
This commit is contained in:
parent
b8a7ef847e
commit
9cc16f31ae
@ -177,6 +177,7 @@ public class Room {
|
||||
}
|
||||
|
||||
private void OnTimer(Object? source, ElapsedEventArgs e) {
|
||||
SetTimer(random.NextDouble() * 9 + 1);
|
||||
foreach (var roomClient in Clients) {
|
||||
roomClient.PlayerData.RandomizeDragon();
|
||||
|
||||
@ -188,6 +189,5 @@ public class Room {
|
||||
|
||||
roomClient.SendSUV(vl, data);
|
||||
}
|
||||
SetTimer(random.NextDouble() * 9 + 1);
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ public class PlayerData {
|
||||
}
|
||||
if (Configuration.ServerConfiguration.MakeChaos) {
|
||||
if (PetGeometry == geometry)
|
||||
return variables["FP"];
|
||||
return Regex.Replace(value, "\\*C\\$[0-9$]*\\*", colour + "*");
|
||||
PetGeometry = geometry;
|
||||
}
|
||||
if (PetMounted && !Configuration.ServerConfiguration.AllowChaos &&
|
||||
@ -220,11 +220,12 @@ public class PlayerData {
|
||||
}
|
||||
|
||||
private Random random = new Random();
|
||||
private string colour;
|
||||
public void RandomizeDragon() {
|
||||
var s = "*C$";
|
||||
colour = "*C$";
|
||||
for (var i=0; i<9; ++i)
|
||||
s=s+random.Next(0, 255).ToString() + "$";
|
||||
variables["FP"] = Regex.Replace(variables["FP"], "\\*C\\$[0-9$]*\\*", s + "*");
|
||||
colour=colour+random.Next(0, 255).ToString() + "$";
|
||||
variables["FP"] = Regex.Replace(variables["FP"], "\\*C\\$[0-9$]*\\*", colour + "*");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user