1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

* missing change from previous commit

This commit is contained in:
mateuszb 2012-10-03 18:13:07 +00:00
parent 652ea4036e
commit a8524a2f95

View File

@ -952,96 +952,6 @@ void CArtHandler::clear()
}
// /**
// * Locally equips an artifact to a hero's worn slots. Unequips an already present artifact.
// * Does not test if the operation is legal.
// * @param artifWorn A hero's set of worn artifacts.
// * @param bonuses Optional list of bonuses to update.
// */
// void CArtHandler::equipArtifact( std::map<ui16, const CArtifact*> &artifWorn, ui16 slotID, const CArtifact* art ) const
// {
// unequipArtifact(artifWorn, slotID);
//
// if (art) //false when artifact is NULL -> slot set to empty
// {
// const CArtifact &artifact = *art;
//
// // Add artifact.
// artifWorn[slotID] = art;
//
// // Add locks, in reverse order of being removed.
// if (artifact.constituents != NULL)
// {
// bool destConsumed = false; // Determines which constituent that will be counted for together with the artifact.
//
// BOOST_FOREACH(ui32 constituentID, *artifact.constituents)
// {
// const CArtifact &constituent = *artifacts[constituentID];
//
// if (!destConsumed && vstd::contains(constituent.possibleSlots, slotID))
// {
// destConsumed = true;
// }
// else
// {
// BOOST_FOREACH(ui16 slot, constituent.possibleSlots)
// {
// if (!vstd::contains(artifWorn, slot))
// {
// artifWorn[slot] = VLC->arth->artifacts[145]; //lock
// break;
// }
// }
// }
// }
// }
// }
// }
//
// /**
// * Locally unequips an artifact from a hero's worn slots.
// * Does not test if the operation is legal.
// * @param artifWorn A hero's set of worn artifacts.
// * @param bonuses Optional list of bonuses to update.
// */
// void CArtHandler::unequipArtifact(std::map<ui16, const CArtifact*> &artifWorn, ui16 slotID) const
// {
// if (!vstd::contains(artifWorn, slotID))
// return;
//
// const CArtifact &artifact = *artifWorn[slotID];
//
// // Remove artifact, if it's not already removed.
// artifWorn.erase(slotID);
//
// // Remove locks, in reverse order of being added.
// if (artifact.constituents != NULL)
// {
// bool destConsumed = false;
//
// BOOST_FOREACH(ui32 constituentID, *artifact.constituents)
// {
// const CArtifact &constituent = *artifacts[constituentID];
//
// if (!destConsumed && vstd::contains(constituent.possibleSlots, slotID))
// {
// destConsumed = true;
// }
// else
// {
// BOOST_REVERSE_FOREACH(ui16 slot, constituent.possibleSlots)
// {
// if (vstd::contains(artifWorn, slot) && artifWorn[slot]->id == 145)
// {
// artifWorn.erase(slot);
// break;
// }
// }
// }
// }
// }
// }
void CArtHandler::clearHlpLists()
{
treasures.clear();