mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Move visit query to a separate class, remove no longer needed Cast.h
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include "../../lib/mapObjects/CGObjectInstance.h"
|
||||
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||
#include "../../lib/networkPacks/PacksForServer.h"
|
||||
#include "../../lib/serializer/Cast.h"
|
||||
|
||||
void CBattleQuery::notifyObjectAboutRemoval(const CGObjectInstance * visitedObject, const CGHeroInstance * visitingHero) const
|
||||
{
|
||||
@@ -51,10 +50,10 @@ CBattleQuery::CBattleQuery(CGameHandler * owner):
|
||||
|
||||
bool CBattleQuery::blocksPack(const CPack * pack) const
|
||||
{
|
||||
if(dynamic_ptr_cast<MakeAction>(pack) != nullptr)
|
||||
if(dynamic_cast<const MakeAction*>(pack) != nullptr)
|
||||
return false;
|
||||
|
||||
if(dynamic_ptr_cast<GamePause>(pack) != nullptr)
|
||||
if(dynamic_cast<const GamePause*>(pack) != nullptr)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user