1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-07 23:33:15 +02:00

Locks for combination artifacts largely implemented, only one or two bugs when moving them around in a certain way. Artifact assembly still remaining.

To make sure these artifacts get (un)equipped properly the functions CArtHandler::equipArtifact and CArtHandler::unequipArtifact should be used instead of modifying artifWorn manually.
This commit is contained in:
OnionKnight
2010-02-08 21:17:22 +00:00
parent 28f8ef3b0f
commit 790a77c280
12 changed files with 248 additions and 72 deletions

View File

@@ -464,14 +464,14 @@ DLL_EXPORT void SetHeroArtifacts::setArtAtPos(ui16 pos, int art)
if(art<0)
{
if(pos<19)
artifWorn.erase(pos);
VLC->arth->unequipArtifact(artifWorn, pos);
else
artifacts.erase(artifacts.begin() + (pos - 19));
}
else
{
if (pos < 19) {
artifWorn[pos] = art;
VLC->arth->equipArtifact(artifWorn, pos, (ui32) art);
} else { // Goes into the backpack.
if(pos - 19 < artifacts.size())
artifacts.insert(artifacts.begin() + (pos - 19), art);