mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 14:03:34 +00:00
929d029f12
* Moving and organizing Player code - Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*. * Moving and organizing Player code - Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*. - Remove static storage container (static containers can be destroyed before exit/terminate handler executes) * remove player cast * Remove extra includes
12 lines
407 B
C++
12 lines
407 B
C++
#include "WblGenericZone.h"
|
|
#include "CharacterComponent.h"
|
|
|
|
void WblGenericZone::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
|
if (args == m_WblAbortMsg) {
|
|
if (!sender) return;
|
|
|
|
auto* characterComponent = sender->GetComponent<CharacterComponent>();
|
|
if (characterComponent) characterComponent->SendToZone(m_WblMainZone);
|
|
}
|
|
}
|