mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 07:06:13 +00:00
Fix style
--HG-- branch : item_group
This commit is contained in:
parent
1122a4e806
commit
6e62b186d0
2 changed files with 5 additions and 9 deletions
|
@ -1758,17 +1758,18 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
CViewTextMenu *pMoveToGuild = dynamic_cast<CViewTextMenu*>(pMenu->getView("guild"));
|
CViewTextMenu *pMoveToGuild = dynamic_cast<CViewTextMenu*>(pMenu->getView("guild"));
|
||||||
CViewTextMenu *pMoveToRoom = dynamic_cast<CViewTextMenu*>(pMenu->getView("room"));
|
CViewTextMenu *pMoveToRoom = dynamic_cast<CViewTextMenu*>(pMenu->getView("room"));
|
||||||
CViewTextMenu *pMoveToPa[MAX_INVENTORY_ANIMAL];
|
CViewTextMenu *pMoveToPa[MAX_INVENTORY_ANIMAL];
|
||||||
|
|
||||||
bool bIsLockedByOwner = pCS->getLockedByOwner();
|
bool bIsLockedByOwner = pCS->getLockedByOwner();
|
||||||
|
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
{
|
||||||
pMoveToPa[i]= dynamic_cast<CViewTextMenu*>(pMenu->getView(toString("pa%d", i)));
|
pMoveToPa[i]= dynamic_cast<CViewTextMenu*>(pMenu->getView(toString("pa%d", i)));
|
||||||
|
|
||||||
}
|
}
|
||||||
CViewTextMenu *pItemInfos = dynamic_cast<CViewTextMenu*>(pMenu->getView("infos"));
|
CViewTextMenu *pItemInfos = dynamic_cast<CViewTextMenu*>(pMenu->getView("infos"));
|
||||||
CViewTextMenu *pItemTextDisplay = dynamic_cast<CViewTextMenu*>(pMenu->getView("item_text_display"));
|
CViewTextMenu *pItemTextDisplay = dynamic_cast<CViewTextMenu*>(pMenu->getView("item_text_display"));
|
||||||
CViewTextMenu *pItemTextEdition = dynamic_cast<CViewTextMenu*>(pMenu->getView("item_text_edition"));
|
CViewTextMenu *pItemTextEdition = dynamic_cast<CViewTextMenu*>(pMenu->getView("item_text_edition"));
|
||||||
|
|
||||||
|
|
||||||
// **** Active Entries
|
// **** Active Entries
|
||||||
// Active Enchant / Reload for a subset of items
|
// Active Enchant / Reload for a subset of items
|
||||||
if(pCrisEnchant) pCrisEnchant->setActive(false);
|
if(pCrisEnchant) pCrisEnchant->setActive(false);
|
||||||
|
@ -1779,7 +1780,6 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pItemTextDisplay) pItemTextDisplay->setActive(false);
|
if(pItemTextDisplay) pItemTextDisplay->setActive(false);
|
||||||
if(pItemTextEdition) pItemTextEdition->setActive(false);
|
if(pItemTextEdition) pItemTextEdition->setActive(false);
|
||||||
|
|
||||||
|
|
||||||
if(pLockUnlock) pLockUnlock->setActive(true);
|
if(pLockUnlock) pLockUnlock->setActive(true);
|
||||||
|
|
||||||
const CItemSheet *pIS = pCS->asItemSheet();
|
const CItemSheet *pIS = pCS->asItemSheet();
|
||||||
|
@ -1860,10 +1860,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
// cannot move to other animals! :)
|
// cannot move to other animals! :)
|
||||||
if(pMoveToBag) pMoveToBag->setActive(false);
|
if(pMoveToBag) pMoveToBag->setActive(false);
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
|
||||||
if(pMoveToPa[i]) pMoveToPa[i]->setActive(false);
|
if(pMoveToPa[i]) pMoveToPa[i]->setActive(false);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// additionnaly, cannot drop/destroy/lock an animal item.
|
// additionnaly, cannot drop/destroy/lock an animal item.
|
||||||
if(pDrop) pDrop->setActive(false);
|
if(pDrop) pDrop->setActive(false);
|
||||||
|
@ -1889,8 +1886,10 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
|
|
||||||
if (pMoveToGuild)
|
if (pMoveToGuild)
|
||||||
pMoveToGuild->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::guild));
|
pMoveToGuild->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::guild));
|
||||||
|
|
||||||
if (pMoveToRoom)
|
if (pMoveToRoom)
|
||||||
pMoveToRoom->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::player_room));
|
pMoveToRoom->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::player_room));
|
||||||
|
|
||||||
// std case: can drop / destroy
|
// std case: can drop / destroy
|
||||||
if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild);
|
if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild);
|
||||||
if(pDestroy) pDestroy->setActive(invId!=INVENTORIES::guild);
|
if(pDestroy) pDestroy->setActive(invId!=INVENTORIES::guild);
|
||||||
|
@ -1902,11 +1901,9 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pMoveSubMenu)
|
if(pMoveSubMenu)
|
||||||
{
|
{
|
||||||
if(pMoveToBag) someMovePossible= someMovePossible || pMoveToBag->getActive();
|
if(pMoveToBag) someMovePossible= someMovePossible || pMoveToBag->getActive();
|
||||||
|
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
{
|
||||||
if(pMoveToPa[i]) someMovePossible= someMovePossible || pMoveToPa[i]->getActive();
|
if(pMoveToPa[i]) someMovePossible= someMovePossible || pMoveToPa[i]->getActive();
|
||||||
|
|
||||||
}
|
}
|
||||||
if(pMoveToGuild) someMovePossible= someMovePossible || pMoveToGuild->getActive();
|
if(pMoveToGuild) someMovePossible= someMovePossible || pMoveToGuild->getActive();
|
||||||
if(pMoveToRoom) someMovePossible= someMovePossible || pMoveToRoom->getActive();
|
if(pMoveToRoom) someMovePossible= someMovePossible || pMoveToRoom->getActive();
|
||||||
|
@ -1989,7 +1986,6 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pLockUnlock) pLockUnlock->setGrayed(true);
|
if(pLockUnlock) pLockUnlock->setGrayed(true);
|
||||||
if(pMoveSubMenu) pMoveSubMenu->setGrayed(true);
|
if(pMoveSubMenu) pMoveSubMenu->setGrayed(true);
|
||||||
if(pMoveToBag) pMoveToBag->setGrayed(true);
|
if(pMoveToBag) pMoveToBag->setGrayed(true);
|
||||||
|
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
{
|
||||||
if(pMoveToPa[i]) pMoveToPa[i]->setGrayed(true);
|
if(pMoveToPa[i]) pMoveToPa[i]->setGrayed(true);
|
||||||
|
@ -2011,7 +2007,6 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
|
|
||||||
// check each inventory dest if available
|
// check each inventory dest if available
|
||||||
if(pMoveToBag) pMoveToBag->setGrayed(!invMngr.isInventoryAvailable(INVENTORIES::bag));
|
if(pMoveToBag) pMoveToBag->setGrayed(!invMngr.isInventoryAvailable(INVENTORIES::bag));
|
||||||
|
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
{
|
||||||
if(pMoveToPa[i]) pMoveToPa[i]->setGrayed(!invMngr.isInventoryAvailable(
|
if(pMoveToPa[i]) pMoveToPa[i]->setGrayed(!invMngr.isInventoryAvailable(
|
||||||
|
|
|
@ -2997,6 +2997,7 @@ void CInterfaceManager::initEmotes()
|
||||||
uint32 nEmoteNb = (*it).EmoteId;
|
uint32 nEmoteNb = (*it).EmoteId;
|
||||||
string sState = (*it).Anim;
|
string sState = (*it).Anim;
|
||||||
string sName = (*it).Path;
|
string sName = (*it).Path;
|
||||||
|
|
||||||
// Check that the emote can be added to UI
|
// Check that the emote can be added to UI
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
if( (*it).UsableFromClientUI == false )
|
if( (*it).UsableFromClientUI == false )
|
||||||
|
|
Loading…
Reference in a new issue