mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Feature #953 Trader Gold - Unused code/warning resolved
Removed unused code getBaseGold throws proper error
This commit is contained in:
parent
401d21b4ee
commit
9efef31bb8
3 changed files with 5 additions and 12 deletions
|
@ -134,10 +134,6 @@ namespace MWClass
|
||||||
getContainerStore(ptr).fill(ref->mBase->mInventory, getId(ptr), "",
|
getContainerStore(ptr).fill(ref->mBase->mInventory, getId(ptr), "",
|
||||||
MWBase::Environment::get().getWorld()->getStore());
|
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)
|
if (ref->mBase->mFlags & ESM::Creature::Weapon)
|
||||||
getInventoryStore(ptr).autoEquip(ptr);
|
getInventoryStore(ptr).autoEquip(ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,13 +365,7 @@ namespace MWClass
|
||||||
// store
|
// store
|
||||||
ptr.getRefData().setCustomData (data.release());
|
ptr.getRefData().setCustomData (data.release());
|
||||||
|
|
||||||
// TODO: this is not quite correct, in vanilla the merchant's gold pool is not available in his inventory.
|
getInventoryStore(ptr).autoEquip(ptr);
|
||||||
// (except for gold you gave him)
|
|
||||||
//getContainerStore(ptr).add(MWWorld::ContainerStore::sGoldId, gold, ptr);
|
|
||||||
|
|
||||||
getInventoryStore(ptr).autoEquip(ptr);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,5 +397,8 @@ namespace MWWorld
|
||||||
|
|
||||||
void Class::writeAdditionalState (const MWWorld::Ptr& ptr, ESM::ObjectState& state) const {}
|
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…
Reference in a new issue