first commit
This commit is contained in:
30
Packets/Game/GameTrees/FellTree.cs
Normal file
30
Packets/Game/GameTrees/FellTree.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KCM.Packets.Game.GameTrees
|
||||
{
|
||||
public class FellTree : Packet
|
||||
{
|
||||
public override ushort packetId => (int)Enums.Packets.FellTree;
|
||||
|
||||
public int idx { get; set; }
|
||||
|
||||
public int x { get; set; }
|
||||
public int z { get; set; }
|
||||
|
||||
public override void HandlePacketClient()
|
||||
{
|
||||
Cell cell = World.inst.GetCellData(x, z);
|
||||
|
||||
TreeSystem.inst.FellTree(cell, idx);
|
||||
}
|
||||
|
||||
public override void HandlePacketServer()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Packets/Game/GameTrees/GrowTree.cs
Normal file
28
Packets/Game/GameTrees/GrowTree.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KCM.Packets.Game.GameTrees
|
||||
{
|
||||
public class GrowTree : Packet
|
||||
{
|
||||
public override ushort packetId => (int)Enums.Packets.GrowTree;
|
||||
|
||||
public int X { get; set; }
|
||||
public int Z { get; set; }
|
||||
|
||||
public override void HandlePacketClient()
|
||||
{
|
||||
Cell cell = World.inst.GetCellData(X, Z);
|
||||
|
||||
TreeSystem.inst.GrowTree(cell);
|
||||
}
|
||||
|
||||
public override void HandlePacketServer()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Packets/Game/GameTrees/ShakeTree.cs
Normal file
25
Packets/Game/GameTrees/ShakeTree.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KCM.Packets.Game.GameTrees
|
||||
{
|
||||
public class ShakeTree : Packet
|
||||
{
|
||||
public override ushort packetId => (int)Enums.Packets.ShakeTree;
|
||||
|
||||
public int idx { get; set; }
|
||||
|
||||
public override void HandlePacketClient()
|
||||
{
|
||||
TreeSystem.inst.ShakeTree(idx);
|
||||
}
|
||||
|
||||
public override void HandlePacketServer()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user