mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user