mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
tweaks
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#include "gui/SDL_Extensions.h"
|
#include "gui/SDL_Extensions.h"
|
||||||
#include "widgets/CComponent.h"
|
#include "widgets/CComponent.h"
|
||||||
#include "windows/CTradeWindow.h"
|
#include "windows/CTradeWindow.h"
|
||||||
|
#include "windows/CSpellWindow.h"
|
||||||
#include "../lib/CConfigHandler.h"
|
#include "../lib/CConfigHandler.h"
|
||||||
#include "battle/CCreatureAnimation.h"
|
#include "battle/CCreatureAnimation.h"
|
||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
@@ -2244,11 +2245,15 @@ void CPlayerInterface::viewWorldMap()
|
|||||||
void CPlayerInterface::advmapSpellCast(const CGHeroInstance * caster, int spellID)
|
void CPlayerInterface::advmapSpellCast(const CGHeroInstance * caster, int spellID)
|
||||||
{
|
{
|
||||||
EVENT_HANDLER_CALLED_BY_CLIENT;
|
EVENT_HANDLER_CALLED_BY_CLIENT;
|
||||||
|
|
||||||
|
if(dynamic_cast<CSpellWindow *>(GH.topInt()))
|
||||||
|
GH.popIntTotally(GH.topInt());
|
||||||
|
|
||||||
if (spellID == SpellID::FLY || spellID == SpellID::WATER_WALK)
|
if (spellID == SpellID::FLY || spellID == SpellID::WATER_WALK)
|
||||||
{
|
{
|
||||||
eraseCurrentPathOf(caster, false);
|
eraseCurrentPathOf(caster, false);
|
||||||
}
|
}
|
||||||
const CSpell * spell = CGI->spellh->objects[spellID];
|
const CSpell * spell = CGI->spellh->objects.at(spellID);
|
||||||
|
|
||||||
if (spellID == SpellID::VIEW_EARTH)
|
if (spellID == SpellID::VIEW_EARTH)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -636,9 +636,8 @@ void CSpellWindow::SpellArea::clickLeft(tribool down, bool previousState)
|
|||||||
|
|
||||||
auto guard = vstd::makeScopeGuard([this]
|
auto guard = vstd::makeScopeGuard([this]
|
||||||
{
|
{
|
||||||
(owner->myInt->battleInt ? owner->myInt->spellbookSettings.spellbookLastTabBattle : owner->myInt->spellbookSettings.spellbookLastTabAdvmap) = owner->selectedTab;
|
owner->myInt->spellbookSettings.spellbookLastTabAdvmap = owner->selectedTab;
|
||||||
(owner->myInt->battleInt ? owner->myInt->spellbookSettings.spellbookLastPageBattle : owner->myInt->spellbookSettings.spellbokLastPageAdvmap) = owner->currentPage;
|
owner->myInt->spellbookSettings.spellbokLastPageAdvmap = owner->currentPage;
|
||||||
delete owner;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(mySpell->getTargetType() == CSpell::LOCATION)
|
if(mySpell->getTargetType() == CSpell::LOCATION)
|
||||||
|
|||||||
Reference in New Issue
Block a user