feat(Core): Add clustering support (#16832)
Co-authored-by: 3kynox <thierry.prost@gmail.com> Co-authored-by: nox <nox@noxen.net> Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f23ac046ab
commit
6f0ba8e896
+31
@@ -0,0 +1,31 @@
|
||||
#include "player-interactions-api.h"
|
||||
|
||||
static CanPlayerInteractWithNPCAndFlagsHandler canPlayerInteractWithNPCAndFlagsHandler;
|
||||
void SetCanPlayerInteractWithNPCAndFlagsHandler(CanPlayerInteractWithNPCAndFlagsHandler h) {
|
||||
canPlayerInteractWithNPCAndFlagsHandler = h;
|
||||
}
|
||||
|
||||
CanPlayerInteractWithNPCAndFlagsResponse CallCanPlayerInteractWithNPCAndFlagsHandler(uint64_t player_guid, uint64_t npc_guid, uint32_t npc_flags) {
|
||||
if (canPlayerInteractWithNPCAndFlagsHandler == 0) {
|
||||
CanPlayerInteractWithNPCAndFlagsResponse resp;
|
||||
resp.errorCode = PlayerInteractionErrorCodeNoHandler;
|
||||
return resp;
|
||||
}
|
||||
|
||||
return canPlayerInteractWithNPCAndFlagsHandler(player_guid, npc_guid, npc_flags);
|
||||
}
|
||||
|
||||
static CanPlayerInteractWithGOAndTypeHandler canPlayerInteractWithGOAndTypeHandler;
|
||||
void SetCanPlayerInteractWithGOAndTypeHandler(CanPlayerInteractWithGOAndTypeHandler h) {
|
||||
canPlayerInteractWithGOAndTypeHandler = h;
|
||||
}
|
||||
|
||||
CanPlayerInteractWithGOAndTypeResponse CallCanPlayerInteractWithGOAndTypeHandler(uint64_t player_guid, uint64_t go_guid, uint8_t go_type) {
|
||||
if (canPlayerInteractWithGOAndTypeHandler == 0) {
|
||||
CanPlayerInteractWithGOAndTypeResponse resp;
|
||||
resp.errorCode = PlayerInteractionErrorCodeNoHandler;
|
||||
return resp;
|
||||
}
|
||||
|
||||
return canPlayerInteractWithGOAndTypeHandler(player_guid, go_guid, go_type);
|
||||
}
|
||||
Reference in New Issue
Block a user