-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows the function that explicitly removes magic effects to sync when applied to a player Cherry-pick to newest /dev branch needed to move Actor::RemoveSpell to Actor.cpp
- Loading branch information
1 parent
cff5144
commit 28aa711
Showing
15 changed files
with
236 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
struct RemoveSpellEvent | ||
{ | ||
RemoveSpellEvent() = default; | ||
|
||
uint32_t TargetId{}; | ||
uint32_t SpellId{}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "NotifyRemoveSpell.h" | ||
|
||
void NotifyRemoveSpell::SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept | ||
{ | ||
Serialization::WriteVarInt(aWriter, TargetId); | ||
SpellId.Serialize(aWriter); | ||
} | ||
|
||
void NotifyRemoveSpell::DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept | ||
{ | ||
TargetId = Serialization::ReadVarInt(aReader); | ||
SpellId.Deserialize(aReader); | ||
} |
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,24 @@ | ||
#pragma once | ||
#include "Message.h" | ||
#include <Structs/GameId.h> | ||
|
||
struct NotifyRemoveSpell final : ServerMessage | ||
{ | ||
static constexpr ServerOpcode Opcode = kNotifyRemoveSpell; | ||
|
||
NotifyRemoveSpell() : ServerMessage(Opcode) | ||
{ | ||
} | ||
|
||
void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override; | ||
|
||
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override; | ||
|
||
bool operator==(const NotifyRemoveSpell& acRhs) const noexcept | ||
{ | ||
return GetOpcode() == acRhs.GetOpcode() && TargetId == acRhs.TargetId && SpellId == acRhs.SpellId; | ||
} | ||
|
||
uint32_t TargetId{}; | ||
GameId SpellId{}; | ||
}; |
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,14 @@ | ||
#include "EncodingPch.h" | ||
#include "RemoveSpellRequest.h" | ||
|
||
void RemoveSpellRequest::SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept | ||
{ | ||
Serialization::WriteVarInt(aWriter, TargetId); | ||
SpellId.Serialize(aWriter); | ||
} | ||
|
||
void RemoveSpellRequest::DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept | ||
{ | ||
TargetId = Serialization::ReadVarInt(aReader); | ||
SpellId.Deserialize(aReader); | ||
} |
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,16 @@ | ||
#pragma once | ||
#include "Message.h" | ||
#include <Structs/GameId.h> | ||
|
||
struct RemoveSpellRequest final: ClientMessage | ||
{ | ||
static constexpr ClientOpcode Opcode = kRequestRemoveSpell; | ||
RemoveSpellRequest() : ClientMessage(Opcode) {} | ||
virtual ~RemoveSpellRequest() = default; | ||
void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override; | ||
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override; | ||
bool operator==(const RemoveSpellRequest& achRhs) const noexcept { return TargetId == achRhs.TargetId && SpellId == achRhs.SpellId && Opcode == achRhs.Opcode; } | ||
|
||
uint32_t TargetId{}; | ||
GameId SpellId{}; | ||
}; |
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.