Some overall fixes:

* Fix to market constraints.
* Fixed bug with skill percent not rounding.
* Dereference textEdit variable properly.
* Fix to the outfit window regarding mounts.
* Added enableResize to UIMiniWindow.
* Some minor edits.
This commit is contained in:
BeniS
2012-08-23 02:21:02 +12:00
parent 9eef114779
commit ecd1ec5c0d
8 changed files with 41 additions and 24 deletions

View File

@@ -521,7 +521,7 @@ void Creature::setOutfit(const Outfit& outfit)
m_outfit.setAuxId(outfit.getAuxId());
m_outfit.setCategory(outfit.getCategory());
} else {
if(!g_things.isValidDatId(outfit.getId(), ThingCategoryCreature))
if(outfit.getId() > 0 && !g_things.isValidDatId(outfit.getId(), ThingCategoryCreature))
return;
m_outfit = outfit;
}

View File

@@ -325,11 +325,15 @@ void Game::processOpenOutfitWindow(const Outfit& currentOufit, const std::vector
{
virtualMountCreature = CreaturePtr(new Creature);
virtualMountCreature->setDirection(Otc::South);
if(currentOufit.getMount() > 0) {
Outfit mountOutfit;
mountOutfit.setId(currentOufit.getMount());
virtualMountCreature->setOutfit(mountOutfit);
}
Outfit mountOutfit;
mountOutfit.setId(0);
int mount = currentOufit.getMount();
if(mount > 0)
mountOutfit.setId(mount);
virtualMountCreature->setOutfit(mountOutfit);
}
g_lua.callGlobalField("g_game", "onOpenOutfitWindow", virtualOutfitCreature, outfitList, virtualMountCreature, mountList);