mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Split off some netpack structures into separate files
This commit is contained in:
@ -13,8 +13,24 @@
|
||||
#include "QueriesProcessor.h"
|
||||
#include "../CGameHandler.h"
|
||||
#include "../../lib/mapObjects/MiscObjects.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../../lib/networkPacks/PacksForServer.h"
|
||||
#include "../../lib/serializer/Cast.h"
|
||||
|
||||
struct GetEngagedHeroIds
|
||||
{
|
||||
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CGHeroInstance> & h) const
|
||||
{
|
||||
return h->id;
|
||||
}
|
||||
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CStackInstance> & s) const
|
||||
{
|
||||
if(s->armyObj && s->armyObj->ID == Obj::HERO)
|
||||
return s->armyObj->id;
|
||||
return std::optional<ObjectInstanceID>();
|
||||
}
|
||||
};
|
||||
|
||||
TimerPauseQuery::TimerPauseQuery(CGameHandler * owner, PlayerColor player):
|
||||
CQuery(owner)
|
||||
{
|
||||
|
Reference in New Issue
Block a user