mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled classes) - files are now located in lib/entities/artifact directory - removed excessive includes No changes to functionality
This commit is contained in:
@ -8,7 +8,6 @@
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "ArtifactUtils.h"
|
||||
#include "PacksForClient.h"
|
||||
#include "PacksForClientBattle.h"
|
||||
#include "PacksForServer.h"
|
||||
@ -19,7 +18,6 @@
|
||||
#include "SetStackEffect.h"
|
||||
#include "NetPackVisitor.h"
|
||||
#include "texts/CGeneralTextHandler.h"
|
||||
#include "CArtHandler.h"
|
||||
#include "GameLibrary.h"
|
||||
#include "mapping/CMap.h"
|
||||
#include "spells/CSpellHandler.h"
|
||||
@ -32,6 +30,9 @@
|
||||
#include "StartInfo.h"
|
||||
#include "CPlayerState.h"
|
||||
#include "TerrainHandler.h"
|
||||
#include "entities/artifact/ArtifactUtils.h"
|
||||
#include "entities/artifact/CArtifact.h"
|
||||
#include "entities/artifact/CArtifactFittingSet.h"
|
||||
#include "entities/building/CBuilding.h"
|
||||
#include "entities/building/TownFortifications.h"
|
||||
#include "mapObjects/CGCreature.h"
|
||||
@ -2447,28 +2448,4 @@ void SetRewardableConfiguration::applyGs(CGameState *gs)
|
||||
}
|
||||
}
|
||||
|
||||
ArtSlotInfo::ArtSlotInfo(IGameCallback * cb)
|
||||
: GameCallbackHolder(cb)
|
||||
{
|
||||
}
|
||||
|
||||
ArtSlotInfo::ArtSlotInfo(const CArtifactInstance * artifact, bool locked)
|
||||
: GameCallbackHolder(artifact->cb)
|
||||
, artifactID(artifact->getId())
|
||||
, locked(locked)
|
||||
{
|
||||
}
|
||||
|
||||
const CArtifactInstance * ArtSlotInfo::getArt() const
|
||||
{
|
||||
if(!artifactID.hasValue())
|
||||
return nullptr;
|
||||
return cb->getArtInstance(artifactID);
|
||||
}
|
||||
|
||||
ArtifactInstanceID ArtSlotInfo::getID() const
|
||||
{
|
||||
return artifactID;
|
||||
}
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user