sync dice

dice synced for noplayableplayers
This commit is contained in:
AliIbnAbiTalib
2023-03-28 19:28:11 +02:00
parent 930fb5fa16
commit 07f499dc91
6 changed files with 59 additions and 37 deletions
+8
View File
@@ -225,6 +225,9 @@ public class Client : MonoBehaviour
players[job.data[1]].AddCoins(-items[job.data[3]].Cost);
players[job.data[1]].AddItem(items[job.data[3]]);
break;
case 10:
players[job.data[1]].ActivateItem(job.data[2]);
break;
case 126:
stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 10);
break;
@@ -310,4 +313,9 @@ public class Client : MonoBehaviour
{
stream.Write(new byte[] { 9, (byte)item.type, 0, 0, 0, 0, 0, 0, 0, 0 });
}
public void SendActiveItem(byte index)
{
stream.Write(new byte[]{10, index, 0, 0, 0, 0, 0, 0, 0, 0});
}
}