mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Added GameInstance class
- available as global GAME - integrates LOCPLINT (CPlayerInterface) - integrates CGI->mh (CMapHandler) - integrates CSH (CServerHandler)
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CursorHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
#include "../GameInstance.h"
|
||||
#include "../gui/CIntObject.h"
|
||||
#include "../gui/WindowHandler.h"
|
||||
#include "../windows/CCreatureWindow.h"
|
||||
@ -261,8 +262,8 @@ void BattleActionsController::reorderPossibleActionsPriority(const CStack * stac
|
||||
if(!stack->hasBonusOfType(BonusType::NO_SPELLCAST_BY_DEFAULT) && targetStack != nullptr)
|
||||
{
|
||||
PlayerColor stackOwner = owner.getBattle()->battleGetOwner(targetStack);
|
||||
bool enemyTargetingPositiveSpellcast = item.spell().toSpell()->isPositive() && stackOwner != LOCPLINT->playerID;
|
||||
bool friendTargetingNegativeSpellcast = item.spell().toSpell()->isNegative() && stackOwner == LOCPLINT->playerID;
|
||||
bool enemyTargetingPositiveSpellcast = item.spell().toSpell()->isPositive() && stackOwner != GAME->interface()->playerID;
|
||||
bool friendTargetingNegativeSpellcast = item.spell().toSpell()->isNegative() && stackOwner == GAME->interface()->playerID;
|
||||
|
||||
if(!enemyTargetingPositiveSpellcast && !friendTargetingNegativeSpellcast)
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user