Feature #953 Trader Gold - Unused code/warning resolved

Removed unused code
getBaseGold throws proper error
actorid
Jeffrey Haines 11 years ago
parent 401d21b4ee
commit 9efef31bb8

@ -134,10 +134,6 @@ namespace MWClass
getContainerStore(ptr).fill(ref->mBase->mInventory, getId(ptr), "",
MWBase::Environment::get().getWorld()->getStore());
// TODO: this is not quite correct, in vanilla the merchant's gold pool is not available in his inventory.
// (except for gold you gave him)
//getContainerStore(ptr).add(MWWorld::ContainerStore::sGoldId, ref->mBase->mData.mGold, ptr);
if (ref->mBase->mFlags & ESM::Creature::Weapon)
getInventoryStore(ptr).autoEquip(ptr);
}

@ -365,13 +365,7 @@ namespace MWClass
// store
ptr.getRefData().setCustomData (data.release());
// TODO: this is not quite correct, in vanilla the merchant's gold pool is not available in his inventory.
// (except for gold you gave him)
//getContainerStore(ptr).add(MWWorld::ContainerStore::sGoldId, gold, ptr);
getInventoryStore(ptr).autoEquip(ptr);
getInventoryStore(ptr).autoEquip(ptr);
}
}

@ -397,5 +397,8 @@ namespace MWWorld
void Class::writeAdditionalState (const MWWorld::Ptr& ptr, ESM::ObjectState& state) const {}
int Class::getBaseGold(const MWWorld::Ptr& ptr) const {}
int Class::getBaseGold(const MWWorld::Ptr& ptr) const
{
throw std::runtime_error("class does not support base gold");
}
}

Loading…
Cancel
Save