DarkflameServer/dScripts/zone/LUPs/WblGenericZone.cpp
David Markowitz 929d029f12
chore: Simplify and move Player functionality to relevant component (#1408)
* 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
2024-01-12 11:39:51 -06:00

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);
}
}