forked from NebulaModTeam/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NebulaModTeam#674 from starfi5h/pr-bugfix
Multiple Bugfix
- Loading branch information
Showing
15 changed files
with
195 additions
and
36 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
NebulaModel/Packets/Combat/GroundEnemy/DFGRemoveBasePacket.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace NebulaModel.Packets.Combat.GroundEnemy; | ||
|
||
public class DFGRemoveBasePacket | ||
{ | ||
public DFGRemoveBasePacket() { } | ||
|
||
public DFGRemoveBasePacket(int planetId, int baseId) | ||
{ | ||
PlanetId = planetId; | ||
BaseId = baseId; | ||
} | ||
|
||
public int PlanetId { get; set; } | ||
public int BaseId { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
NebulaNetwork/PacketProcessors/Combat/GroundEnemy/DFGRemoveBaseProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#region | ||
|
||
using NebulaAPI.Packets; | ||
using NebulaModel.Networking; | ||
using NebulaModel.Packets; | ||
using NebulaModel.Packets.Combat.GroundEnemy; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaNetwork.PacketProcessors.Combat.GroundEnemy; | ||
|
||
[RegisterPacketProcessor] | ||
public class DFGRemoveBaseProcessor : PacketProcessor<DFGRemoveBasePacket> | ||
{ | ||
protected override void ProcessPacket(DFGRemoveBasePacket packet, NebulaConnection conn) | ||
{ | ||
var factory = GameMain.galaxy.PlanetById(packet.PlanetId)?.factory; | ||
if (IsHost || factory == null) return; | ||
|
||
using (Multiplayer.Session.Combat.IsIncomingRequest.On()) | ||
{ | ||
// EnemyDFGroundSystem.bases.SetNull(id); | ||
factory.enemySystem.RemoveDFGBaseComponent(packet.BaseId); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.