#pragma once #include "core/Core.hpp" #include "servers/CNShardServer.hpp" #include "Entities.hpp" #include #include struct Player; enum EntityKind; struct Group { std::vector members; std::vector filter(EntityKind kind) { std::vector filtered; std::copy_if(members.begin(), members.end(), std::back_inserter(filtered), [kind](EntityRef e) { return e.kind == kind; }); return filtered; } }; namespace Groups { void init(); void sendToGroup(Group* group, void* buf, uint32_t type, size_t size); void groupTickInfo(Player* plr); void groupKick(Player* plr); void addToGroup(EntityRef member, Group* group); void removeFromGroup(EntityRef member, Group* group); void disbandGroup(Group* group); }