-
Notifications
You must be signed in to change notification settings - Fork 52
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 #108 from alborrajo/feature/equiphide
Hide equipped lantern/head armor
- Loading branch information
Showing
22 changed files
with
1,005 additions
and
62 deletions.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
Arrowgene.Ddon.GameServer/Handler/EquipUpdateHideCharacterHeadArmorHandler.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,40 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class EquipUpdateHideCharacterHeadArmorHandler : StructurePacketHandler<GameClient, C2SEquipUpdateHideCharacterHeadArmorReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EquipUpdateHideCharacterHeadArmorHandler)); | ||
|
||
public EquipUpdateHideCharacterHeadArmorHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SEquipUpdateHideCharacterHeadArmorReq> packet) | ||
{ | ||
client.Character.HideEquipHead = packet.Structure.Hide; | ||
Database.UpdateCharacterBaseInfo(client.Character); | ||
client.Send(new S2CEquipUpdateHideCharacterHeadArmorRes() | ||
{ | ||
Hide = packet.Structure.Hide | ||
}); | ||
|
||
S2CEquipUpdateEquipHideNtc ntc = new S2CEquipUpdateEquipHideNtc() | ||
{ | ||
CharacterId = client.Character.Id, | ||
HideHead = client.Character.HideEquipHead, | ||
HideLantern = client.Character.HideEquipLantern, | ||
HidePawnHead = client.Character.HideEquipHeadPawn, | ||
HidePawnLantern = client.Character.HideEquipLanternPawn | ||
}; | ||
foreach(Client otherClient in Server.ClientLookup.GetAll()) | ||
{ | ||
otherClient.Send(ntc); | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Arrowgene.Ddon.GameServer/Handler/EquipUpdateHideCharacterLanternHandler.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,40 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class EquipUpdateHideCharacterLanternHandler : StructurePacketHandler<GameClient, C2SEquipUpdateHideCharacterLanternReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EquipUpdateHideCharacterLanternHandler)); | ||
|
||
public EquipUpdateHideCharacterLanternHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SEquipUpdateHideCharacterLanternReq> packet) | ||
{ | ||
client.Character.HideEquipLantern = packet.Structure.Hide; | ||
Database.UpdateCharacterBaseInfo(client.Character); | ||
client.Send(new S2CEquipUpdateHideCharacterLanternRes() | ||
{ | ||
Hide = packet.Structure.Hide | ||
}); | ||
|
||
S2CEquipUpdateEquipHideNtc ntc = new S2CEquipUpdateEquipHideNtc() | ||
{ | ||
CharacterId = client.Character.Id, | ||
HideHead = client.Character.HideEquipHead, | ||
HideLantern = client.Character.HideEquipLantern, | ||
HidePawnHead = client.Character.HideEquipHeadPawn, | ||
HidePawnLantern = client.Character.HideEquipLanternPawn | ||
}; | ||
foreach(Client otherClient in Server.ClientLookup.GetAll()) | ||
{ | ||
otherClient.Send(ntc); | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Arrowgene.Ddon.GameServer/Handler/EquipUpdateHidePawnHeadArmorHandler.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,40 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class EquipUpdateHidePawnHeadArmorHandler : StructurePacketHandler<GameClient, C2SEquipUpdateHidePawnHeadArmorReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EquipUpdateHidePawnHeadArmorHandler)); | ||
|
||
public EquipUpdateHidePawnHeadArmorHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SEquipUpdateHidePawnHeadArmorReq> packet) | ||
{ | ||
client.Character.HideEquipHeadPawn = packet.Structure.Hide; | ||
Database.UpdateCharacterBaseInfo(client.Character); | ||
client.Send(new S2CEquipUpdateHidePawnHeadArmorRes() | ||
{ | ||
Hide = packet.Structure.Hide | ||
}); | ||
|
||
S2CEquipUpdateEquipHideNtc ntc = new S2CEquipUpdateEquipHideNtc() | ||
{ | ||
CharacterId = client.Character.Id, | ||
HideHead = client.Character.HideEquipHead, | ||
HideLantern = client.Character.HideEquipLantern, | ||
HidePawnHead = client.Character.HideEquipHeadPawn, | ||
HidePawnLantern = client.Character.HideEquipLanternPawn | ||
}; | ||
foreach(Client otherClient in Server.ClientLookup.GetAll()) | ||
{ | ||
otherClient.Send(ntc); | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Arrowgene.Ddon.GameServer/Handler/EquipUpdateHidePawnLanternHandler.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,40 @@ | ||
using Arrowgene.Ddon.Server; | ||
using Arrowgene.Ddon.Server.Network; | ||
using Arrowgene.Ddon.Shared.Entity.PacketStructure; | ||
using Arrowgene.Ddon.Shared.Network; | ||
using Arrowgene.Logging; | ||
|
||
namespace Arrowgene.Ddon.GameServer.Handler | ||
{ | ||
public class EquipUpdateHidePawnLanternHandler : StructurePacketHandler<GameClient, C2SEquipUpdateHidePawnLanternReq> | ||
{ | ||
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EquipUpdateHidePawnLanternHandler)); | ||
|
||
public EquipUpdateHidePawnLanternHandler(DdonGameServer server) : base(server) | ||
{ | ||
} | ||
|
||
public override void Handle(GameClient client, StructurePacket<C2SEquipUpdateHidePawnLanternReq> packet) | ||
{ | ||
client.Character.HideEquipLanternPawn= packet.Structure.Hide; | ||
Database.UpdateCharacterBaseInfo(client.Character); | ||
client.Send(new S2CEquipUpdateHidePawnLanternRes() | ||
{ | ||
Hide = packet.Structure.Hide | ||
}); | ||
|
||
S2CEquipUpdateEquipHideNtc ntc = new S2CEquipUpdateEquipHideNtc() | ||
{ | ||
CharacterId = client.Character.Id, | ||
HideHead = client.Character.HideEquipHead, | ||
HideLantern = client.Character.HideEquipLantern, | ||
HidePawnHead = client.Character.HideEquipHeadPawn, | ||
HidePawnLantern = client.Character.HideEquipLanternPawn | ||
}; | ||
foreach(Client otherClient in Server.ClientLookup.GetAll()) | ||
{ | ||
otherClient.Send(ntc); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.