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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user