1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Digging: implement digging status on right click. Fix issue 401

This is also fix possibility to dig on some non-blockable objects like event.
This commit is contained in:
ArseniyShestakov
2015-11-29 12:32:06 +03:00
parent f940e3ed42
commit f55bfe41d6
9 changed files with 55 additions and 29 deletions

View File

@@ -40,10 +40,6 @@ public:
class DLL_LINKAGE CGHeroInstance : public CArmedInstance, public IBoatGenerator, public CArtifactSet, public ISpellCaster
{
public:
enum ECanDig
{
CAN_DIG, LACK_OF_MOVEMENT, WRONG_TERRAIN, TILE_OCCUPIED
};
//////////////////////////////////////////////////////////////////////////
ui8 moveDir; //format: 123
@@ -174,7 +170,7 @@ public:
bool canCastThisSpell(const CSpell * spell) const; //determines if this hero can cast given spell; takes into account existing spell in spellbook, existing spellbook and artifact bonuses
CStackBasicDescriptor calculateNecromancy (const BattleResult &battleResult) const;
void showNecromancyDialog(const CStackBasicDescriptor &raisedStack) const;
ECanDig diggingStatus() const; //0 - can dig; 1 - lack of movement; 2 -
EDiggingStatus diggingStatus() const;
//////////////////////////////////////////////////////////////////////////