mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +00:00
merge
This commit is contained in:
commit
1d49b93a04
34 changed files with 1099 additions and 414 deletions
|
@ -232,6 +232,7 @@ public:
|
||||||
CCDBNodeBranch *getDB() const { return _DbRootNode; }
|
CCDBNodeBranch *getDB() const { return _DbRootNode; }
|
||||||
// yoyo: should avoid to try creating DbPropr with this system... very dangerous
|
// yoyo: should avoid to try creating DbPropr with this system... very dangerous
|
||||||
CCDBNodeLeaf* getDbProp (const std::string & name, bool bCreate=true);
|
CCDBNodeLeaf* getDbProp (const std::string & name, bool bCreate=true);
|
||||||
|
void delDbProp(const std::string & name);
|
||||||
// get a Db Branch by its name. NULL if don't exist or not a branch (never try to create it)
|
// get a Db Branch by its name. NULL if don't exist or not a branch (never try to create it)
|
||||||
CCDBNodeBranch *getDbBranch(const std::string &name);
|
CCDBNodeBranch *getDbBranch(const std::string &name);
|
||||||
// return the DB as an int32. return 0 if the DB does not exist (never create)
|
// return the DB as an int32. return 0 if the DB does not exist (never create)
|
||||||
|
|
|
@ -517,7 +517,7 @@ bool CInterfaceParser::parseInterface (const std::vector<std::string> & strings,
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
bool needCheck = checkInData;
|
bool needCheck = false;
|
||||||
|
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
needCheck = false;
|
needCheck = false;
|
||||||
|
@ -554,10 +554,12 @@ bool CInterfaceParser::parseInterface (const std::vector<std::string> & strings,
|
||||||
string::size_type pos = filename.find ("@");
|
string::size_type pos = filename.find ("@");
|
||||||
if (pos != string::npos)
|
if (pos != string::npos)
|
||||||
{
|
{
|
||||||
std::string bigFilename = CBigFile::getInstance().getBigFileName(filename.substr(0, pos));
|
vector<string> bigFilePaths;
|
||||||
std::string path = "data/"+filename.substr(0, pos);
|
CBigFile::getInstance().getBigFilePaths(bigFilePaths);
|
||||||
|
if (CBigFile::getInstance().getBigFileName(filename.substr(0, pos)) != "data/"+filename.substr(0, pos))
|
||||||
isInData = bigFilename.find(path) != std::string::npos;
|
isInData = false;
|
||||||
|
else
|
||||||
|
isInData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((needCheck && !isInData) || !file.open (CPath::lookup(firstFileName)))
|
if ((needCheck && !isInData) || !file.open (CPath::lookup(firstFileName)))
|
||||||
|
@ -4685,7 +4687,7 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error)
|
||||||
{
|
{
|
||||||
// get file
|
// get file
|
||||||
|
|
||||||
bool needCheck = true;
|
bool needCheck = false;
|
||||||
|
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
needCheck = false;
|
needCheck = false;
|
||||||
|
@ -4702,10 +4704,10 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error)
|
||||||
std::string::size_type pos = pathName.find("@");
|
std::string::size_type pos = pathName.find("@");
|
||||||
if (pos != string::npos)
|
if (pos != string::npos)
|
||||||
{
|
{
|
||||||
std::string bigFilename = CBigFile::getInstance().getBigFileName(pathName.substr(0, pos));
|
if (CBigFile::getInstance().getBigFileName(pathName.substr(0, pos)) != "data/"+pathName.substr(0, pos))
|
||||||
std::string path = "data/"+pathName.substr(0, pos);
|
isInData = false;
|
||||||
|
else
|
||||||
isInData = bigFilename.find(path) != std::string::npos;
|
isInData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needCheck && !isInData)
|
if (needCheck && !isInData)
|
||||||
|
|
|
@ -44,12 +44,14 @@
|
||||||
#include "../sheet_manager.h"
|
#include "../sheet_manager.h"
|
||||||
#include "game_share/slot_equipment.h"
|
#include "game_share/slot_equipment.h"
|
||||||
#include "game_share/animal_status.h"
|
#include "game_share/animal_status.h"
|
||||||
|
#include "game_share/bot_chat_types.h"
|
||||||
|
|
||||||
#include "../client_cfg.h"
|
#include "../client_cfg.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
extern NLMISC::CLog g_log;
|
||||||
// Context help
|
// Context help
|
||||||
extern void contextHelp (const std::string &help);
|
extern void contextHelp (const std::string &help);
|
||||||
|
|
||||||
|
@ -131,6 +133,7 @@ void CItemImage::build(CCDBNodeBranch *branch)
|
||||||
Weight = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("WEIGHT"), false));
|
Weight = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("WEIGHT"), false));
|
||||||
NameId = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("NAMEID"), false));
|
NameId = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("NAMEID"), false));
|
||||||
InfoVersion= dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("INFO_VERSION"), false));
|
InfoVersion= dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("INFO_VERSION"), false));
|
||||||
|
ResaleFlag = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("RESALE_FLAG"), false));
|
||||||
|
|
||||||
// Should always have at least those one:(ie all but Price)
|
// Should always have at least those one:(ie all but Price)
|
||||||
nlassert(Sheet && Quality && Quantity && UserColor && Weight && NameId && InfoVersion);
|
nlassert(Sheet && Quality && Quantity && UserColor && Weight && NameId && InfoVersion);
|
||||||
|
@ -1998,6 +2001,9 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */)
|
||||||
prop = xmlGetProp (cur, (xmlChar*)"filter_missmp");
|
prop = xmlGetProp (cur, (xmlChar*)"filter_missmp");
|
||||||
if (prop) DbFilterMissMP = pIM->getDbProp(prop);
|
if (prop) DbFilterMissMP = pIM->getDbProp(prop);
|
||||||
|
|
||||||
|
prop = xmlGetProp (cur, (xmlChar*)"filter_tp");
|
||||||
|
if (prop) DbFilterTP = pIM->getDbProp(prop);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2041,6 +2047,13 @@ bool SBagOptions::isSomethingChanged()
|
||||||
LastDbFilterMissMP = (DbFilterMissMP->getValue8() != 0);
|
LastDbFilterMissMP = (DbFilterMissMP->getValue8() != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DbFilterTP != NULL)
|
||||||
|
if ((DbFilterTP->getValue8() != 0) != LastDbFilterTP)
|
||||||
|
{
|
||||||
|
bRet = true;
|
||||||
|
LastDbFilterTP = (DbFilterTP->getValue8() != 0);
|
||||||
|
}
|
||||||
|
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2054,25 +2067,33 @@ bool SBagOptions::canDisplay(CDBCtrlSheet *pCS) const
|
||||||
bool bFilterTool = getFilterTool();
|
bool bFilterTool = getFilterTool();
|
||||||
bool bFilterMP = getFilterMP();
|
bool bFilterMP = getFilterMP();
|
||||||
bool bFilterMissMP = getFilterMissMP();
|
bool bFilterMissMP = getFilterMissMP();
|
||||||
|
bool bFilterTP = getFilterTP();
|
||||||
|
|
||||||
const CItemSheet *pIS = pCS->asItemSheet();
|
const CItemSheet *pIS = pCS->asItemSheet();
|
||||||
if (pIS != NULL)
|
if (pIS != NULL)
|
||||||
{
|
{
|
||||||
// Armor
|
// Armor
|
||||||
if ((pIS->Family == ITEMFAMILY::ARMOR) || (pIS->Family == ITEMFAMILY::JEWELRY))
|
if ((pIS->Family == ITEMFAMILY::ARMOR) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::JEWELRY))
|
||||||
if (!bFilterArmor) bDisplay = false;
|
if (!bFilterArmor) bDisplay = false;
|
||||||
|
|
||||||
// Weapon
|
// Weapon
|
||||||
if ((pIS->Family == ITEMFAMILY::SHIELD) || (pIS->Family == ITEMFAMILY::MELEE_WEAPON) ||
|
if ((pIS->Family == ITEMFAMILY::SHIELD) ||
|
||||||
(pIS->Family == ITEMFAMILY::RANGE_WEAPON) || (pIS->Family == ITEMFAMILY::AMMO) ||
|
(pIS->Family == ITEMFAMILY::MELEE_WEAPON) ||
|
||||||
(pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) || (pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE) ||
|
(pIS->Family == ITEMFAMILY::RANGE_WEAPON) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::AMMO) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE) ||
|
||||||
(pIS->Family == ITEMFAMILY::BRICK) )
|
(pIS->Family == ITEMFAMILY::BRICK) )
|
||||||
if (!bFilterWeapon) bDisplay = false;
|
if (!bFilterWeapon) bDisplay = false;
|
||||||
|
|
||||||
// Tool
|
// Tool
|
||||||
if ((pIS->Family == ITEMFAMILY::CRAFTING_TOOL) || (pIS->Family == ITEMFAMILY::HARVEST_TOOL) ||
|
if ((pIS->Family == ITEMFAMILY::CRAFTING_TOOL) ||
|
||||||
(pIS->Family == ITEMFAMILY::TAMING_TOOL) || (pIS->Family == ITEMFAMILY::TRAINING_TOOL) ||
|
(pIS->Family == ITEMFAMILY::HARVEST_TOOL) ||
|
||||||
(pIS->Family == ITEMFAMILY::BAG) || (pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET) )
|
(pIS->Family == ITEMFAMILY::TAMING_TOOL) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::TRAINING_TOOL) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::BAG) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET) )
|
||||||
if (!bFilterTool) bDisplay = false;
|
if (!bFilterTool) bDisplay = false;
|
||||||
|
|
||||||
// MP
|
// MP
|
||||||
|
@ -2081,9 +2102,15 @@ bool SBagOptions::canDisplay(CDBCtrlSheet *pCS) const
|
||||||
|
|
||||||
// Mission MP
|
// Mission MP
|
||||||
if ((pIS->Family == ITEMFAMILY::MISSION_ITEM) ||
|
if ((pIS->Family == ITEMFAMILY::MISSION_ITEM) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::XP_CATALYSER) ||
|
||||||
|
(pIS->Family == ITEMFAMILY::CONSUMABLE) ||
|
||||||
((pIS->Family == ITEMFAMILY::RAW_MATERIAL) && !pIS->canBuildSomeItemPart()))
|
((pIS->Family == ITEMFAMILY::RAW_MATERIAL) && !pIS->canBuildSomeItemPart()))
|
||||||
if (!bFilterMissMP) bDisplay = false;
|
if (!bFilterMissMP) bDisplay = false;
|
||||||
|
|
||||||
|
// Teleporter Pacts
|
||||||
|
if ((pIS->Family == ITEMFAMILY::TELEPORT))
|
||||||
|
if (!bFilterTP) bDisplay = false;
|
||||||
|
|
||||||
// Jobs Items
|
// Jobs Items
|
||||||
if (pIS->Id.toString().substr(0, 6) == "rpjob_")
|
if (pIS->Id.toString().substr(0, 6) == "rpjob_")
|
||||||
bDisplay = false;
|
bDisplay = false;
|
||||||
|
@ -2776,6 +2803,37 @@ public:
|
||||||
REGISTER_ACTION_HANDLER( CHandlerInvAutoEquip, "inv_auto_equip" );
|
REGISTER_ACTION_HANDLER( CHandlerInvAutoEquip, "inv_auto_equip" );
|
||||||
|
|
||||||
|
|
||||||
|
// **********************************************************************************************************
|
||||||
|
class CHandlerLockInvItem : public IActionHandler
|
||||||
|
{
|
||||||
|
void execute (CCtrlBase *pCaller, const std::string &sParams)
|
||||||
|
{
|
||||||
|
// get the calling item
|
||||||
|
CDBCtrlSheet *item = CDBCtrlSheet::getCurrSelSheet();
|
||||||
|
if ( ! item)
|
||||||
|
{
|
||||||
|
nlwarning("<CHandlerDestroyItem::execute> no caller sheet found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string lock = "1";
|
||||||
|
if (item->getLockedByOwner())
|
||||||
|
{
|
||||||
|
lock = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 slot = item->getIndexInDB();
|
||||||
|
uint32 inv = item->getInventoryIndex();
|
||||||
|
INVENTORIES::TInventory inventory = INVENTORIES::UNDEFINED;
|
||||||
|
inventory = (INVENTORIES::TInventory)(inv);
|
||||||
|
if (inventory == INVENTORIES::UNDEFINED)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NLMISC::ICommand::execute("a lockItem " + INVENTORIES::toString(inventory) + " " + toString(slot) + " " + lock, g_log);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
REGISTER_ACTION_HANDLER( CHandlerLockInvItem, "lock_inv_item" );
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
// Inventory Temporary
|
// Inventory Temporary
|
||||||
|
@ -2844,11 +2902,11 @@ class CHandlerInvTempAll : public IActionHandler
|
||||||
|
|
||||||
nlctassert(MAX_INVENTORY_ANIMAL==4);
|
nlctassert(MAX_INVENTORY_ANIMAL==4);
|
||||||
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal1))
|
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal1))
|
||||||
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(2), pInv->getMaxBagBulk(2)));
|
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(1), pInv->getMaxBagBulk(1)));
|
||||||
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal2))
|
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal2))
|
||||||
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(3), pInv->getMaxBagBulk(3)));
|
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(2), pInv->getMaxBagBulk(2)));
|
||||||
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal3))
|
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal3))
|
||||||
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(4), pInv->getMaxBagBulk(4)));
|
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(3), pInv->getMaxBagBulk(3)));
|
||||||
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal4))
|
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal4))
|
||||||
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(4), pInv->getMaxBagBulk(4)));
|
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(4), pInv->getMaxBagBulk(4)));
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "game_share/item_infos.h"
|
#include "game_share/item_infos.h"
|
||||||
#include "game_share/temp_inventory_mode.h"
|
#include "game_share/temp_inventory_mode.h"
|
||||||
#include "game_share/inventories.h"
|
#include "game_share/inventories.h"
|
||||||
|
#include "game_share/bot_chat_types.h"
|
||||||
|
|
||||||
class CCDBNodeBranch;
|
class CCDBNodeBranch;
|
||||||
class CDBCtrlSheet;
|
class CDBCtrlSheet;
|
||||||
|
@ -62,6 +63,7 @@ public:
|
||||||
CCDBNodeLeaf *Weight;
|
CCDBNodeLeaf *Weight;
|
||||||
CCDBNodeLeaf *NameId;
|
CCDBNodeLeaf *NameId;
|
||||||
CCDBNodeLeaf *InfoVersion;
|
CCDBNodeLeaf *InfoVersion;
|
||||||
|
CCDBNodeLeaf *ResaleFlag;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ctor
|
// ctor
|
||||||
|
@ -77,6 +79,8 @@ public:
|
||||||
uint32 getWeight() const { return (uint32) (Weight ? Weight->getValue32() : 0); }
|
uint32 getWeight() const { return (uint32) (Weight ? Weight->getValue32() : 0); }
|
||||||
uint32 getNameId() const { return (uint32) (NameId ? NameId->getValue32() : 0); }
|
uint32 getNameId() const { return (uint32) (NameId ? NameId->getValue32() : 0); }
|
||||||
uint8 getInfoVersion() const { return (uint8) (InfoVersion ? (uint8) InfoVersion->getValue8() : 0); }
|
uint8 getInfoVersion() const { return (uint8) (InfoVersion ? (uint8) InfoVersion->getValue8() : 0); }
|
||||||
|
uint8 getResaleFlag() const { return (uint8) (ResaleFlag ? (uint8) ResaleFlag->getValue8() : 0); }
|
||||||
|
bool getLockedByOwner() const { return (bool) (ResaleFlag ? (ResaleFlag->getValue8() == BOTCHATTYPE::ResaleKOLockedByOwner) : false); }
|
||||||
//
|
//
|
||||||
void setSheetID(uint32 si) { if (Sheet) Sheet->setValue32((sint32) si); }
|
void setSheetID(uint32 si) { if (Sheet) Sheet->setValue32((sint32) si); }
|
||||||
void setQuality(uint16 quality) { if (Quality) Quality->setValue16((sint16) quality); }
|
void setQuality(uint16 quality) { if (Quality) Quality->setValue16((sint16) quality); }
|
||||||
|
@ -86,6 +90,7 @@ public:
|
||||||
void setWeight(uint32 wgt) { if (Weight) Weight->setValue32((sint32) wgt); }
|
void setWeight(uint32 wgt) { if (Weight) Weight->setValue32((sint32) wgt); }
|
||||||
void setNameId(uint32 nid) { if (NameId) NameId->setValue32((sint32) nid); }
|
void setNameId(uint32 nid) { if (NameId) NameId->setValue32((sint32) nid); }
|
||||||
void setInfoVersion(uint8 iv) { if (InfoVersion) InfoVersion->setValue8((sint8) iv); }
|
void setInfoVersion(uint8 iv) { if (InfoVersion) InfoVersion->setValue8((sint8) iv); }
|
||||||
|
void setResaleFlag(uint8 resale) { if (ResaleFlag) ResaleFlag->setValue8(resale); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -504,18 +509,20 @@ struct SBagOptions
|
||||||
CCDBNodeLeaf *DbFilterTool;
|
CCDBNodeLeaf *DbFilterTool;
|
||||||
CCDBNodeLeaf *DbFilterMP;
|
CCDBNodeLeaf *DbFilterMP;
|
||||||
CCDBNodeLeaf *DbFilterMissMP;
|
CCDBNodeLeaf *DbFilterMissMP;
|
||||||
|
CCDBNodeLeaf *DbFilterTP;
|
||||||
|
|
||||||
bool LastDbFilterArmor;
|
bool LastDbFilterArmor;
|
||||||
bool LastDbFilterWeapon;
|
bool LastDbFilterWeapon;
|
||||||
bool LastDbFilterTool;
|
bool LastDbFilterTool;
|
||||||
bool LastDbFilterMP;
|
bool LastDbFilterMP;
|
||||||
bool LastDbFilterMissMP;
|
bool LastDbFilterMissMP;
|
||||||
|
bool LastDbFilterTP;
|
||||||
// -----------------------
|
// -----------------------
|
||||||
SBagOptions()
|
SBagOptions()
|
||||||
{
|
{
|
||||||
InvType = CInventoryManager::InvUnknown;
|
InvType = CInventoryManager::InvUnknown;
|
||||||
DbFilterArmor = DbFilterWeapon = DbFilterTool = DbFilterMP = DbFilterMissMP = NULL;
|
DbFilterArmor = DbFilterWeapon = DbFilterTool = DbFilterMP = DbFilterMissMP = DbFilterTP = NULL;
|
||||||
LastDbFilterArmor = LastDbFilterWeapon = LastDbFilterTool = LastDbFilterMP = LastDbFilterMissMP = false;
|
LastDbFilterArmor = LastDbFilterWeapon = LastDbFilterTool = LastDbFilterMP = LastDbFilterMissMP = LastDbFilterTP = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
|
@ -552,6 +559,12 @@ struct SBagOptions
|
||||||
return (DbFilterMissMP->getValue8()!=0);
|
return (DbFilterMissMP->getValue8()!=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool getFilterTP() const
|
||||||
|
{
|
||||||
|
if (DbFilterTP == NULL) return true;
|
||||||
|
return (DbFilterTP->getValue8() != 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Return true if the sheet can be displayed due to filters
|
// Return true if the sheet can be displayed due to filters
|
||||||
bool canDisplay(CDBCtrlSheet *pCS) const;
|
bool canDisplay(CDBCtrlSheet *pCS) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -143,7 +143,7 @@ extern NLMISC::CLog g_log;
|
||||||
extern CContinentManager ContinentMngr;
|
extern CContinentManager ContinentMngr;
|
||||||
extern uint8 PlayerSelectedSlot;
|
extern uint8 PlayerSelectedSlot;
|
||||||
extern CClientChatManager ChatMngr;
|
extern CClientChatManager ChatMngr;
|
||||||
extern void addWebIGParams (string &url);
|
extern void addWebIGParams (string &url, bool trustedDomain);
|
||||||
|
|
||||||
// declare ostream << operator for ucstring -> registration of ucstring iin luabind will build a 'tostring' function from it
|
// declare ostream << operator for ucstring -> registration of ucstring iin luabind will build a 'tostring' function from it
|
||||||
std::ostream &operator<<(std::ostream &str, const ucstring &value)
|
std::ostream &operator<<(std::ostream &str, const ucstring &value)
|
||||||
|
@ -1323,6 +1323,7 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
ls.registerFunc("getIndexInDB", getIndexInDB);
|
ls.registerFunc("getIndexInDB", getIndexInDB);
|
||||||
ls.registerFunc("getUIId", getUIId);
|
ls.registerFunc("getUIId", getUIId);
|
||||||
ls.registerFunc("createGroupInstance", createGroupInstance);
|
ls.registerFunc("createGroupInstance", createGroupInstance);
|
||||||
|
ls.registerFunc("createRootGroupInstance", createRootGroupInstance);
|
||||||
ls.registerFunc("createUIElement", createUIElement);
|
ls.registerFunc("createUIElement", createUIElement);
|
||||||
ls.registerFunc("launchContextMenuInGame", launchContextMenuInGame);
|
ls.registerFunc("launchContextMenuInGame", launchContextMenuInGame);
|
||||||
ls.registerFunc("parseInterfaceFromString", parseInterfaceFromString);
|
ls.registerFunc("parseInterfaceFromString", parseInterfaceFromString);
|
||||||
|
@ -1356,6 +1357,19 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
ls.registerFunc("enableModalWindow", enableModalWindow);
|
ls.registerFunc("enableModalWindow", enableModalWindow);
|
||||||
ls.registerFunc("disableModalWindow", disableModalWindow);
|
ls.registerFunc("disableModalWindow", disableModalWindow);
|
||||||
ls.registerFunc("getPlayerPos", getPlayerPos);
|
ls.registerFunc("getPlayerPos", getPlayerPos);
|
||||||
|
ls.registerFunc("getPlayerFront", getPlayerFront);
|
||||||
|
ls.registerFunc("getPlayerDirection", getPlayerDirection);
|
||||||
|
ls.registerFunc("getPlayerGender", getPlayerGender);
|
||||||
|
ls.registerFunc("getPlayerName", getPlayerName);
|
||||||
|
ls.registerFunc("getPlayerTitleRaw", getPlayerTitleRaw);
|
||||||
|
ls.registerFunc("getPlayerTitle", getPlayerTitle);
|
||||||
|
ls.registerFunc("getTargetPos", getTargetPos);
|
||||||
|
ls.registerFunc("getTargetFront", getTargetFront);
|
||||||
|
ls.registerFunc("getTargetDirection", getTargetDirection);
|
||||||
|
ls.registerFunc("getTargetGender", getTargetGender);
|
||||||
|
ls.registerFunc("getTargetName", getTargetName);
|
||||||
|
ls.registerFunc("getTargetTitleRaw", getTargetTitleRaw);
|
||||||
|
ls.registerFunc("getTargetTitle", getTargetTitle);
|
||||||
ls.registerFunc("addSearchPathUser", addSearchPathUser);
|
ls.registerFunc("addSearchPathUser", addSearchPathUser);
|
||||||
ls.registerFunc("displaySystemInfo", displaySystemInfo);
|
ls.registerFunc("displaySystemInfo", displaySystemInfo);
|
||||||
ls.registerFunc("disableContextHelpForControl", disableContextHelpForControl);
|
ls.registerFunc("disableContextHelpForControl", disableContextHelpForControl);
|
||||||
|
@ -1363,6 +1377,7 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
ls.registerFunc("setWeatherValue", setWeatherValue);
|
ls.registerFunc("setWeatherValue", setWeatherValue);
|
||||||
ls.registerFunc("getWeatherValue", getWeatherValue);
|
ls.registerFunc("getWeatherValue", getWeatherValue);
|
||||||
ls.registerFunc("getCompleteIslands", getCompleteIslands);
|
ls.registerFunc("getCompleteIslands", getCompleteIslands);
|
||||||
|
ls.registerFunc("displayBubble", displayBubble);
|
||||||
ls.registerFunc("getIslandId", getIslandId);
|
ls.registerFunc("getIslandId", getIslandId);
|
||||||
ls.registerFunc("getClientCfgVar", getClientCfgVar);
|
ls.registerFunc("getClientCfgVar", getClientCfgVar);
|
||||||
ls.registerFunc("isPlayerFreeTrial", isPlayerFreeTrial);
|
ls.registerFunc("isPlayerFreeTrial", isPlayerFreeTrial);
|
||||||
|
@ -1370,14 +1385,18 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
ls.registerFunc("isInRingMode", isInRingMode);
|
ls.registerFunc("isInRingMode", isInRingMode);
|
||||||
ls.registerFunc("getUserRace", getUserRace);
|
ls.registerFunc("getUserRace", getUserRace);
|
||||||
ls.registerFunc("getSheet2idx", getSheet2idx);
|
ls.registerFunc("getSheet2idx", getSheet2idx);
|
||||||
|
ls.registerFunc("getTargetSlot", getTargetSlot);
|
||||||
|
ls.registerFunc("getSlotDataSetId", getSlotDataSetId);
|
||||||
|
|
||||||
// Through LUABind API
|
// Through LUABind API
|
||||||
lua_State *L= ls.getStatePointer();
|
lua_State *L= ls.getStatePointer();
|
||||||
|
|
||||||
luabind::module(L)
|
luabind::module(L)
|
||||||
[
|
[
|
||||||
|
LUABIND_FUNC(addDbProp),
|
||||||
LUABIND_FUNC(getDbProp),
|
LUABIND_FUNC(getDbProp),
|
||||||
LUABIND_FUNC(setDbProp),
|
LUABIND_FUNC(setDbProp),
|
||||||
|
LUABIND_FUNC(delDbProp),
|
||||||
LUABIND_FUNC(debugInfo),
|
LUABIND_FUNC(debugInfo),
|
||||||
LUABIND_FUNC(rawDebugInfo),
|
LUABIND_FUNC(rawDebugInfo),
|
||||||
LUABIND_FUNC(dumpCallStack),
|
LUABIND_FUNC(dumpCallStack),
|
||||||
|
@ -1456,9 +1475,16 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
||||||
luabind::def("shellExecute", CMiscFunctions::shellExecute),
|
luabind::def("shellExecute", CMiscFunctions::shellExecute),
|
||||||
|
|
||||||
LUABIND_FUNC(getPlayerLevel),
|
LUABIND_FUNC(getPlayerLevel),
|
||||||
|
LUABIND_FUNC(getPlayerVpa),
|
||||||
|
LUABIND_FUNC(getPlayerVpb),
|
||||||
|
LUABIND_FUNC(getPlayerVpc),
|
||||||
LUABIND_FUNC(getTargetLevel),
|
LUABIND_FUNC(getTargetLevel),
|
||||||
LUABIND_FUNC(getTargetForceRegion),
|
LUABIND_FUNC(getTargetForceRegion),
|
||||||
LUABIND_FUNC(getTargetLevelForce),
|
LUABIND_FUNC(getTargetLevelForce),
|
||||||
|
LUABIND_FUNC(getTargetSheet),
|
||||||
|
LUABIND_FUNC(getTargetVpa),
|
||||||
|
LUABIND_FUNC(getTargetVpb),
|
||||||
|
LUABIND_FUNC(getTargetVpc),
|
||||||
LUABIND_FUNC(isTargetNPC),
|
LUABIND_FUNC(isTargetNPC),
|
||||||
LUABIND_FUNC(isTargetPlayer), // return 'true' if the target is an npc
|
LUABIND_FUNC(isTargetPlayer), // return 'true' if the target is an npc
|
||||||
LUABIND_FUNC(isTargetUser),
|
LUABIND_FUNC(isTargetUser),
|
||||||
|
@ -1686,12 +1712,60 @@ void CLuaIHM::setDbProp(const std::string &dbProp, sint32 value)
|
||||||
// Write to the DB if found
|
// Write to the DB if found
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, false);
|
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, false);
|
||||||
|
|
||||||
if(node)
|
if(node)
|
||||||
node->setValue32(value);
|
node->setValue32(value);
|
||||||
else
|
else
|
||||||
debugInfo(toString("setDbProp(): '%s' dbProp Not found", dbProp.c_str()));
|
debugInfo(toString("setDbProp(): '%s' dbProp Not found", dbProp.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLuaIHM::delDbProp(const string &dbProp)
|
||||||
|
{
|
||||||
|
//H_AUTO(Lua_CLuaIHM_setDbProp)
|
||||||
|
// Do not allow Write on SERVER: or LOCAL:
|
||||||
|
static const string dbServer= "SERVER:";
|
||||||
|
static const string dbLocal= "LOCAL:";
|
||||||
|
static const string dbLocalR2= "LOCAL:R2";
|
||||||
|
if( (0==dbProp.compare(0, dbServer.size(), dbServer)) ||
|
||||||
|
(0==dbProp.compare(0, dbLocal.size(), dbLocal))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (0!=dbProp.compare(0, dbLocalR2.size(), dbLocalR2))
|
||||||
|
{
|
||||||
|
nlstop;
|
||||||
|
throw ELuaIHMException("setDbProp(): You are not allowed to write on 'SERVER:...' or 'LOCAL:...' database");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write to the DB if found
|
||||||
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
pIM->delDbProp(dbProp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLuaIHM::addDbProp(const std::string &dbProp, sint32 value)
|
||||||
|
{
|
||||||
|
//H_AUTO(Lua_CLuaIHM_setDbProp)
|
||||||
|
// Do not allow Write on SERVER: or LOCAL:
|
||||||
|
static const std::string dbServer= "SERVER:";
|
||||||
|
static const std::string dbLocal= "LOCAL:";
|
||||||
|
static const std::string dbLocalR2= "LOCAL:R2";
|
||||||
|
if( (0==dbProp.compare(0, dbServer.size(), dbServer)) ||
|
||||||
|
(0==dbProp.compare(0, dbLocal.size(), dbLocal))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (0!=dbProp.compare(0, dbLocalR2.size(), dbLocalR2))
|
||||||
|
{
|
||||||
|
nlstop;
|
||||||
|
throw ELuaIHMException("setDbProp(): You are not allowed to write on 'SERVER:...' or 'LOCAL:...' database");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write to the DB if found
|
||||||
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, true);
|
||||||
|
if(node)
|
||||||
|
node->setValue32(value);
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CLuaIHM::debugInfo(const std::string &cstDbg)
|
void CLuaIHM::debugInfo(const std::string &cstDbg)
|
||||||
|
@ -1865,7 +1939,21 @@ std::string CLuaIHM::getDefine(const std::string &def)
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
static CEntityCL *getTargetSlot()
|
static sint32 getTargetSlotNr()
|
||||||
|
{
|
||||||
|
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||||
|
if (!node) return 0;
|
||||||
|
if ((uint8) node->getValue32() == (uint8) CLFECOMMON::INVALID_SLOT)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return node->getValue32();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
static CEntityCL *getTargetEntity()
|
||||||
{
|
{
|
||||||
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -1878,6 +1966,12 @@ static CEntityCL *getTargetSlot()
|
||||||
return EntitiesMngr.entity((uint) node->getValue32());
|
return EntitiesMngr.entity((uint) node->getValue32());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
static CEntityCL *getSlotEntity(uint slot)
|
||||||
|
{
|
||||||
|
return EntitiesMngr.entity(slot);
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
sint32 CLuaIHM::getPlayerLevel()
|
sint32 CLuaIHM::getPlayerLevel()
|
||||||
{
|
{
|
||||||
|
@ -1890,10 +1984,31 @@ sint32 CLuaIHM::getPlayerLevel()
|
||||||
return sint32(maxskill);
|
return sint32(maxskill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getPlayerVpa()
|
||||||
|
{
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getPlayerVpb()
|
||||||
|
{
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getPlayerVpc()
|
||||||
|
{
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E0:P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
sint32 CLuaIHM::getTargetLevel()
|
sint32 CLuaIHM::getTargetLevel()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return -1;
|
if (!target) return -1;
|
||||||
if ( target->isPlayer() )
|
if ( target->isPlayer() )
|
||||||
{
|
{
|
||||||
|
@ -1913,10 +2028,52 @@ sint32 CLuaIHM::getTargetLevel()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
ucstring CLuaIHM::getTargetSheet()
|
||||||
|
{
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return ucstring();
|
||||||
|
|
||||||
|
return target->sheetId().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getTargetVpa()
|
||||||
|
{
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
||||||
|
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getTargetVpb()
|
||||||
|
{
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||||
|
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
sint64 CLuaIHM::getTargetVpc()
|
||||||
|
{
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
|
||||||
|
sint64 prop = CInterfaceManager::getInstance()->getDbProp("SERVER:Entities:E"+toString("%d", getTargetSlotNr())+":P"+toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
||||||
|
|
||||||
|
return prop;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
sint32 CLuaIHM::getTargetForceRegion()
|
sint32 CLuaIHM::getTargetForceRegion()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return -1;
|
if (!target) return -1;
|
||||||
if ( target->isPlayer() )
|
if ( target->isPlayer() )
|
||||||
{
|
{
|
||||||
|
@ -1944,7 +2101,7 @@ sint32 CLuaIHM::getTargetForceRegion()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
sint32 CLuaIHM::getTargetLevelForce()
|
sint32 CLuaIHM::getTargetLevelForce()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return -1;
|
if (!target) return -1;
|
||||||
if ( target->isPlayer() )
|
if ( target->isPlayer() )
|
||||||
{
|
{
|
||||||
|
@ -1972,7 +2129,7 @@ sint32 CLuaIHM::getTargetLevelForce()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLuaIHM::isTargetNPC()
|
bool CLuaIHM::isTargetNPC()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return false;
|
if (!target) return false;
|
||||||
return target->isNPC();
|
return target->isNPC();
|
||||||
}
|
}
|
||||||
|
@ -1980,7 +2137,7 @@ bool CLuaIHM::isTargetNPC()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLuaIHM::isTargetPlayer()
|
bool CLuaIHM::isTargetPlayer()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return false;
|
if (!target) return false;
|
||||||
return target->isPlayer();
|
return target->isPlayer();
|
||||||
}
|
}
|
||||||
|
@ -1989,7 +2146,7 @@ bool CLuaIHM::isTargetPlayer()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLuaIHM::isTargetUser()
|
bool CLuaIHM::isTargetUser()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return false;
|
if (!target) return false;
|
||||||
return target->isUser();
|
return target->isUser();
|
||||||
}
|
}
|
||||||
|
@ -1998,15 +2155,15 @@ bool CLuaIHM::isTargetUser()
|
||||||
bool CLuaIHM::isPlayerInPVPMode()
|
bool CLuaIHM::isPlayerInPVPMode()
|
||||||
{
|
{
|
||||||
if (!UserEntity) return false;
|
if (!UserEntity) return false;
|
||||||
return (UserEntity->getPvpMode() & PVP_MODE::PvpFaction || UserEntity->getPvpMode() & PVP_MODE::PvpFactionFlagged || UserEntity->getPvpMode() & PVP_MODE::PvpZoneFaction);
|
return (UserEntity->getPvpMode() & PVP_MODE::PvpFaction || UserEntity->getPvpMode() & PVP_MODE::PvpFactionFlagged || UserEntity->getPvpMode() & PVP_MODE::PvpZoneFaction) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLuaIHM::isTargetInPVPMode()
|
bool CLuaIHM::isTargetInPVPMode()
|
||||||
{
|
{
|
||||||
CEntityCL *target = getTargetSlot();
|
CEntityCL *target = getTargetEntity();
|
||||||
if (!target) return false;
|
if (!target) return false;
|
||||||
return (target->getPvpMode() & PVP_MODE::PvpFaction || target->getPvpMode() & PVP_MODE::PvpFactionFlagged || target->getPvpMode() & PVP_MODE::PvpZoneFaction);
|
return (target->getPvpMode() & PVP_MODE::PvpFaction || target->getPvpMode() & PVP_MODE::PvpFactionFlagged || target->getPvpMode() & PVP_MODE::PvpZoneFaction) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -2368,6 +2525,53 @@ int CLuaIHM::createGroupInstance(CLuaState &ls)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::createRootGroupInstance(CLuaState &ls)
|
||||||
|
{
|
||||||
|
//H_AUTO(Lua_CLuaIHM_createGroupInstance)
|
||||||
|
const char *funcName = "createRootGroupInstance";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TTABLE);
|
||||||
|
std::vector<std::pair<std::string, std::string> > templateParams;
|
||||||
|
CLuaObject params;
|
||||||
|
params.pop(ls);
|
||||||
|
ENUM_LUA_TABLE(params, it)
|
||||||
|
{
|
||||||
|
if (!it.nextKey().isString())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad key encountered with type %s, string expected.", funcName, it.nextKey().getTypename());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!it.nextValue().isString())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad value encountered with type %s for key %s, string expected.", funcName, it.nextValue().getTypename(), it.nextKey().toString().c_str());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
templateParams.push_back(std::pair<std::string, std::string>(it.nextKey().toString(), it.nextValue().toString())); // strange compilation bug here when I use std::make_pair ... :(
|
||||||
|
}
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CInterfaceGroup *result = im->createGroupInstance(ls.toString(1), "ui:interface:"+string(ls.toString(2)), templateParams);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
ls.pushNil();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result->setId("ui:interface:"+string(ls.toString(2)));
|
||||||
|
result->updateCoords();
|
||||||
|
im->addWindowToMasterGroup("ui:interface", result);
|
||||||
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
||||||
|
result->setParent(pRoot);
|
||||||
|
if (pRoot)
|
||||||
|
pRoot->addGroup(result);
|
||||||
|
result->setActive(true);
|
||||||
|
CLuaIHM::pushUIOnStack(ls, result);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CLuaIHM::createUIElement(CLuaState &ls)
|
int CLuaIHM::createUIElement(CLuaState &ls)
|
||||||
{
|
{
|
||||||
|
@ -2407,6 +2611,42 @@ int CLuaIHM::createUIElement(CLuaState &ls)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::displayBubble(CLuaState &ls)
|
||||||
|
{
|
||||||
|
//H_AUTO(Lua_CLuaIHM_createUIElement)
|
||||||
|
const char *funcName = "displayBubble";
|
||||||
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
|
||||||
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TTABLE);
|
||||||
|
std::vector<std::string> strs;
|
||||||
|
std::vector<std::string> links;
|
||||||
|
CLuaObject params;
|
||||||
|
params.pop(ls);
|
||||||
|
ENUM_LUA_TABLE(params, it)
|
||||||
|
{
|
||||||
|
if (!it.nextKey().isString())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad key encountered with type %s, string expected.", funcName, it.nextKey().getTypename());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!it.nextValue().isString())
|
||||||
|
{
|
||||||
|
nlwarning("%s : bad value encountered with type %s for key %s, string expected.", funcName, it.nextValue().getTypename(), it.nextKey().toString().c_str());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
links.push_back(it.nextValue().toString());
|
||||||
|
strs.push_back(it.nextKey().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
InSceneBubbleManager.webIgChatOpen((uint32)ls.toNumber(1), ls.toString(2), strs, links);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CLuaIHM::getCompleteIslands(CLuaState &ls)
|
int CLuaIHM::getCompleteIslands(CLuaState &ls)
|
||||||
{
|
{
|
||||||
|
@ -3523,7 +3763,7 @@ void CLuaIHM::browseNpcWebPage(const std::string &htmlId, const std::string &url
|
||||||
string("&lang=") + ClientCfg.getHtmlLanguageCode() +
|
string("&lang=") + ClientCfg.getHtmlLanguageCode() +
|
||||||
string("&guild_name=") + guildName;
|
string("&guild_name=") + guildName;
|
||||||
}
|
}
|
||||||
/*
|
/* Already added by GroupHtml
|
||||||
if(webig)
|
if(webig)
|
||||||
{
|
{
|
||||||
// append special webig auth params
|
// append special webig auth params
|
||||||
|
@ -4242,6 +4482,126 @@ int CLuaIHM::getPlayerPos(CLuaState &ls)
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerFront(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerFront", 0);
|
||||||
|
ls.push(atan2(UserEntity->front().y, UserEntity->front().x));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerDirection(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerDirection", 0);
|
||||||
|
ls.push(atan2(UserEntity->dir().y, UserEntity->dir().x));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerGender(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerGender", 0);
|
||||||
|
ls.push((lua_Number)(UserEntity->getGender()));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerName(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerName", 0);
|
||||||
|
ls.push(UserEntity->getEntityName().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerTitleRaw(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerTitleRaw", 0);
|
||||||
|
ls.push(UserEntity->getTitleRaw().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getPlayerTitle(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getPlayerTitle", 0);
|
||||||
|
ls.push(UserEntity->getTitle().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetPos(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetPos", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(target->pos().x);
|
||||||
|
ls.push(target->pos().y);
|
||||||
|
ls.push(target->pos().z);
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetFront(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetFront", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(atan2(target->front().y, target->front().x));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetDirection(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetDirection", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(atan2(target->dir().y, target->dir().x));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetGender(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetGender", 0);
|
||||||
|
CCharacterCL* target = (CCharacterCL*)getTargetEntity();
|
||||||
|
if (!target) return (int)GSGENDER::unknown;
|
||||||
|
ls.push((lua_Number)(target->getGender()));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetName(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetName", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(target->getEntityName().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetTitleRaw(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetTitleRaw", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(target->getTitleRaw().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetTitle(CLuaState &ls)
|
||||||
|
{
|
||||||
|
checkArgCount(ls, "getTargetTitle", 0);
|
||||||
|
CEntityCL *target = getTargetEntity();
|
||||||
|
if (!target) return 0;
|
||||||
|
ls.push(target->getTitle().toUtf8());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CLuaIHM::addSearchPathUser(CLuaState &ls)
|
int CLuaIHM::addSearchPathUser(CLuaState &ls)
|
||||||
{
|
{
|
||||||
|
@ -4437,3 +4797,23 @@ int CLuaIHM::getSheet2idx(CLuaState &ls)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getTargetSlot(CLuaState &ls)
|
||||||
|
{
|
||||||
|
uint32 slot = (uint32)getTargetSlotNr();
|
||||||
|
ls.push((lua_Number)slot);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CLuaIHM::getSlotDataSetId(CLuaState &ls)
|
||||||
|
{
|
||||||
|
CLuaIHM::checkArgCount(ls, "getSlotDataSetId", 1);
|
||||||
|
CLuaIHM::checkArgType(ls, "getSlotDataSetId", 1, LUA_TNUMBER);
|
||||||
|
|
||||||
|
uint32 slot = (uint32)ls.toNumber(1);
|
||||||
|
CEntityCL *e = getSlotEntity(slot);
|
||||||
|
string id = toString(e->dataSetId());
|
||||||
|
ls.push(id);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -185,9 +185,16 @@ private:
|
||||||
|
|
||||||
// LUA exported Functions with luabind
|
// LUA exported Functions with luabind
|
||||||
static sint32 getPlayerLevel(); // get max level among player skills (magi, combat, crafting ,foraging)
|
static sint32 getPlayerLevel(); // get max level among player skills (magi, combat, crafting ,foraging)
|
||||||
|
static sint64 getPlayerVpa();
|
||||||
|
static sint64 getPlayerVpb();
|
||||||
|
static sint64 getPlayerVpc();
|
||||||
static sint32 getTargetLevel(); // get current, precise level of the selected target, or -1 if there's no such selected target
|
static sint32 getTargetLevel(); // get current, precise level of the selected target, or -1 if there's no such selected target
|
||||||
static sint32 getTargetForceRegion(); // get 'force region' for current target, or -1 if there's no selected target
|
static sint32 getTargetForceRegion(); // get 'force region' for current target, or -1 if there's no selected target
|
||||||
static sint32 getTargetLevelForce(); // get 'level force' for current target, or -1 if there's no selected target
|
static sint32 getTargetLevelForce(); // get 'level force' for current target, or -1 if there's no selected target
|
||||||
|
static ucstring getTargetSheet(); // get the name of the target sheet (like 'zoha2old.creature')
|
||||||
|
static sint64 getTargetVpa();
|
||||||
|
static sint64 getTargetVpb();
|
||||||
|
static sint64 getTargetVpc();
|
||||||
static bool isTargetNPC(); // return 'true' if the target is an npc
|
static bool isTargetNPC(); // return 'true' if the target is an npc
|
||||||
static bool isTargetPlayer(); // return 'true' if the target is a player
|
static bool isTargetPlayer(); // return 'true' if the target is a player
|
||||||
static bool isTargetUser(); // return 'true' if the target is the user
|
static bool isTargetUser(); // return 'true' if the target is the user
|
||||||
|
@ -206,6 +213,8 @@ private:
|
||||||
static double getPreciseLocalTime();
|
static double getPreciseLocalTime();
|
||||||
static sint32 getDbProp(const std::string &dbProp); // return 0 if not found.
|
static sint32 getDbProp(const std::string &dbProp); // return 0 if not found.
|
||||||
static void setDbProp(const std::string &dbProp, sint32 value); // Nb: the db prop is not created if not present.
|
static void setDbProp(const std::string &dbProp, sint32 value); // Nb: the db prop is not created if not present.
|
||||||
|
static void addDbProp(const std::string &dbProp, sint32 value); // Nb: the db prop is created if not present.
|
||||||
|
static void delDbProp(const std::string &dbProp);
|
||||||
static std::string getDefine(const std::string &def);
|
static std::string getDefine(const std::string &def);
|
||||||
static void messageBox(const ucstring &text);
|
static void messageBox(const ucstring &text);
|
||||||
static void messageBox(const ucstring &text, const std::string &masterGroup);
|
static void messageBox(const ucstring &text, const std::string &masterGroup);
|
||||||
|
@ -291,12 +300,19 @@ private:
|
||||||
// param 2 = id of parent where the instance will be inserted
|
// param 2 = id of parent where the instance will be inserted
|
||||||
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
||||||
// such as { id="foo", x="10" } etc. -> returns a new instance of the template, or nil on fail
|
// such as { id="foo", x="10" } etc. -> returns a new instance of the template, or nil on fail
|
||||||
|
static int createRootGroupInstance(CLuaState &ls); // params : param 1 = template name,
|
||||||
|
// param 2 = id of parent where the instance will be inserted
|
||||||
|
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
||||||
|
// such as { id="foo", x="10" } etc. -> returns a new instance of the template, or nil on fail
|
||||||
static int createUIElement(CLuaState &ls); // params : param 1 = template name,
|
static int createUIElement(CLuaState &ls); // params : param 1 = template name,
|
||||||
// param 2 = id of parent where the instance will be inserted
|
// param 2 = id of parent where the instance will be inserted
|
||||||
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
||||||
// such as { id="foo", x="10" } etc. -> returns a new instance of the template, or nil on fail
|
// such as { id="foo", x="10" } etc. -> returns a new instance of the template, or nil on fail
|
||||||
|
|
||||||
|
static int displayBubble(CLuaState &ls); // params : param 1 = bot id
|
||||||
|
// param 2 = text
|
||||||
|
// param 3 = table with all strings and urls
|
||||||
|
// {"main text"="http:///", "text option 1"="http:///", "text option 2"="http:///") etc...
|
||||||
static int getIndexInDB(CLuaState &ls); // params: CDBCtrlSheet*.... return: index, or 0 if error
|
static int getIndexInDB(CLuaState &ls); // params: CDBCtrlSheet*.... return: index, or 0 if error
|
||||||
static int getUIId(CLuaState &ls); // params: CInterfaceElement*. return: ui id (empty if error)
|
static int getUIId(CLuaState &ls); // params: CInterfaceElement*. return: ui id (empty if error)
|
||||||
static int runAH(CLuaState &ls); // params: CInterfaceElement *, "ah", "params". return: none
|
static int runAH(CLuaState &ls); // params: CInterfaceElement *, "ah", "params". return: none
|
||||||
|
@ -345,6 +361,19 @@ private:
|
||||||
static int enableModalWindow(CLuaState &ls);
|
static int enableModalWindow(CLuaState &ls);
|
||||||
static int disableModalWindow(CLuaState &ls);
|
static int disableModalWindow(CLuaState &ls);
|
||||||
static int getPlayerPos(CLuaState &ls);
|
static int getPlayerPos(CLuaState &ls);
|
||||||
|
static int getPlayerFront(CLuaState &ls);
|
||||||
|
static int getPlayerDirection(CLuaState &ls);
|
||||||
|
static int getPlayerGender(CLuaState &ls);
|
||||||
|
static int getPlayerName(CLuaState &ls);
|
||||||
|
static int getPlayerTitleRaw(CLuaState &ls);
|
||||||
|
static int getPlayerTitle(CLuaState &ls);
|
||||||
|
static int getTargetPos(CLuaState &ls);
|
||||||
|
static int getTargetFront(CLuaState &ls);
|
||||||
|
static int getTargetDirection(CLuaState &ls);
|
||||||
|
static int getTargetGender(CLuaState &ls);
|
||||||
|
static int getTargetName(CLuaState &ls);
|
||||||
|
static int getTargetTitleRaw(CLuaState &ls);
|
||||||
|
static int getTargetTitle(CLuaState &ls);
|
||||||
static int addSearchPathUser(CLuaState &ls);
|
static int addSearchPathUser(CLuaState &ls);
|
||||||
static int getClientCfgVar(CLuaState &ls);
|
static int getClientCfgVar(CLuaState &ls);
|
||||||
static int isPlayerFreeTrial(CLuaState &ls);
|
static int isPlayerFreeTrial(CLuaState &ls);
|
||||||
|
@ -352,6 +381,8 @@ private:
|
||||||
static int isInRingMode(CLuaState &ls);
|
static int isInRingMode(CLuaState &ls);
|
||||||
static int getUserRace(CLuaState &ls);
|
static int getUserRace(CLuaState &ls);
|
||||||
static int getSheet2idx(CLuaState &ls);
|
static int getSheet2idx(CLuaState &ls);
|
||||||
|
static int getTargetSlot(CLuaState &ls);
|
||||||
|
static int getSlotDataSetId(CLuaState &ls);
|
||||||
|
|
||||||
|
|
||||||
// LUA functions exported for Dev only (debug)
|
// LUA functions exported for Dev only (debug)
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "../net_manager.h"
|
#include "../net_manager.h"
|
||||||
#include "../connection.h"
|
#include "../connection.h"
|
||||||
#include "group_tab.h"
|
#include "group_tab.h"
|
||||||
|
#include "guild_manager.h"
|
||||||
// Game share
|
// Game share
|
||||||
#include "game_share/entity_types.h"
|
#include "game_share/entity_types.h"
|
||||||
// NeL
|
// NeL
|
||||||
|
@ -1418,7 +1419,47 @@ void CPeopleInterraction::updateContactInList(uint32 contactId, TCharConnectionS
|
||||||
{
|
{
|
||||||
sint index = FriendList.getIndexFromContactId(contactId);
|
sint index = FriendList.getIndexFromContactId(contactId);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
|
{
|
||||||
|
if (FriendList.getOnline(index) != online)
|
||||||
|
{
|
||||||
|
// Only do work if online status has changed
|
||||||
FriendList.setOnline(index, online);
|
FriendList.setOnline(index, online);
|
||||||
|
|
||||||
|
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||||
|
if (node && node->getValueBool())
|
||||||
|
{
|
||||||
|
// Only show the message if this player is not in my guild (because then the guild manager will show a message)
|
||||||
|
std::vector<SGuildMember> GuildMembers = CGuildManager::getInstance()->getGuildMembers();
|
||||||
|
bool bOnlyFriend = true;
|
||||||
|
ucstring name = toLower(FriendList.getName(index));
|
||||||
|
for (uint i = 0; i < GuildMembers.size(); ++i)
|
||||||
|
{
|
||||||
|
if (toLower(GuildMembers[i].Name) == name)
|
||||||
|
{
|
||||||
|
bOnlyFriend = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Player is not in my guild
|
||||||
|
if (bOnlyFriend)
|
||||||
|
{
|
||||||
|
ucstring msg = (online != ccs_offline) ? CI18N::get("uiPlayerOnline") : CI18N::get("uiPlayerOffline");
|
||||||
|
strFindReplace(msg, "%s", FriendList.getName(index));
|
||||||
|
string cat = getStringCategory(msg, msg);
|
||||||
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
||||||
|
NLMISC::CRGBA col = CRGBA::Yellow;
|
||||||
|
it = ClientCfg.SystemInfoParams.find(toLower(cat));
|
||||||
|
if (it != ClientCfg.SystemInfoParams.end())
|
||||||
|
{
|
||||||
|
col = it->second.Color;
|
||||||
|
}
|
||||||
|
bool dummy;
|
||||||
|
PeopleInterraction.ChatInput.AroundMe.displayMessage(msg, col, 2, &dummy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1988,6 +2029,39 @@ public:
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerDismissMember, "dismiss_member");
|
REGISTER_ACTION_HANDLER( CHandlerDismissMember, "dismiss_member");
|
||||||
|
|
||||||
|
//=================================================================================================================
|
||||||
|
// Set the leader of the team
|
||||||
|
class CHandlerSetTeamLeader : public IActionHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
|
{
|
||||||
|
// retrieve the index of the people
|
||||||
|
CPeopleList *list;
|
||||||
|
uint peopleIndex;
|
||||||
|
if (PeopleInterraction.getPeopleFromCurrentMenu(list, peopleIndex))
|
||||||
|
{
|
||||||
|
if (list == &PeopleInterraction.TeamList) // check for good list
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
const string msgName = "TEAM:SET_LEADER";
|
||||||
|
CBitMemStream out;
|
||||||
|
if(GenericMsgHeaderMngr.pushNameToStream(msgName, out))
|
||||||
|
{
|
||||||
|
uint8 teamMember = (uint8)(peopleIndex);
|
||||||
|
out.serial(teamMember);
|
||||||
|
NetMngr.push(out);
|
||||||
|
//nlinfo("impulseCallBack : %s %d sent", msgName.c_str(), teamMember);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
nlwarning("command 'set_leader': unknown message named '%s'.", msgName.c_str());
|
||||||
|
*/
|
||||||
|
NLMISC::ICommand::execute("a setTeamLeader " + toString(peopleIndex), g_log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
REGISTER_ACTION_HANDLER( CHandlerSetTeamLeader, "set_team_leader");
|
||||||
|
|
||||||
//=================================================================================================================
|
//=================================================================================================================
|
||||||
// Set a successor for the team
|
// Set a successor for the team
|
||||||
|
@ -3236,6 +3310,12 @@ NLMISC_COMMAND(chatLog, "", "")
|
||||||
if (pIM->getLogState())
|
if (pIM->getLogState())
|
||||||
pIM->displaySystemInfo(CI18N::get("uiLogTurnedOn"));
|
pIM->displaySystemInfo(CI18N::get("uiLogTurnedOn"));
|
||||||
|
|
||||||
|
CCDBNodeLeaf *node = pIM->getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||||
|
if (node)
|
||||||
|
{
|
||||||
|
node->setValue32(pIM->getLogState() ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,8 @@ bool CPeopleList::sortExByOnline(const CPeople& a, const CPeople& b)
|
||||||
{
|
{
|
||||||
return (name_a < name_b);
|
return (name_a < name_b);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
// Compare online status
|
// Compare online status
|
||||||
switch (a.Online)
|
switch (a.Online)
|
||||||
{
|
{
|
||||||
|
@ -467,14 +468,8 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ucstring cur_time;
|
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
ucstring finalMsg = csr + CI18N::get("youTell") + ": " + msg;
|
||||||
if (pNL && pNL->getValueBool())
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
|
|
||||||
ucstring csr;
|
|
||||||
if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) ");
|
|
||||||
ucstring finalMsg = cur_time + csr + CI18N::get("youTell") + ": " + msg;
|
|
||||||
// display msg with good color
|
// display msg with good color
|
||||||
CInterfaceProperty prop;
|
CInterfaceProperty prop;
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
|
@ -783,10 +778,6 @@ void CPeopleList::setOnline(uint index, TCharConnectionState online)
|
||||||
|
|
||||||
_Peoples[index].Online = online;
|
_Peoples[index].Online = online;
|
||||||
|
|
||||||
// If the people goes offline remove eventually opened chat
|
|
||||||
if (online == ccs_offline)
|
|
||||||
openCloseChat(index, false);
|
|
||||||
|
|
||||||
updatePeopleMenu(index);
|
updatePeopleMenu(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -944,14 +935,8 @@ class CHandlerContactEntry : public IActionHandler
|
||||||
ucstring final;
|
ucstring final;
|
||||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, false);
|
CChatWindow::encodeColorTag(prop.getRGBA(), final, false);
|
||||||
|
|
||||||
ucstring cur_time;
|
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
final += csr + CI18N::get("youTell")+": ";
|
||||||
if (pNL && pNL->getValueBool())
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
|
|
||||||
ucstring csr;
|
|
||||||
if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) ");
|
|
||||||
final += cur_time + csr + CI18N::get("youTell")+": ";
|
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
||||||
final += text;
|
final += text;
|
||||||
|
@ -962,7 +947,6 @@ class CHandlerContactEntry : public IActionHandler
|
||||||
strFindReplace(final, CI18N::get("youTell"), s);
|
strFindReplace(final, CI18N::get("youTell"), s);
|
||||||
CInterfaceManager::getInstance()->log(final);
|
CInterfaceManager::getInstance()->log(final);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -139,6 +139,7 @@ void CPlayerTrade::restoreItem(CDBCtrlSheet *exchangeSlot)
|
||||||
im.getBagItem(emptySlot).setWeight((uint32) exchangeSlot->getItemWeight());
|
im.getBagItem(emptySlot).setWeight((uint32) exchangeSlot->getItemWeight());
|
||||||
im.getBagItem(emptySlot).setNameId(exchangeSlot->getItemNameId());
|
im.getBagItem(emptySlot).setNameId(exchangeSlot->getItemNameId());
|
||||||
im.getBagItem(emptySlot).setInfoVersion(exchangeSlot->getItemInfoVersion());
|
im.getBagItem(emptySlot).setInfoVersion(exchangeSlot->getItemInfoVersion());
|
||||||
|
im.getBagItem(emptySlot).setResaleFlag(exchangeSlot->getItemResaleFlag());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ void CSkillManager::setPlayerTitle(const std::string &name)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
#define GROUP_TITLE_COMBO "ui:interface:info_player_skills:content:basics_skills:title:player_title"
|
#define GROUP_TITLE_COMBO "ui:interface:info_player_skills:content:webinfos:title:player_title"
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
class CHandlerTitleInit: public IActionHandler
|
class CHandlerTitleInit: public IActionHandler
|
||||||
|
|
|
@ -70,6 +70,10 @@ public:
|
||||||
|
|
||||||
// from CInterfaceElement
|
// from CInterfaceElement
|
||||||
virtual void visit(CInterfaceElementVisitor *visitor);
|
virtual void visit(CInterfaceElementVisitor *visitor);
|
||||||
|
|
||||||
|
// special for mouse over : return true and fill the name of the cursor to display
|
||||||
|
virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */) { return false; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ public:
|
||||||
|
|
||||||
bool getScale() const { return _Scale; }
|
bool getScale() const { return _Scale; }
|
||||||
void setScale (bool s) { _Scale = s; }
|
void setScale (bool s) { _Scale = s; }
|
||||||
|
bool getTile() const { return _Tile; }
|
||||||
|
void setTile (bool s) { _Tile = s; }
|
||||||
void setColor (const NLMISC::CRGBA &r) { _Color = r; }
|
void setColor (const NLMISC::CRGBA &r) { _Color = r; }
|
||||||
|
|
||||||
// Reflected
|
// Reflected
|
||||||
|
|
|
@ -42,5 +42,23 @@ void CViewLink::setHTMLView(CGroupHTML *html)
|
||||||
HTML = html;
|
HTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
bool CViewLink::getMouseOverShape(string &texName, uint8 &rot, CRGBA &col)
|
||||||
|
{
|
||||||
|
if (HTML != NULL)
|
||||||
|
{
|
||||||
|
if (!LinkTitle.empty())
|
||||||
|
{
|
||||||
|
texName = LinkTitle;
|
||||||
|
rot= 0;
|
||||||
|
col = CRGBA::White;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,11 @@ public:
|
||||||
// The URI
|
// The URI
|
||||||
std::string Link;
|
std::string Link;
|
||||||
|
|
||||||
|
std::string LinkTitle;
|
||||||
|
|
||||||
// Set the main group
|
// Set the main group
|
||||||
void setHTMLView(class CGroupHTML *html);
|
void setHTMLView(class CGroupHTML *html);
|
||||||
|
bool getMouseOverShape(std::string &texName, uint8 &rot, NLMISC::CRGBA &col);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ CViewPointer::CViewPointer (const TCtorParam ¶m)
|
||||||
_Color = CRGBA(255,255,255,255);
|
_Color = CRGBA(255,255,255,255);
|
||||||
_LastHightLight = NULL;
|
_LastHightLight = NULL;
|
||||||
_StringMode = false;
|
_StringMode = false;
|
||||||
|
_ForceStringMode = false;
|
||||||
_StringCursor = NULL;
|
_StringCursor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,6 +256,41 @@ void CViewPointer::draw ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const vector<CViewBase *> &vUP = pIM->getViewsUnderPointer ();
|
||||||
|
|
||||||
|
for(uint i=0;i<vUP.size();i++)
|
||||||
|
{
|
||||||
|
CViewLink *vLink = dynamic_cast<CViewLink*>(vUP[i]);
|
||||||
|
if (vLink != NULL)
|
||||||
|
{
|
||||||
|
string tooltip;
|
||||||
|
uint8 rot;
|
||||||
|
|
||||||
|
if (vLink->getMouseOverShape(tooltip, rot, col))
|
||||||
|
{
|
||||||
|
setString(ucstring(tooltip));
|
||||||
|
sint32 texId = rVR.getTextureIdFromName ("curs_pick.tga");
|
||||||
|
|
||||||
|
CInterfaceGroup *stringCursor = IsMouseCursorHardware() ? _StringCursorHardware : _StringCursor;
|
||||||
|
if (stringCursor)
|
||||||
|
{
|
||||||
|
stringCursor->setX(_PointerX);
|
||||||
|
stringCursor->setY(_PointerY);
|
||||||
|
stringCursor->updateCoords();
|
||||||
|
stringCursor->draw();
|
||||||
|
// if in hardware mode, force to draw the default cursor no matter what..
|
||||||
|
if (IsMouseCursorHardware())
|
||||||
|
drawCursor(texId, col, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
drawCursor(texId, col, 0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw if capture right
|
// Draw if capture right
|
||||||
pCB = pIM->getCapturePointerRight();
|
pCB = pIM->getCapturePointerRight();
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
|
@ -521,10 +557,43 @@ bool CViewPointer::drawPan(CCtrlBase* pCB, NLMISC::CRGBA col)
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
bool CViewPointer::drawCustom(CCtrlBase* pCB)
|
bool CViewPointer::drawCustom(CCtrlBase* pCB)
|
||||||
{
|
{
|
||||||
std::string texName;
|
string texName;
|
||||||
uint8 rot;
|
uint8 rot;
|
||||||
NLMISC::CRGBA col;
|
NLMISC::CRGBA col;
|
||||||
if (pCB->getMouseOverShape(texName, rot, col))
|
if (pCB->getMouseOverShape(texName, rot, col))
|
||||||
|
{
|
||||||
|
if (texName[0] == '@')
|
||||||
|
{
|
||||||
|
const string &tooltipInfos = texName.substr(1);
|
||||||
|
string tooltip;
|
||||||
|
vector<string> tooltipInfosList;
|
||||||
|
splitString(tooltipInfos, "@", tooltipInfosList);
|
||||||
|
texName = tooltipInfosList[0];
|
||||||
|
tooltip = tooltipInfosList[1];
|
||||||
|
nlinfo(tooltip.c_str());
|
||||||
|
setString(ucstring(tooltip));
|
||||||
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
|
sint32 texId = rVR.getTextureIdFromName (texName);
|
||||||
|
|
||||||
|
CInterfaceGroup *stringCursor = IsMouseCursorHardware() ? _StringCursorHardware : _StringCursor;
|
||||||
|
if (stringCursor)
|
||||||
|
{
|
||||||
|
stringCursor->setX(_PointerX);
|
||||||
|
stringCursor->setY(_PointerY);
|
||||||
|
stringCursor->updateCoords();
|
||||||
|
stringCursor->draw();
|
||||||
|
// if in hardware mode, force to draw the default cursor no matter what..
|
||||||
|
if (IsMouseCursorHardware())
|
||||||
|
drawCursor(texId, col, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
drawCursor(texId, col, 0);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
|
@ -532,6 +601,7 @@ bool CViewPointer::drawCustom(CCtrlBase* pCB)
|
||||||
drawCursor(texId, col, 0);
|
drawCursor(texId, col, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ private:
|
||||||
|
|
||||||
// Cursor mode
|
// Cursor mode
|
||||||
bool _StringMode;
|
bool _StringMode;
|
||||||
|
bool _ForceStringMode;
|
||||||
CInterfaceGroup *_StringCursor;
|
CInterfaceGroup *_StringCursor;
|
||||||
CInterfaceGroup *_StringCursorHardware;
|
CInterfaceGroup *_StringCursorHardware;
|
||||||
ucstring _ContextString;
|
ucstring _ContextString;
|
||||||
|
|
|
@ -743,8 +743,8 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std:
|
||||||
image.UVMin.V = uvMinV;
|
image.UVMin.V = uvMinV;
|
||||||
image.UVMax.U = uvMaxU;
|
image.UVMax.U = uvMaxU;
|
||||||
image.UVMax.V = uvMaxV;
|
image.UVMax.V = uvMaxV;
|
||||||
sTGAname = tgaName;
|
sTGAname = toLower(string(tgaName));
|
||||||
sTGAname = toLower(sTGAname);
|
|
||||||
string::size_type stripPng = sTGAname.find(".png");
|
string::size_type stripPng = sTGAname.find(".png");
|
||||||
if (stripPng != string::npos)
|
if (stripPng != string::npos)
|
||||||
{
|
{
|
||||||
|
@ -752,6 +752,7 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std:
|
||||||
sTGAname[stripPng + 2] = 'g';
|
sTGAname[stripPng + 2] = 'g';
|
||||||
sTGAname[stripPng + 3] = 'a';
|
sTGAname[stripPng + 3] = 'a';
|
||||||
}
|
}
|
||||||
|
|
||||||
image.Name = sTGAname;
|
image.Name = sTGAname;
|
||||||
image.GlobalTexturePtr = &(_GlobalTextures.back());
|
image.GlobalTexturePtr = &(_GlobalTextures.back());
|
||||||
if (getTextureIdFromName(sTGAname) != -1)
|
if (getTextureIdFromName(sTGAname) != -1)
|
||||||
|
@ -1029,6 +1030,7 @@ sint32 CViewRenderer::getTextureIdFromName (const string &sName) const
|
||||||
|
|
||||||
// convert to lowCase
|
// convert to lowCase
|
||||||
string nameLwr = toLower(sName);
|
string nameLwr = toLower(sName);
|
||||||
|
|
||||||
string::size_type stripPng = nameLwr.find(".png");
|
string::size_type stripPng = nameLwr.find(".png");
|
||||||
if (stripPng != string::npos)
|
if (stripPng != string::npos)
|
||||||
{
|
{
|
||||||
|
@ -1531,6 +1533,7 @@ void CViewRenderer::initSystemTextures()
|
||||||
addSystemTexture(RegenTexture, "regen.tga");
|
addSystemTexture(RegenTexture, "regen.tga");
|
||||||
addSystemTexture(RegenBackTexture, "regen_back.tga");
|
addSystemTexture(RegenBackTexture, "regen_back.tga");
|
||||||
addSystemTexture(GlowStarTexture, "glow_star_24.tga");
|
addSystemTexture(GlowStarTexture, "glow_star_24.tga");
|
||||||
|
addSystemTexture(ItemLockedByOwnerTexture, "r2ed_toolbar_lock_small.tga");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ public:
|
||||||
RegenTexture,
|
RegenTexture,
|
||||||
RegenBackTexture,
|
RegenBackTexture,
|
||||||
GlowStarTexture,
|
GlowStarTexture,
|
||||||
|
ItemLockedByOwnerTexture,
|
||||||
NumSystemTextures,
|
NumSystemTextures,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,10 @@ HTAttr p_attr[] =
|
||||||
|
|
||||||
HTAttr div_attr[] =
|
HTAttr div_attr[] =
|
||||||
{
|
{
|
||||||
|
HTML_ATTR(DIV,CLASS),
|
||||||
|
HTML_ATTR(DIV,ID),
|
||||||
HTML_ATTR(DIV,NAME),
|
HTML_ATTR(DIV,NAME),
|
||||||
|
HTML_ATTR(DIV,STYLE),
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -535,6 +538,7 @@ const std::string &setCurrentDomain(const std::string &url)
|
||||||
return HTTPCurrentDomain;
|
return HTTPCurrentDomain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void initLibWWW()
|
void initLibWWW()
|
||||||
{
|
{
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
|
|
|
@ -206,7 +206,10 @@ enum
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
HTML_ATTR(DIV,NAME) = 0,
|
HTML_ATTR(DIV,CLASS) = 0,
|
||||||
|
HTML_ATTR(DIV,ID),
|
||||||
|
HTML_ATTR(DIV,NAME),
|
||||||
|
HTML_ATTR(DIV,STYLE),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -738,8 +738,10 @@ void initLoginScreen()
|
||||||
if(!l.empty())
|
if(!l.empty())
|
||||||
{
|
{
|
||||||
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
if (pGEB != NULL)
|
if (pGEB != NULL && (pGEB->getInputString().empty()))
|
||||||
|
{
|
||||||
pGEB->setInputString(l);
|
pGEB->setInputString(l);
|
||||||
|
}
|
||||||
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
|
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1792,7 +1794,6 @@ class CAHOpenURL : public IActionHandler
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD ret = 0;
|
|
||||||
LPVOID lpMsgBuf;
|
LPVOID lpMsgBuf;
|
||||||
FormatMessage(
|
FormatMessage(
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
|
|
|
@ -2889,6 +2889,7 @@ bool mainLoop()
|
||||||
// This code must remain at the very end of the main loop.
|
// This code must remain at the very end of the main loop.
|
||||||
if(LoginSM.getCurrentState() == CLoginStateMachine::st_enter_far_tp_main_loop)
|
if(LoginSM.getCurrentState() == CLoginStateMachine::st_enter_far_tp_main_loop)
|
||||||
{
|
{
|
||||||
|
CInterfaceManager::getInstance()->executeLuaScript("game:onFarTpStart()");
|
||||||
// Will loop the network until the end of the relogging process
|
// Will loop the network until the end of the relogging process
|
||||||
FarTP.farTPmainLoop();
|
FarTP.farTPmainLoop();
|
||||||
|
|
||||||
|
@ -2965,6 +2966,8 @@ bool mainLoop()
|
||||||
// Get the Connection State (must be done after any Far TP to prevent the uiDisconnected box to be displayed)
|
// Get the Connection State (must be done after any Far TP to prevent the uiDisconnected box to be displayed)
|
||||||
lastConnectionState = CNetworkConnection::Connected;
|
lastConnectionState = CNetworkConnection::Connected;
|
||||||
connectionState = NetMngr.getConnectionState();
|
connectionState = NetMngr.getConnectionState();
|
||||||
|
|
||||||
|
CInterfaceManager::getInstance()->executeLuaScript("game:onFarTpEnd()");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end of main loop
|
} // end of main loop
|
||||||
|
|
|
@ -664,10 +664,12 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
||||||
}
|
}
|
||||||
|
|
||||||
// select DB
|
// select DB
|
||||||
|
sint32 dbIndex = ChatMngr.getDynamicChannelDbIndexFromId(dynChatId);
|
||||||
|
clamp(dbIndex,0 , CChatGroup::MaxDynChanPerPlayer);
|
||||||
string entry="UI:SAVE:CHAT:COLORS:";
|
string entry="UI:SAVE:CHAT:COLORS:";
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{
|
{
|
||||||
case CChatGroup::dyn_chat: entry+="DYN"; break;
|
case CChatGroup::dyn_chat: entry+="DYN:" + NLMISC::toString(dbIndex); break;
|
||||||
case CChatGroup::say: entry+="SAY"; break;
|
case CChatGroup::say: entry+="SAY"; break;
|
||||||
case CChatGroup::shout: entry+="SHOUT"; break;
|
case CChatGroup::shout: entry+="SHOUT"; break;
|
||||||
case CChatGroup::team: entry+="GROUP"; break;
|
case CChatGroup::team: entry+="GROUP"; break;
|
||||||
|
@ -697,6 +699,11 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stringCategory == "emt")
|
||||||
|
{
|
||||||
|
bubbleWanted = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (mode != CChatGroup::system)
|
if (mode != CChatGroup::system)
|
||||||
{
|
{
|
||||||
// find the sender/text separator to put color tags
|
// find the sender/text separator to put color tags
|
||||||
|
@ -3206,7 +3213,7 @@ void impulseOutpostDeclareWarAck(NLMISC::CBitMemStream &impulse)
|
||||||
node->setValue32(timeStartAttack);
|
node->setValue32(timeStartAttack);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void addWebIGParams (string &url);
|
extern void addWebIGParams(string &url, bool trustedDomain);
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -3290,7 +3297,6 @@ private:
|
||||||
string group = titleStr.toString();
|
string group = titleStr.toString();
|
||||||
// <missing:XXX>
|
// <missing:XXX>
|
||||||
group = group.substr(9, group.size()-10);
|
group = group.substr(9, group.size()-10);
|
||||||
nlinfo("group = %s", group.c_str());
|
|
||||||
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:"+group+":content:html"));
|
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:"+group+":content:html"));
|
||||||
if (!groupHtml)
|
if (!groupHtml)
|
||||||
{
|
{
|
||||||
|
@ -3312,7 +3318,7 @@ private:
|
||||||
if (group == "webig")
|
if (group == "webig")
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
string url = contentStr.toString();
|
string url = contentStr.toString();
|
||||||
addWebIGParams(url);
|
addWebIGParams(url, true);
|
||||||
groupHtml->browse(url.c_str());
|
groupHtml->browse(url.c_str());
|
||||||
pIM->setTopWindow(pGC);
|
pIM->setTopWindow(pGC);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ bool CPlayerCL::isNeutral() const
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
bool CPlayerCL::isFriend () const
|
bool CPlayerCL::isFriend () const
|
||||||
{
|
{
|
||||||
return isNeutral() || isNeutralPVP() || isAlly();
|
return isNeutral() || isAlly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,6 +174,14 @@ bool CPlayerCL::isFriend () const
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
bool CPlayerCL::isEnemy () const
|
bool CPlayerCL::isEnemy () const
|
||||||
{
|
{
|
||||||
|
// Challenge i.e. SOLO FULL PVP
|
||||||
|
if( getPvpMode()&PVP_MODE::PvpChallenge ||
|
||||||
|
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if one of 2 players is not in pvp they can't be enemies
|
// if one of 2 players is not in pvp they can't be enemies
|
||||||
if( UserEntity->getPvpMode() == PVP_MODE::None ||
|
if( UserEntity->getPvpMode() == PVP_MODE::None ||
|
||||||
getPvpMode() == PVP_MODE::None )
|
getPvpMode() == PVP_MODE::None )
|
||||||
|
@ -181,25 +189,42 @@ bool CPlayerCL::isEnemy () const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if one of 2 players is safe they can't be enemies
|
||||||
|
if( UserEntity->getPvpMode()&PVP_MODE::PvpSafe ||
|
||||||
|
getPvpMode()&PVP_MODE::PvpSafe )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if one of 2 players are in safe zone and not flagged they can't be enemies
|
||||||
|
if ((UserEntity->getPvpMode()&PVP_MODE::PvpZoneSafe &&
|
||||||
|
((UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged) == 0))
|
||||||
|
||
|
||||||
|
(getPvpMode()&PVP_MODE::PvpZoneSafe &&
|
||||||
|
((getPvpMode()&PVP_MODE::PvpFactionFlagged) == 0)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Duel
|
||||||
|
if( getPvpMode()&PVP_MODE::PvpDuel &&
|
||||||
|
UserEntity->getPvpMode()&PVP_MODE::PvpDuel )
|
||||||
|
{
|
||||||
|
return true; // TODO
|
||||||
|
}
|
||||||
|
|
||||||
// Outpost
|
// Outpost
|
||||||
if ( isAnOutpostEnemy() )
|
if ( isAnOutpostEnemy() )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Challenge
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpChallenge &&
|
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
|
||||||
{
|
|
||||||
if( !isInTeam() )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zone Free
|
// Zone Free
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree )
|
UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree )
|
||||||
{
|
{
|
||||||
if( !isInTeam() && !isInGuild() )
|
// If not in same Team and not in same League => ennemy
|
||||||
|
if( !isInTeam() && !isInSameLeague() )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +232,11 @@ bool CPlayerCL::isEnemy () const
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild )
|
UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild )
|
||||||
{
|
{
|
||||||
if( !isInTeam() && !isInGuild() )
|
// If in same Guild but different Leagues => ennemy
|
||||||
|
if ( isInSameGuild() && oneInLeague() && !isInSameLeague() )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if( !isInTeam() && !isInSameLeague() )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,29 +248,18 @@ bool CPlayerCL::isEnemy () const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duel
|
// Free PVP : Ennemis are not in team AND not in league
|
||||||
if( getPvpMode()&PVP_MODE::PvpDuel &&
|
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpDuel )
|
|
||||||
{
|
|
||||||
return true; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
// Faction
|
|
||||||
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
||||||
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
||||||
{
|
{
|
||||||
// Check if is not ally
|
// If in same Guild but different Leagues => ennemy
|
||||||
if (!isInTeam() && !isInGuild())
|
if ( isInSameGuild() && oneInLeague() && !isInSameLeague() )
|
||||||
{
|
return true;
|
||||||
// Check for each Clan if is in opposition
|
|
||||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
if (!isInTeam() && !isInSameLeague())
|
||||||
{
|
|
||||||
if ((isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) || (isPvpAlly(i) && UserEntity->isPvpEnnemy(i)))
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} // isEnemy //
|
} // isEnemy //
|
||||||
|
@ -253,32 +271,38 @@ bool CPlayerCL::isEnemy () const
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
bool CPlayerCL::isAlly() const
|
bool CPlayerCL::isAlly() const
|
||||||
{
|
{
|
||||||
// if one of 2 players is not in pvp they can't be enemies
|
|
||||||
|
// Challenge i.e. SOLO FULL PVP
|
||||||
|
if( getPvpMode()&PVP_MODE::PvpChallenge ||
|
||||||
|
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if one of 2 players is not in pvp they can't be allies
|
||||||
if( UserEntity->getPvpMode() == PVP_MODE::None ||
|
if( UserEntity->getPvpMode() == PVP_MODE::None ||
|
||||||
getPvpMode() == PVP_MODE::None )
|
getPvpMode() == PVP_MODE::None )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if one of 2 players is in safe zone and not other they can't be allies
|
||||||
|
if ((UserEntity->getPvpMode()&PVP_MODE::PvpSafe) != (getPvpMode()&PVP_MODE::PvpSafe))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Outpost
|
// Outpost
|
||||||
if ( isAnOutpostAlly() )
|
if ( isAnOutpostAlly() )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Challenge
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpChallenge &&
|
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
|
||||||
{
|
|
||||||
if( isInTeam() )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zone Free
|
// Zone Free
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree )
|
UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree )
|
||||||
{
|
{
|
||||||
if( isInTeam() || isInGuild() )
|
if( isInTeam() || isInSameLeague() )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,8 +310,12 @@ bool CPlayerCL::isAlly() const
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
||||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild )
|
UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild )
|
||||||
{
|
{
|
||||||
if( isInTeam() || isInGuild() )
|
if( isInTeam() || isInSameLeague() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if ( isInSameGuild() && !oneInLeague() )
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zone Faction
|
// Zone Faction
|
||||||
|
@ -298,27 +326,16 @@ bool CPlayerCL::isAlly() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Faction
|
// Free PVP : Allies are in team OR in league
|
||||||
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
||||||
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
||||||
{
|
{
|
||||||
if (isInTeam() && isInGuild())
|
if (isInTeam() || isInSameLeague())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Check for each Clan if is in opposition
|
if ( isInSameGuild() && !oneInLeague() )
|
||||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
|
||||||
{
|
|
||||||
if ((isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) || (isPvpAlly(i) && UserEntity->isPvpEnnemy(i)))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for each Clan if is in same clan
|
|
||||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
|
||||||
{
|
|
||||||
if ((isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) || (isPvpAlly(i) && UserEntity->isPvpAlly(i)))
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -336,66 +353,12 @@ bool CPlayerCL::isNeutralPVP() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Outpost
|
if( UserEntity->getPvpMode() == PVP_MODE::None )
|
||||||
if ( getOutpostId() != 0 )
|
|
||||||
{
|
{
|
||||||
if( UserEntity->getOutpostId() != getOutpostId() )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Challenge
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpChallenge &&
|
|
||||||
!(UserEntity->getPvpMode()&PVP_MODE::PvpChallenge) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zone Free
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
|
||||||
!(UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zone Guild
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
|
||||||
!(UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zone Faction
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpZoneFaction &&
|
|
||||||
!(UserEntity->getPvpMode()&PVP_MODE::PvpZoneFaction) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Duel
|
|
||||||
if( getPvpMode()&PVP_MODE::PvpDuel &&
|
|
||||||
!(UserEntity->getPvpMode()&PVP_MODE::PvpDuel) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
|
||||||
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
|
||||||
{
|
|
||||||
// Check for each Clan if is in opposition or same
|
|
||||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
|
||||||
{
|
|
||||||
if ((isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) ||
|
|
||||||
(isPvpAlly(i) && UserEntity->isPvpEnnemy(i)) ||
|
|
||||||
(isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) ||
|
|
||||||
(isPvpAlly(i) && UserEntity->isPvpAlly(i)))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return (!isEnemy() && !isAlly());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace STRING_MANAGER
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
map<string, CStringManagerClient::CItem> CStringManagerClient::_SpecItem_TempMap;
|
map<string, CStringManagerClient::CItem> CStringManagerClient::_SpecItem_TempMap;
|
||||||
|
map<ucstring, ucstring> CStringManagerClient::_DynStrings;
|
||||||
|
vector<ucstring> CStringManagerClient::_TitleWords;
|
||||||
bool CStringManagerClient::_SpecItem_MemoryCompressed = false;
|
bool CStringManagerClient::_SpecItem_MemoryCompressed = false;
|
||||||
char *CStringManagerClient::_SpecItem_Labels = NULL;
|
char *CStringManagerClient::_SpecItem_Labels = NULL;
|
||||||
ucchar *CStringManagerClient::_SpecItem_NameDesc = NULL;
|
ucchar *CStringManagerClient::_SpecItem_NameDesc = NULL;
|
||||||
|
@ -381,7 +383,15 @@ restartLoop4:
|
||||||
result = ucstring(tmp) + it->second;
|
result = ucstring(tmp) + it->second;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
result = it->second;
|
result = it->second;
|
||||||
|
if (result.size() > 9 && result.substr(0, 9) == ucstring("<missing:"))
|
||||||
|
{
|
||||||
|
map<ucstring, ucstring>::iterator itds = _DynStrings.find(result.substr(9, result.size()-10));
|
||||||
|
if (itds != _DynStrings.end())
|
||||||
|
result = itds->second;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1595,9 +1605,29 @@ const ucchar *CStringManagerClient::getSPhraseLocalizedDescription(NLMISC::CShee
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
const ucchar *CStringManagerClient::getTitleLocalizedName(const std::string &titleId, bool women)
|
const ucchar *CStringManagerClient::getTitleLocalizedName(const std::string &titleId, bool women)
|
||||||
{
|
{
|
||||||
return getSpecialWord(titleId,women);
|
const ucchar * infos = getSpecialWord(titleId, women);
|
||||||
|
ucstring infosUC(infos);
|
||||||
|
|
||||||
|
vector<ucstring> listInfos;
|
||||||
|
splitUCString(infosUC, ucstring("#"), listInfos);
|
||||||
|
if (listInfos.empty())
|
||||||
|
return infos;
|
||||||
|
|
||||||
|
_TitleWords.push_back(listInfos[0]);
|
||||||
|
return _TitleWords.back().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector<ucstring> CStringManagerClient::getTitleInfos(const std::string &titleId, bool women)
|
||||||
|
{
|
||||||
|
const ucchar * infos = getSpecialWord(titleId, women);
|
||||||
|
ucstring infosUC(infos);
|
||||||
|
|
||||||
|
vector<ucstring> listInfos;
|
||||||
|
splitUCString(infosUC, ucstring("#"), listInfos);
|
||||||
|
return listInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
const ucchar *CStringManagerClient::getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type)
|
const ucchar *CStringManagerClient::getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type)
|
||||||
{
|
{
|
||||||
|
@ -1640,6 +1670,13 @@ const ucchar *CStringManagerClient::getSquadLocalizedDescription(NLMISC::CSheetI
|
||||||
return getSpecialDesc(id.toString());
|
return getSpecialDesc(id.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
void CStringManagerClient::replaceDynString(const ucstring &name, const ucstring &text)
|
||||||
|
{
|
||||||
|
_DynStrings[name] = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,7 @@ public:
|
||||||
static void specialWordsMemoryCompress();
|
static void specialWordsMemoryCompress();
|
||||||
// Yoyo: Replace the Brick Name with Filled stats (CSBrickManager work). No-Op if not found
|
// Yoyo: Replace the Brick Name with Filled stats (CSBrickManager work). No-Op if not found
|
||||||
static void replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2);
|
static void replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2);
|
||||||
|
static void replaceDynString(const ucstring &name, const ucstring &text);
|
||||||
|
|
||||||
// Get the Localized Name of the Places.
|
// Get the Localized Name of the Places.
|
||||||
static const ucchar *getPlaceLocalizedName(const std::string &placeNameID);
|
static const ucchar *getPlaceLocalizedName(const std::string &placeNameID);
|
||||||
|
@ -106,6 +107,7 @@ public:
|
||||||
|
|
||||||
// Get the Localized Title name
|
// Get the Localized Title name
|
||||||
static const ucchar *getTitleLocalizedName(const std::string &titleId, bool women);
|
static const ucchar *getTitleLocalizedName(const std::string &titleId, bool women);
|
||||||
|
static std::vector<ucstring> getTitleInfos(const std::string &titleId, bool women);
|
||||||
// Get the Localized name of a classification type
|
// Get the Localized name of a classification type
|
||||||
static const ucchar *getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type);
|
static const ucchar *getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type);
|
||||||
|
|
||||||
|
@ -215,8 +217,6 @@ private:
|
||||||
// Callback for dyn string value from the server
|
// Callback for dyn string value from the server
|
||||||
TStringCallbacksContainer _DynStringsCallbacks;
|
TStringCallbacksContainer _DynStringsCallbacks;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Return value for waiting string..
|
// Return value for waiting string..
|
||||||
static ucstring _WaitString;
|
static ucstring _WaitString;
|
||||||
|
|
||||||
|
@ -273,6 +273,9 @@ private:
|
||||||
static bool _SpecItem_MemoryCompressed;
|
static bool _SpecItem_MemoryCompressed;
|
||||||
|
|
||||||
static std::map<std::string, CItem> _SpecItem_TempMap;
|
static std::map<std::string, CItem> _SpecItem_TempMap;
|
||||||
|
static std::vector<ucstring> _TitleWords;
|
||||||
|
static std::map<ucstring, ucstring> _DynStrings;
|
||||||
|
|
||||||
|
|
||||||
static char *_SpecItem_Labels;
|
static char *_SpecItem_Labels;
|
||||||
static ucchar *_SpecItem_NameDesc;
|
static ucchar *_SpecItem_NameDesc;
|
||||||
|
|
|
@ -507,7 +507,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle,
|
||||||
CPlayerCL::updateVisualPropertyName(gameCycle, prop);
|
CPlayerCL::updateVisualPropertyName(gameCycle, prop);
|
||||||
|
|
||||||
// Name changed ?
|
// Name changed ?
|
||||||
if (oldNameId != _NameId)
|
/* if (oldNameId != _NameId)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *element = pIM->getElementFromId("ui:interface:mailbox:content:html");
|
CInterfaceElement *element = pIM->getElementFromId("ui:interface:mailbox:content:html");
|
||||||
|
@ -518,7 +518,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle,
|
||||||
html->browse("home");
|
html->browse("home");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}// updateVisualPropertyName //
|
}// updateVisualPropertyName //
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -2657,36 +2657,39 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
||||||
playerGiftNeeded->setValue32(0);
|
playerGiftNeeded->setValue32(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* TODO ULU : Add RP tags */
|
||||||
|
|
||||||
// update pvp tags
|
// update pvp tags
|
||||||
CViewBase * tagView = dynamic_cast<CViewBase*>(pIM->getElementFromId("ui:interface:target:pvp_tags"));
|
|
||||||
CViewBase * contentView = dynamic_cast<CViewBase*>(pIM->getElementFromId("ui:interface:target:content"));
|
|
||||||
|
|
||||||
if ((tgtSlot!=CLFECOMMON::INVALID_SLOT) && entity)
|
if ((tgtSlot!=CLFECOMMON::INVALID_SLOT) && entity)
|
||||||
{
|
{
|
||||||
CPlayerCL *pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
CPlayerCL *pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
||||||
|
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < 7; i++)
|
/*// Pvp Mode
|
||||||
|
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(pIM->getElementFromId("ui:interface:target:pvp_tags:mode"));
|
||||||
|
if (tagMode)
|
||||||
{
|
{
|
||||||
CViewBitmap * tag = dynamic_cast<CViewBitmap*>(pIM->getElementFromId("ui:interface:target:pvp_tags:tag_"+toString(i)));
|
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
||||||
if (tag)
|
tagMode->setTexture("pvp_orange.tga");
|
||||||
{
|
else if (pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged)
|
||||||
if ((pPlayer->getPvpMode()&PVP_MODE::PvpFaction || pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged) && pPlayer->isPvpAlly(i))
|
tagMode->setTexture("pvp_red.tga");
|
||||||
{
|
|
||||||
tag->setTexture("pvp_ally_"+toString(i)+".tga");
|
|
||||||
}
|
|
||||||
else if ((pPlayer->getPvpMode()&PVP_MODE::PvpFaction || pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged) && pPlayer->isPvpEnnemy(i))
|
|
||||||
{
|
|
||||||
tag->setTexture("pvp_enemy_"+toString(i)+".tga");
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
|
tagMode->setTexture("alpha_10.tga");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*// Pvp available actions (attack, heal, both)
|
||||||
|
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(pIM->getElementFromId("ui:interface:target:pvp_tags:actions"));
|
||||||
|
if (tagMode)
|
||||||
{
|
{
|
||||||
|
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
||||||
|
tag->setTexture("pvp_orange.tga");
|
||||||
|
else if (pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged)
|
||||||
|
tag->setTexture("pvp_red.tga");
|
||||||
|
else
|
||||||
tag->setTexture("alpha_10.tga");
|
tag->setTexture("alpha_10.tga");
|
||||||
}
|
}*/
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -477,6 +477,14 @@ public:
|
||||||
/// true if current behaviour allows to change front
|
/// true if current behaviour allows to change front
|
||||||
bool canChangeFront();
|
bool canChangeFront();
|
||||||
|
|
||||||
|
ucstring getLoginName()
|
||||||
|
{
|
||||||
|
if (_LoginName == ucstring(""))
|
||||||
|
_LoginName = getDisplayName();
|
||||||
|
|
||||||
|
return _LoginName;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
class CSpeedFactor : public ICDBNode::IPropertyObserver
|
class CSpeedFactor : public ICDBNode::IPropertyObserver
|
||||||
{
|
{
|
||||||
|
@ -741,6 +749,8 @@ private:
|
||||||
/// previous items in hand before they have been changed by an auto-equip due to an action (ex: forage)
|
/// previous items in hand before they have been changed by an auto-equip due to an action (ex: forage)
|
||||||
CItemSnapshot _PreviousRightHandItem;
|
CItemSnapshot _PreviousRightHandItem;
|
||||||
CItemSnapshot _PreviousLeftHandItem;
|
CItemSnapshot _PreviousLeftHandItem;
|
||||||
|
|
||||||
|
ucstring _LoginName;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Out game received position
|
/// Out game received position
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
define('NELTOOL_NO_USER_NEEDED', true);
|
define('NELTOOL_NO_USER_NEEDED', true);
|
||||||
define('NELTOOL_CRON_DEBUG', false);
|
define('NELTOOL_CRON_DEBUG', false);
|
||||||
|
|
||||||
if ($HTTP_GET_VARS['dbg']) define('NELTOOL_CRON_DEBUG', true);
|
if ($_GET['dbg']) define('NELTOOL_CRON_DEBUG', true);
|
||||||
|
|
||||||
if (defined('NELTOOL_CRON_DEBUG')) echo "Checking HDs ... \n";
|
if (defined('NELTOOL_CRON_DEBUG')) echo "Checking HDs ... \n";
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
nt_auth_set_session_var('view_shard_id', $view_shard_id);
|
nt_auth_set_session_var('view_shard_id', $view_shard_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($HTTP_GET_VARS['domain']))
|
if (isset($_GET['domain']))
|
||||||
{
|
{
|
||||||
if ($view_domain_id != $HTTP_GET_VARS['domain'])
|
if ($view_domain_id != $_GET['domain'])
|
||||||
{
|
{
|
||||||
$view_domain_id = $HTTP_GET_VARS['domain'];
|
$view_domain_id = $_GET['domain'];
|
||||||
nt_auth_set_session_var('view_domain_id', $view_domain_id);
|
nt_auth_set_session_var('view_domain_id', $view_domain_id);
|
||||||
|
|
||||||
$view_shard_id = null;
|
$view_shard_id = null;
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($HTTP_GET_VARS['shard']))
|
if (isset($_GET['shard']))
|
||||||
{
|
{
|
||||||
$view_shard_id = $HTTP_GET_VARS['shard'];
|
$view_shard_id = $_GET['shard'];
|
||||||
nt_auth_set_session_var('view_shard_id', $view_shard_id);
|
nt_auth_set_session_var('view_shard_id', $view_shard_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
|
|
||||||
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
||||||
|
|
||||||
if (isset($HTTP_POST_VARS['services_refresh']))
|
if (isset($_POST['services_refresh']))
|
||||||
{
|
{
|
||||||
if ($current_refresh_rate != $HTTP_POST_VARS['services_refresh'])
|
if ($current_refresh_rate != $_POST['services_refresh'])
|
||||||
{
|
{
|
||||||
$current_refresh_rate = $HTTP_POST_VARS['services_refresh'];
|
$current_refresh_rate = $_POST['services_refresh'];
|
||||||
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -637,10 +637,10 @@
|
||||||
// exit();
|
// exit();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
elseif (isset($HTTP_POST_VARS['shards_update']) && tool_admin_applications_check('tool_main_shard_autostart'))
|
elseif (isset($_POST['shards_update']) && tool_admin_applications_check('tool_main_shard_autostart'))
|
||||||
{
|
{
|
||||||
$shard_update_mode = $HTTP_POST_VARS['shards_update'];
|
$shard_update_mode = $_POST['shards_update'];
|
||||||
$shard_update_name = $HTTP_POST_VARS['shards_update_name'];
|
$shard_update_name = $_POST['shards_update_name'];
|
||||||
|
|
||||||
switch ($shard_update_mode)
|
switch ($shard_update_mode)
|
||||||
{
|
{
|
||||||
|
@ -678,14 +678,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif (isset($HTTP_POST_VARS['ws_update']) && tool_admin_applications_check('tool_main_ws'))
|
elseif (isset($_POST['ws_update']) && tool_admin_applications_check('tool_main_ws'))
|
||||||
{
|
{
|
||||||
$shard_ws_su = $HTTP_POST_VARS['ws_su'];
|
$shard_ws_su = $_POST['ws_su'];
|
||||||
$shard_ws_shard_name = $HTTP_POST_VARS['ws_shard_name'];
|
$shard_ws_shard_name = $_POST['ws_shard_name'];
|
||||||
$shard_ws_shard_id = $HTTP_POST_VARS['ws_shard_id'];
|
$shard_ws_shard_id = $_POST['ws_shard_id'];
|
||||||
|
|
||||||
$shard_ws_state = $HTTP_POST_VARS['ws_state_'. $shard_ws_shard_name];
|
$shard_ws_state = $_POST['ws_state_'. $shard_ws_shard_name];
|
||||||
$shard_ws_motd = $HTTP_POST_VARS['ws_motd_'. $shard_ws_shard_name];
|
$shard_ws_motd = $_POST['ws_motd_'. $shard_ws_shard_name];
|
||||||
|
|
||||||
// coders don't know how to write it seems
|
// coders don't know how to write it seems
|
||||||
// ace: now they know if ($shard_ws_state == 'close') $shard_ws_state = 'closed';
|
// ace: now they know if ($shard_ws_state == 'close') $shard_ws_state = 'closed';
|
||||||
|
@ -705,9 +705,9 @@
|
||||||
$tpl->clear_assign('tool_execute_result');
|
$tpl->clear_assign('tool_execute_result');
|
||||||
nt_sleep(VIEW_DELAY);
|
nt_sleep(VIEW_DELAY);
|
||||||
}
|
}
|
||||||
elseif (isset($HTTP_POST_VARS['services_update']))
|
elseif (isset($_POST['services_update']))
|
||||||
{
|
{
|
||||||
$service_update_mode = $HTTP_POST_VARS['services_update'];
|
$service_update_mode = $_POST['services_update'];
|
||||||
|
|
||||||
switch ($service_update_mode)
|
switch ($service_update_mode)
|
||||||
{
|
{
|
||||||
|
@ -997,9 +997,9 @@
|
||||||
case 'execute':
|
case 'execute':
|
||||||
if (tool_admin_applications_check('tool_main_execute'))
|
if (tool_admin_applications_check('tool_main_execute'))
|
||||||
{
|
{
|
||||||
if (isset($HTTP_POST_VARS['service_command']))
|
if (isset($_POST['service_command']))
|
||||||
{
|
{
|
||||||
$service_command = trim(stripslashes(html_entity_decode($HTTP_POST_VARS['service_command'], ENT_QUOTES)));
|
$service_command = trim(stripslashes(html_entity_decode($_POST['service_command'], ENT_QUOTES)));
|
||||||
$service_list = tool_main_get_checked_services();
|
$service_list = tool_main_get_checked_services();
|
||||||
if (sizeof($service_list))
|
if (sizeof($service_list))
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
if (!isset($NELTOOL['GET_VARS']['toolmode'])) $NELTOOL['GET_VARS']['toolmode'] = 'help';
|
if (!isset($NELTOOL['GET_VARS']['toolmode'])) $NELTOOL['GET_VARS']['toolmode'] = 'help';
|
||||||
$tool_menu_item = tool_admin_menu_get_item_from_key($NELTOOL['GET_VARS']['toolmode']);
|
$tool_menu_item = tool_admin_menu_get_item_from_key($NELTOOL['GET_VARS']['toolmode']);
|
||||||
|
|
||||||
$IE_CHECK = strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'MSIE');
|
$IE_CHECK = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE');
|
||||||
|
|
||||||
$tpl->assign('tool_title', 'Administration / '. $tool_menu_item['title']);
|
$tpl->assign('tool_title', 'Administration / '. $tool_menu_item['title']);
|
||||||
$tpl->assign('tool_menu', tool_admin_menu_get_list($IE_CHECK)); //$tool_admin_menu); // defined in 'functions_tool_administration.php'
|
$tpl->assign('tool_menu', tool_admin_menu_get_list($IE_CHECK)); //$tool_admin_menu); // defined in 'functions_tool_administration.php'
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
$log_step = 30;
|
$log_step = 30;
|
||||||
$num_logs = tool_admin_logs_get_count();
|
$num_logs = tool_admin_logs_get_count();
|
||||||
|
|
||||||
if (isset($HTTP_GET_VARS['page'])) $log_start = $HTTP_GET_VARS['page'];
|
if (isset($_GET['page'])) $log_start = $_GET['page'];
|
||||||
|
|
||||||
$tool_log_list = tool_admin_logs_get_list($log_start * $log_step, $log_step);
|
$tool_log_list = tool_admin_logs_get_list($log_start * $log_step, $log_step);
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_user')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_user')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -85,12 +85,12 @@
|
||||||
|
|
||||||
if ($tool_action == 'update applications')
|
if ($tool_action == 'update applications')
|
||||||
{
|
{
|
||||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||||
$tool_user_update_appl_ids = $HTTP_POST_VARS['tool_form_application_ids'];
|
$tool_user_update_appl_ids = $_POST['tool_form_application_ids'];
|
||||||
|
|
||||||
tool_admin_users_applications_update($tool_user_update_id, $tool_user_update_appl_ids);
|
tool_admin_users_applications_update($tool_user_update_id, $tool_user_update_appl_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
$_GET['user_id'] = $tool_user_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// break;
|
// break;
|
||||||
|
@ -99,15 +99,15 @@
|
||||||
|
|
||||||
if ($tool_action == 'update domains')
|
if ($tool_action == 'update domains')
|
||||||
{
|
{
|
||||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||||
$tool_user_update_domain_ids = $HTTP_POST_VARS['tool_form_domain_ids'];
|
$tool_user_update_domain_ids = $_POST['tool_form_domain_ids'];
|
||||||
|
|
||||||
$tool_user_data = tool_admin_users_get_id($tool_user_update_id);
|
$tool_user_data = tool_admin_users_get_id($tool_user_update_id);
|
||||||
$tool_user_group_id = $tool_user_data['user_group_id'];
|
$tool_user_group_id = $tool_user_data['user_group_id'];
|
||||||
|
|
||||||
tool_admin_users_domains_update($tool_user_update_id, $tool_user_group_id, $tool_user_update_domain_ids);
|
tool_admin_users_domains_update($tool_user_update_id, $tool_user_group_id, $tool_user_update_domain_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
$_GET['user_id'] = $tool_user_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -116,15 +116,15 @@
|
||||||
|
|
||||||
if ($tool_action == 'update shards')
|
if ($tool_action == 'update shards')
|
||||||
{
|
{
|
||||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||||
$tool_user_update_shard_ids = $HTTP_POST_VARS['tool_form_shard_ids'];
|
$tool_user_update_shard_ids = $_POST['tool_form_shard_ids'];
|
||||||
|
|
||||||
$tool_user_data = tool_admin_users_get_id($tool_user_update_id);
|
$tool_user_data = tool_admin_users_get_id($tool_user_update_id);
|
||||||
$tool_user_group_id = $tool_user_data['user_group_id'];
|
$tool_user_group_id = $tool_user_data['user_group_id'];
|
||||||
|
|
||||||
tool_admin_users_shards_update($tool_user_update_id, $tool_user_group_id, $tool_user_update_shard_ids);
|
tool_admin_users_shards_update($tool_user_update_id, $tool_user_group_id, $tool_user_update_shard_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
$_GET['user_id'] = $tool_user_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -138,11 +138,11 @@
|
||||||
|
|
||||||
if ($tool_action == 'update')
|
if ($tool_action == 'update')
|
||||||
{
|
{
|
||||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||||
$tool_user_update_name = $HTTP_POST_VARS['tool_form_user_name'];
|
$tool_user_update_name = $_POST['tool_form_user_name'];
|
||||||
$tool_user_update_password = $HTTP_POST_VARS['tool_form_user_password'];
|
$tool_user_update_password = $_POST['tool_form_user_password'];
|
||||||
$tool_user_update_group = $HTTP_POST_VARS['tool_form_user_group'];
|
$tool_user_update_group = $_POST['tool_form_user_group'];
|
||||||
$tool_user_update_active = $HTTP_POST_VARS['tool_form_user_active'];
|
$tool_user_update_active = $_POST['tool_form_user_active'];
|
||||||
|
|
||||||
$tool_error = tool_admin_users_update($tool_user_update_id, $tool_user_update_name, $tool_user_update_password, $tool_user_update_group, $tool_user_update_active);
|
$tool_error = tool_admin_users_update($tool_user_update_id, $tool_user_update_name, $tool_user_update_password, $tool_user_update_group, $tool_user_update_active);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
$_GET['user_id'] = $tool_user_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_user_edit_id = $HTTP_GET_VARS['user_id'];
|
$tool_user_edit_id = $_GET['user_id'];
|
||||||
$tool_user_edit_data = tool_admin_users_get_id($tool_user_edit_id);
|
$tool_user_edit_data = tool_admin_users_get_id($tool_user_edit_id);
|
||||||
$tool_user_group_id = $tool_user_edit_data['user_group_id'];
|
$tool_user_group_id = $tool_user_edit_data['user_group_id'];
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_user_delete_id = $HTTP_POST_VARS['tool_form_user_id'];
|
$tool_user_delete_id = $_POST['tool_form_user_id'];
|
||||||
if (!($tool_user_delete_id > 0))
|
if (!($tool_user_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid user!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid user!");
|
||||||
|
@ -222,10 +222,10 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_user_create_name = $HTTP_POST_VARS['tool_form_user_name'];
|
$tool_user_create_name = $_POST['tool_form_user_name'];
|
||||||
$tool_user_create_password = $HTTP_POST_VARS['tool_form_user_password'];
|
$tool_user_create_password = $_POST['tool_form_user_password'];
|
||||||
$tool_user_create_group = $HTTP_POST_VARS['tool_form_user_group'];
|
$tool_user_create_group = $_POST['tool_form_user_group'];
|
||||||
$tool_user_create_active = $HTTP_POST_VARS['tool_form_user_active'];
|
$tool_user_create_active = $_POST['tool_form_user_active'];
|
||||||
|
|
||||||
$tool_error = tool_admin_users_add($tool_user_create_name, $tool_user_create_password, $tool_user_create_group, $tool_user_create_active);
|
$tool_error = tool_admin_users_add($tool_user_create_name, $tool_user_create_password, $tool_user_create_group, $tool_user_create_active);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -255,8 +255,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_group')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_group')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -264,12 +264,12 @@
|
||||||
|
|
||||||
if ($tool_action == 'update applications')
|
if ($tool_action == 'update applications')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_update_appl_ids = $HTTP_POST_VARS['tool_form_application_ids'];
|
$tool_group_update_appl_ids = $_POST['tool_form_application_ids'];
|
||||||
|
|
||||||
tool_admin_groups_applications_update($tool_group_update_id, $tool_group_update_appl_ids);
|
tool_admin_groups_applications_update($tool_group_update_id, $tool_group_update_appl_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// break;
|
// break;
|
||||||
|
@ -278,12 +278,12 @@
|
||||||
|
|
||||||
if ($tool_action == 'update domains')
|
if ($tool_action == 'update domains')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_update_domain_ids = $HTTP_POST_VARS['tool_form_domain_ids'];
|
$tool_group_update_domain_ids = $_POST['tool_form_domain_ids'];
|
||||||
|
|
||||||
tool_admin_groups_domains_update($tool_group_update_id, $tool_group_update_domain_ids);
|
tool_admin_groups_domains_update($tool_group_update_id, $tool_group_update_domain_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -292,12 +292,12 @@
|
||||||
|
|
||||||
if ($tool_action == 'update shards')
|
if ($tool_action == 'update shards')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_update_shard_ids = $HTTP_POST_VARS['tool_form_shard_ids'];
|
$tool_group_update_shard_ids = $_POST['tool_form_shard_ids'];
|
||||||
|
|
||||||
tool_admin_groups_shards_update($tool_group_update_id, $tool_group_update_shard_ids);
|
tool_admin_groups_shards_update($tool_group_update_id, $tool_group_update_shard_ids);
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -311,11 +311,11 @@
|
||||||
|
|
||||||
if ($tool_action == 'update')
|
if ($tool_action == 'update')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_update_name = $HTTP_POST_VARS['tool_form_group_name'];
|
$tool_group_update_name = $_POST['tool_form_group_name'];
|
||||||
$tool_group_update_level = $HTTP_POST_VARS['tool_form_group_level'];
|
$tool_group_update_level = $_POST['tool_form_group_level'];
|
||||||
$tool_group_update_default = $HTTP_POST_VARS['tool_form_group_default'];
|
$tool_group_update_default = $_POST['tool_form_group_default'];
|
||||||
$tool_group_update_active = $HTTP_POST_VARS['tool_form_group_active'];
|
$tool_group_update_active = $_POST['tool_form_group_active'];
|
||||||
|
|
||||||
$tool_error = tool_admin_groups_update($tool_group_update_id, $tool_group_update_name, $tool_group_update_level, $tool_group_update_default, $tool_group_update_active);
|
$tool_error = tool_admin_groups_update($tool_group_update_id, $tool_group_update_name, $tool_group_update_level, $tool_group_update_default, $tool_group_update_active);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -323,7 +323,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -337,8 +337,8 @@
|
||||||
|
|
||||||
if ($tool_action == 'update default domain')
|
if ($tool_action == 'update default domain')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_default_domain = $HTTP_POST_VARS['tool_form_domain_default'];
|
$tool_group_default_domain = $_POST['tool_form_domain_default'];
|
||||||
|
|
||||||
$tool_error = tool_admin_groups_update_default_domain($tool_group_update_id, $tool_group_default_domain);
|
$tool_error = tool_admin_groups_update_default_domain($tool_group_update_id, $tool_group_default_domain);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -346,7 +346,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -360,8 +360,8 @@
|
||||||
|
|
||||||
if ($tool_action == 'update default shard')
|
if ($tool_action == 'update default shard')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_default_shard = $HTTP_POST_VARS['tool_form_shard_default'];
|
$tool_group_default_shard = $_POST['tool_form_shard_default'];
|
||||||
|
|
||||||
$tool_error = tool_admin_groups_update_default_shard($tool_group_update_id, $tool_group_default_shard);
|
$tool_error = tool_admin_groups_update_default_shard($tool_group_update_id, $tool_group_default_shard);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -369,7 +369,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -383,8 +383,8 @@
|
||||||
|
|
||||||
if ($tool_action == 'update default application')
|
if ($tool_action == 'update default application')
|
||||||
{
|
{
|
||||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||||
$tool_group_default_application = $HTTP_POST_VARS['tool_form_application_default'];
|
$tool_group_default_application = $_POST['tool_form_application_default'];
|
||||||
|
|
||||||
$tool_error = tool_admin_groups_update_default_application($tool_group_update_id, $tool_group_default_application);
|
$tool_error = tool_admin_groups_update_default_application($tool_group_update_id, $tool_group_default_application);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -392,7 +392,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
$_GET['group_id'] = $tool_group_update_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
@ -404,7 +404,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_group_edit_id = $HTTP_GET_VARS['group_id'];
|
$tool_group_edit_id = $_GET['group_id'];
|
||||||
$tool_group_edit_data = tool_admin_groups_get_id($tool_group_edit_id);
|
$tool_group_edit_data = tool_admin_groups_get_id($tool_group_edit_id);
|
||||||
$tpl->assign('tool_group_edit_data', $tool_group_edit_data);
|
$tpl->assign('tool_group_edit_data', $tool_group_edit_data);
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_group_delete_id = $HTTP_POST_VARS['tool_form_group_id'];
|
$tool_group_delete_id = $_POST['tool_form_group_id'];
|
||||||
if (!($tool_group_delete_id > 0))
|
if (!($tool_group_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid group!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid group!");
|
||||||
|
@ -462,10 +462,10 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_group_create_name = $HTTP_POST_VARS['tool_form_group_name'];
|
$tool_group_create_name = $_POST['tool_form_group_name'];
|
||||||
$tool_group_create_level = $HTTP_POST_VARS['tool_form_group_level'];
|
$tool_group_create_level = $_POST['tool_form_group_level'];
|
||||||
$tool_group_create_default = $HTTP_POST_VARS['tool_form_group_default'];
|
$tool_group_create_default = $_POST['tool_form_group_default'];
|
||||||
$tool_group_create_active = $HTTP_POST_VARS['tool_form_group_active'];
|
$tool_group_create_active = $_POST['tool_form_group_active'];
|
||||||
|
|
||||||
$tool_error = tool_admin_groups_add($tool_group_create_name, $tool_group_create_level, $tool_group_create_default, $tool_group_create_active);
|
$tool_error = tool_admin_groups_add($tool_group_create_name, $tool_group_create_level, $tool_group_create_default, $tool_group_create_active);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -492,8 +492,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_application')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_application')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -504,13 +504,13 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_application_update_id = $HTTP_POST_VARS['tool_form_application_id'];
|
$tool_application_update_id = $_POST['tool_form_application_id'];
|
||||||
$tool_application_update_name = $HTTP_POST_VARS['tool_form_application_name'];
|
$tool_application_update_name = $_POST['tool_form_application_name'];
|
||||||
$tool_application_update_uri = $HTTP_POST_VARS['tool_form_application_uri'];
|
$tool_application_update_uri = $_POST['tool_form_application_uri'];
|
||||||
$tool_application_update_restriction = $HTTP_POST_VARS['tool_form_application_restriction'];
|
$tool_application_update_restriction = $_POST['tool_form_application_restriction'];
|
||||||
$tool_application_update_icon = $HTTP_POST_VARS['tool_form_application_icon'];
|
$tool_application_update_icon = $_POST['tool_form_application_icon'];
|
||||||
$tool_application_update_order = $HTTP_POST_VARS['tool_form_application_order'];
|
$tool_application_update_order = $_POST['tool_form_application_order'];
|
||||||
$tool_application_update_visible = $HTTP_POST_VARS['tool_form_application_visible'];
|
$tool_application_update_visible = $_POST['tool_form_application_visible'];
|
||||||
|
|
||||||
$tool_error = tool_admin_applications_update($tool_application_update_id, $tool_application_update_name, $tool_application_update_uri, $tool_application_update_restriction, $tool_application_update_icon, $tool_application_update_order, $tool_application_update_visible);
|
$tool_error = tool_admin_applications_update($tool_application_update_id, $tool_application_update_name, $tool_application_update_uri, $tool_application_update_restriction, $tool_application_update_icon, $tool_application_update_order, $tool_application_update_visible);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -518,7 +518,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['application_id'] = $tool_application_update_id;
|
$_GET['application_id'] = $tool_application_update_id;
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_application_edit_id = $HTTP_GET_VARS['application_id'];
|
$tool_application_edit_id = $_GET['application_id'];
|
||||||
$tool_application_edit_data = tool_admin_applications_get_id($tool_application_edit_id);
|
$tool_application_edit_data = tool_admin_applications_get_id($tool_application_edit_id);
|
||||||
$tpl->assign('tool_application_edit_data', $tool_application_edit_data);
|
$tpl->assign('tool_application_edit_data', $tool_application_edit_data);
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_application_delete_id = $HTTP_POST_VARS['tool_form_application_id'];
|
$tool_application_delete_id = $_POST['tool_form_application_id'];
|
||||||
if (!($tool_application_delete_id > 0))
|
if (!($tool_application_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid application!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid application!");
|
||||||
|
@ -561,12 +561,12 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_application_create_name = $HTTP_POST_VARS['tool_form_application_name'];
|
$tool_application_create_name = $_POST['tool_form_application_name'];
|
||||||
$tool_application_create_uri = $HTTP_POST_VARS['tool_form_application_uri'];
|
$tool_application_create_uri = $_POST['tool_form_application_uri'];
|
||||||
$tool_application_create_restriction = $HTTP_POST_VARS['tool_form_application_restriction'];
|
$tool_application_create_restriction = $_POST['tool_form_application_restriction'];
|
||||||
$tool_application_create_icon = $HTTP_POST_VARS['tool_form_application_icon'];
|
$tool_application_create_icon = $_POST['tool_form_application_icon'];
|
||||||
$tool_application_create_order = $HTTP_POST_VARS['tool_form_application_order'];
|
$tool_application_create_order = $_POST['tool_form_application_order'];
|
||||||
$tool_application_create_visible = $HTTP_POST_VARS['tool_form_application_visible'];
|
$tool_application_create_visible = $_POST['tool_form_application_visible'];
|
||||||
|
|
||||||
$tool_error = tool_admin_applications_add($tool_application_create_name, $tool_application_create_uri, $tool_application_create_restriction, $tool_application_create_icon, $tool_application_create_order, $tool_application_create_visible);
|
$tool_error = tool_admin_applications_add($tool_application_create_name, $tool_application_create_uri, $tool_application_create_restriction, $tool_application_create_icon, $tool_application_create_order, $tool_application_create_visible);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -592,8 +592,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_domain')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_domain')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -604,18 +604,18 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_domain_update_id = $HTTP_POST_VARS['tool_form_domain_id'];
|
$tool_domain_update_id = $_POST['tool_form_domain_id'];
|
||||||
$tool_domain_update_name = $HTTP_POST_VARS['tool_form_domain_name'];
|
$tool_domain_update_name = $_POST['tool_form_domain_name'];
|
||||||
$tool_domain_update_application = $HTTP_POST_VARS['tool_form_domain_application'];
|
$tool_domain_update_application = $_POST['tool_form_domain_application'];
|
||||||
$tool_domain_update_as_host = $HTTP_POST_VARS['tool_form_domain_as_host'];
|
$tool_domain_update_as_host = $_POST['tool_form_domain_as_host'];
|
||||||
$tool_domain_update_as_port = $HTTP_POST_VARS['tool_form_domain_as_port'];
|
$tool_domain_update_as_port = $_POST['tool_form_domain_as_port'];
|
||||||
$tool_domain_update_mfs_web = $HTTP_POST_VARS['tool_form_domain_mfs_web'];
|
$tool_domain_update_mfs_web = $_POST['tool_form_domain_mfs_web'];
|
||||||
$tool_domain_update_rrd_path = $HTTP_POST_VARS['tool_form_domain_rrd_path'];
|
$tool_domain_update_rrd_path = $_POST['tool_form_domain_rrd_path'];
|
||||||
$tool_domain_update_las_admin_path = $HTTP_POST_VARS['tool_form_domain_las_admin_path'];
|
$tool_domain_update_las_admin_path = $_POST['tool_form_domain_las_admin_path'];
|
||||||
$tool_domain_update_las_local_path = $HTTP_POST_VARS['tool_form_domain_las_local_path'];
|
$tool_domain_update_las_local_path = $_POST['tool_form_domain_las_local_path'];
|
||||||
$tool_domain_update_sql_string = $HTTP_POST_VARS['tool_form_domain_sql_string'];
|
$tool_domain_update_sql_string = $_POST['tool_form_domain_sql_string'];
|
||||||
$tool_domain_update_cs_sql_string = $HTTP_POST_VARS['tool_form_domain_cs_sql_string'];
|
$tool_domain_update_cs_sql_string = $_POST['tool_form_domain_cs_sql_string'];
|
||||||
$tool_domain_update_hd_check = $HTTP_POST_VARS['tool_form_domain_hd_check'];
|
$tool_domain_update_hd_check = $_POST['tool_form_domain_hd_check'];
|
||||||
|
|
||||||
$tool_error = tool_admin_domains_update($tool_domain_update_id, $tool_domain_update_name, $tool_domain_update_application,
|
$tool_error = tool_admin_domains_update($tool_domain_update_id, $tool_domain_update_name, $tool_domain_update_application,
|
||||||
$tool_domain_update_as_host, $tool_domain_update_as_port, $tool_domain_update_rrd_path,
|
$tool_domain_update_as_host, $tool_domain_update_as_port, $tool_domain_update_rrd_path,
|
||||||
|
@ -627,7 +627,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['domain_id'] = $tool_domain_update_id;
|
$_GET['domain_id'] = $tool_domain_update_id;
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
@ -638,17 +638,17 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (isset($HTTP_POST_VARS['tool_form_domain_nel_id']))
|
if (isset($_POST['tool_form_domain_nel_id']))
|
||||||
{
|
{
|
||||||
$tool_domain_nel_update_id = $HTTP_POST_VARS['tool_form_domain_nel_id'];
|
$tool_domain_nel_update_id = $_POST['tool_form_domain_nel_id'];
|
||||||
$tool_domain_nel_update_name = $HTTP_POST_VARS['tool_form_domain_nel_name'];
|
$tool_domain_nel_update_name = $_POST['tool_form_domain_nel_name'];
|
||||||
$tool_domain_nel_update_status = $HTTP_POST_VARS['tool_form_domain_nel_status'];
|
$tool_domain_nel_update_status = $_POST['tool_form_domain_nel_status'];
|
||||||
//$tool_domain_nel_update_version = $HTTP_POST_VARS['tool_form_domain_nel_version'];
|
//$tool_domain_nel_update_version = $_POST['tool_form_domain_nel_version'];
|
||||||
|
|
||||||
//tool_admin_domains_update_nel($tool_domain_nel_update_id, $tool_domain_nel_update_name, $tool_domain_nel_update_version, $tool_domain_nel_update_status);
|
//tool_admin_domains_update_nel($tool_domain_nel_update_id, $tool_domain_nel_update_name, $tool_domain_nel_update_version, $tool_domain_nel_update_status);
|
||||||
tool_admin_domains_update_nel($tool_domain_nel_update_id, $tool_domain_nel_update_name, $tool_domain_nel_update_status);
|
tool_admin_domains_update_nel($tool_domain_nel_update_id, $tool_domain_nel_update_name, $tool_domain_nel_update_status);
|
||||||
|
|
||||||
$HTTP_GET_VARS['domain_id'] = $HTTP_POST_VARS['tool_form_domain_id'];
|
$_GET['domain_id'] = $_POST['tool_form_domain_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// break;
|
// break;
|
||||||
|
@ -660,7 +660,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_domain_edit_id = $HTTP_GET_VARS['domain_id'];
|
$tool_domain_edit_id = $_GET['domain_id'];
|
||||||
$tool_domain_edit_data = tool_admin_domains_get_id($tool_domain_edit_id);
|
$tool_domain_edit_data = tool_admin_domains_get_id($tool_domain_edit_id);
|
||||||
$tpl->assign('tool_domain_edit_data', $tool_domain_edit_data);
|
$tpl->assign('tool_domain_edit_data', $tool_domain_edit_data);
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_domain_delete_id = $HTTP_POST_VARS['tool_form_domain_id'];
|
$tool_domain_delete_id = $_POST['tool_form_domain_id'];
|
||||||
if (!($tool_domain_delete_id > 0))
|
if (!($tool_domain_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid domain!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid domain!");
|
||||||
|
@ -701,17 +701,17 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_domain_create_name = $HTTP_POST_VARS['tool_form_domain_name'];
|
$tool_domain_create_name = $_POST['tool_form_domain_name'];
|
||||||
$tool_domain_create_application = $HTTP_POST_VARS['tool_form_domain_application'];
|
$tool_domain_create_application = $_POST['tool_form_domain_application'];
|
||||||
$tool_domain_create_as_host = $HTTP_POST_VARS['tool_form_domain_as_host'];
|
$tool_domain_create_as_host = $_POST['tool_form_domain_as_host'];
|
||||||
$tool_domain_create_as_port = $HTTP_POST_VARS['tool_form_domain_as_port'];
|
$tool_domain_create_as_port = $_POST['tool_form_domain_as_port'];
|
||||||
$tool_domain_create_mfs_web = $HTTP_POST_VARS['tool_form_domain_mfs_web'];
|
$tool_domain_create_mfs_web = $_POST['tool_form_domain_mfs_web'];
|
||||||
$tool_domain_create_rrd_path = $HTTP_POST_VARS['tool_form_domain_rrd_path'];
|
$tool_domain_create_rrd_path = $_POST['tool_form_domain_rrd_path'];
|
||||||
$tool_domain_create_las_admin_path = $HTTP_POST_VARS['tool_form_domain_las_admin_path'];
|
$tool_domain_create_las_admin_path = $_POST['tool_form_domain_las_admin_path'];
|
||||||
$tool_domain_create_las_local_path = $HTTP_POST_VARS['tool_form_domain_las_local_path'];
|
$tool_domain_create_las_local_path = $_POST['tool_form_domain_las_local_path'];
|
||||||
$tool_domain_create_sql_string = $HTTP_POST_VARS['tool_form_domain_sql_string'];
|
$tool_domain_create_sql_string = $_POST['tool_form_domain_sql_string'];
|
||||||
$tool_domain_create_cs_sql_string = $HTTP_POST_VARS['tool_form_domain_cs_sql_string'];
|
$tool_domain_create_cs_sql_string = $_POST['tool_form_domain_cs_sql_string'];
|
||||||
$tool_domain_create_hd_check = $HTTP_POST_VARS['tool_form_domain_hd_check'];
|
$tool_domain_create_hd_check = $_POST['tool_form_domain_hd_check'];
|
||||||
|
|
||||||
$tool_error = tool_admin_domains_add( $tool_domain_create_name, $tool_domain_create_application, $tool_domain_create_as_host,
|
$tool_error = tool_admin_domains_add( $tool_domain_create_name, $tool_domain_create_application, $tool_domain_create_as_host,
|
||||||
$tool_domain_create_as_port, $tool_domain_create_rrd_path,
|
$tool_domain_create_as_port, $tool_domain_create_rrd_path,
|
||||||
|
@ -741,8 +741,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_shard')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_shard')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -753,11 +753,11 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_shard_update_id = $HTTP_POST_VARS['tool_form_shard_id'];
|
$tool_shard_update_id = $_POST['tool_form_shard_id'];
|
||||||
$tool_shard_update_name = $HTTP_POST_VARS['tool_form_shard_name'];
|
$tool_shard_update_name = $_POST['tool_form_shard_name'];
|
||||||
$tool_shard_update_as_id = $HTTP_POST_VARS['tool_form_shard_as_id'];
|
$tool_shard_update_as_id = $_POST['tool_form_shard_as_id'];
|
||||||
$tool_shard_update_domain_id = $HTTP_POST_VARS['tool_form_shard_domain_id'];
|
$tool_shard_update_domain_id = $_POST['tool_form_shard_domain_id'];
|
||||||
$tool_shard_update_language = $HTTP_POST_VARS['tool_form_shard_language'];
|
$tool_shard_update_language = $_POST['tool_form_shard_language'];
|
||||||
|
|
||||||
$tool_error = tool_admin_shards_update($tool_shard_update_id, $tool_shard_update_name, $tool_shard_update_as_id, $tool_shard_update_domain_id, $tool_shard_update_language);
|
$tool_error = tool_admin_shards_update($tool_shard_update_id, $tool_shard_update_name, $tool_shard_update_as_id, $tool_shard_update_domain_id, $tool_shard_update_language);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -765,7 +765,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['shard_id'] = $tool_shard_update_id;
|
$_GET['shard_id'] = $tool_shard_update_id;
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
@ -776,7 +776,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_shard_edit_id = $HTTP_GET_VARS['shard_id'];
|
$tool_shard_edit_id = $_GET['shard_id'];
|
||||||
$tool_shard_edit_data = tool_admin_shards_get_id($tool_shard_edit_id);
|
$tool_shard_edit_data = tool_admin_shards_get_id($tool_shard_edit_id);
|
||||||
$tpl->assign('tool_shard_edit_data', $tool_shard_edit_data);
|
$tpl->assign('tool_shard_edit_data', $tool_shard_edit_data);
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_shard_delete_id = $HTTP_POST_VARS['tool_form_shard_id'];
|
$tool_shard_delete_id = $_POST['tool_form_shard_id'];
|
||||||
if (!($tool_shard_delete_id > 0))
|
if (!($tool_shard_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid shard!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid shard!");
|
||||||
|
@ -808,10 +808,10 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_shard_create_name = $HTTP_POST_VARS['tool_form_shard_name'];
|
$tool_shard_create_name = $_POST['tool_form_shard_name'];
|
||||||
$tool_shard_create_as_id = $HTTP_POST_VARS['tool_form_shard_as_id'];
|
$tool_shard_create_as_id = $_POST['tool_form_shard_as_id'];
|
||||||
$tool_shard_create_domain_id = $HTTP_POST_VARS['tool_form_shard_domain_id'];
|
$tool_shard_create_domain_id = $_POST['tool_form_shard_domain_id'];
|
||||||
$tool_shard_create_language = $HTTP_POST_VARS['tool_form_shard_language'];
|
$tool_shard_create_language = $_POST['tool_form_shard_language'];
|
||||||
|
|
||||||
$tool_error = tool_admin_shards_add($tool_shard_create_name, $tool_shard_create_as_id, $tool_shard_create_domain_id, $tool_shard_create_language);
|
$tool_error = tool_admin_shards_add($tool_shard_create_name, $tool_shard_create_as_id, $tool_shard_create_domain_id, $tool_shard_create_language);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -842,8 +842,8 @@
|
||||||
if (!tool_admin_applications_check('tool_admin_restart')) nt_common_redirect('index.php');
|
if (!tool_admin_applications_check('tool_admin_restart')) nt_common_redirect('index.php');
|
||||||
|
|
||||||
$tool_action = null;
|
$tool_action = null;
|
||||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||||
|
|
||||||
switch ($tool_action)
|
switch ($tool_action)
|
||||||
{
|
{
|
||||||
|
@ -854,10 +854,10 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_restart_update_id = $HTTP_POST_VARS['tool_form_restart_id'];
|
$tool_restart_update_id = $_POST['tool_form_restart_id'];
|
||||||
$tool_restart_update_name = $HTTP_POST_VARS['tool_form_restart_name'];
|
$tool_restart_update_name = $_POST['tool_form_restart_name'];
|
||||||
$tool_restart_update_services = $HTTP_POST_VARS['tool_form_restart_services'];
|
$tool_restart_update_services = $_POST['tool_form_restart_services'];
|
||||||
$tool_restart_update_order = $HTTP_POST_VARS['tool_form_restart_order'];
|
$tool_restart_update_order = $_POST['tool_form_restart_order'];
|
||||||
|
|
||||||
$tool_error = tool_admin_restarts_update($tool_restart_update_id, $tool_restart_update_name, $tool_restart_update_services, $tool_restart_update_order);
|
$tool_error = tool_admin_restarts_update($tool_restart_update_id, $tool_restart_update_name, $tool_restart_update_services, $tool_restart_update_order);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -865,7 +865,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['restart_id'] = $tool_restart_update_id;
|
$_GET['restart_id'] = $tool_restart_update_id;
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_restart_edit_id = $HTTP_GET_VARS['restart_id'];
|
$tool_restart_edit_id = $_GET['restart_id'];
|
||||||
$tool_restart_edit_data = tool_admin_restarts_get_id($tool_restart_edit_id);
|
$tool_restart_edit_data = tool_admin_restarts_get_id($tool_restart_edit_id);
|
||||||
$tpl->assign('tool_restart_edit_data', $tool_restart_edit_data);
|
$tpl->assign('tool_restart_edit_data', $tool_restart_edit_data);
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_restart_delete_id = $HTTP_POST_VARS['tool_form_restart_id'];
|
$tool_restart_delete_id = $_POST['tool_form_restart_id'];
|
||||||
if (!($tool_restart_delete_id > 0))
|
if (!($tool_restart_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid restart group!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid restart group!");
|
||||||
|
@ -908,9 +908,9 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_restart_create_name = $HTTP_POST_VARS['tool_form_restart_name'];
|
$tool_restart_create_name = $_POST['tool_form_restart_name'];
|
||||||
$tool_restart_create_services = $HTTP_POST_VARS['tool_form_restart_services'];
|
$tool_restart_create_services = $_POST['tool_form_restart_services'];
|
||||||
$tool_restart_create_order = $HTTP_POST_VARS['tool_form_restart_order'];
|
$tool_restart_create_order = $_POST['tool_form_restart_order'];
|
||||||
|
|
||||||
$tool_error = tool_admin_restarts_add($tool_restart_create_name, $tool_restart_create_services, $tool_restart_create_order);
|
$tool_error = tool_admin_restarts_add($tool_restart_create_name, $tool_restart_create_services, $tool_restart_create_order);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -927,10 +927,10 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_message_update_id = $HTTP_POST_VARS['tool_form_message_id'];
|
$tool_message_update_id = $_POST['tool_form_message_id'];
|
||||||
$tool_message_update_name = $HTTP_POST_VARS['tool_form_message_name'];
|
$tool_message_update_name = $_POST['tool_form_message_name'];
|
||||||
$tool_message_update_value = $HTTP_POST_VARS['tool_form_message_value'];
|
$tool_message_update_value = $_POST['tool_form_message_value'];
|
||||||
$tool_message_update_lang = $HTTP_POST_VARS['tool_form_message_lang'];
|
$tool_message_update_lang = $_POST['tool_form_message_lang'];
|
||||||
|
|
||||||
$tool_error = tool_admin_restart_messages_update($tool_message_update_id, $tool_message_update_name, $tool_message_update_value, $tool_message_update_lang);
|
$tool_error = tool_admin_restart_messages_update($tool_message_update_id, $tool_message_update_name, $tool_message_update_value, $tool_message_update_lang);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
@ -938,7 +938,7 @@
|
||||||
$tpl->assign('tool_alert_message', $tool_error);
|
$tpl->assign('tool_alert_message', $tool_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
$HTTP_GET_VARS['msg_id'] = $tool_message_update_id;
|
$_GET['msg_id'] = $tool_message_update_id;
|
||||||
|
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
|
@ -949,7 +949,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_message_edit_id = $HTTP_GET_VARS['msg_id'];
|
$tool_message_edit_id = $_GET['msg_id'];
|
||||||
$tool_message_edit_data = tool_admin_restart_messages_get_id($tool_message_edit_id);
|
$tool_message_edit_data = tool_admin_restart_messages_get_id($tool_message_edit_id);
|
||||||
$tpl->assign('tool_message_edit_data', $tool_message_edit_data);
|
$tpl->assign('tool_message_edit_data', $tool_message_edit_data);
|
||||||
|
|
||||||
|
@ -962,7 +962,7 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_message_delete_id = $HTTP_POST_VARS['tool_form_message_id'];
|
$tool_message_delete_id = $_POST['tool_form_message_id'];
|
||||||
if (!($tool_message_delete_id > 0))
|
if (!($tool_message_delete_id > 0))
|
||||||
{
|
{
|
||||||
$tpl->assign('tool_alert_message', "/!\ Error: invalid restart message!");
|
$tpl->assign('tool_alert_message', "/!\ Error: invalid restart message!");
|
||||||
|
@ -982,9 +982,9 @@
|
||||||
* -------------------------------------------------------------------------------------------
|
* -------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tool_message_create_name = $HTTP_POST_VARS['tool_form_message_name'];
|
$tool_message_create_name = $_POST['tool_form_message_name'];
|
||||||
$tool_message_create_value = $HTTP_POST_VARS['tool_form_message_value'];
|
$tool_message_create_value = $_POST['tool_form_message_value'];
|
||||||
$tool_message_create_lang = $HTTP_POST_VARS['tool_form_message_lang'];
|
$tool_message_create_lang = $_POST['tool_form_message_lang'];
|
||||||
|
|
||||||
$tool_error = tool_admin_restart_messages_add($tool_message_create_name, $tool_message_create_value, $tool_message_create_lang);
|
$tool_error = tool_admin_restart_messages_add($tool_message_create_name, $tool_message_create_value, $tool_message_create_lang);
|
||||||
if ($tool_error != "")
|
if ($tool_error != "")
|
||||||
|
|
|
@ -82,11 +82,11 @@
|
||||||
|
|
||||||
|
|
||||||
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
||||||
if (isset($HTTP_POST_VARS['services_refresh']))
|
if (isset($_POST['services_refresh']))
|
||||||
{
|
{
|
||||||
if ($current_refresh_rate != $HTTP_POST_VARS['services_refresh'])
|
if ($current_refresh_rate != $_POST['services_refresh'])
|
||||||
{
|
{
|
||||||
$current_refresh_rate = $HTTP_POST_VARS['services_refresh'];
|
$current_refresh_rate = $_POST['services_refresh'];
|
||||||
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,8 +361,8 @@
|
||||||
$tpl->assign('tool_graph_variables', $graph_variables);
|
$tpl->assign('tool_graph_variables', $graph_variables);
|
||||||
$tpl->assign('tool_graph_datas', $graph_datas);
|
$tpl->assign('tool_graph_datas', $graph_datas);
|
||||||
|
|
||||||
$tool_variable_selected = $HTTP_GET_VARS['variable'];
|
$tool_variable_selected = $_GET['variable'];
|
||||||
$tool_service_selected = $HTTP_GET_VARS['service'];
|
$tool_service_selected = $_GET['service'];
|
||||||
|
|
||||||
$tpl->assign('tool_graph_variable_selected', $tool_variable_selected);
|
$tpl->assign('tool_graph_variable_selected', $tool_variable_selected);
|
||||||
$tpl->assign('tool_graph_service_selected', $tool_service_selected);
|
$tpl->assign('tool_graph_service_selected', $tool_service_selected);
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
|
|
||||||
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
||||||
|
|
||||||
if (isset($HTTP_POST_VARS['services_refresh']))
|
if (isset($_POST['services_refresh']))
|
||||||
{
|
{
|
||||||
if ($current_refresh_rate != $HTTP_POST_VARS['services_refresh'])
|
if ($current_refresh_rate != $_POST['services_refresh'])
|
||||||
{
|
{
|
||||||
$current_refresh_rate = $HTTP_POST_VARS['services_refresh'];
|
$current_refresh_rate = $_POST['services_refresh'];
|
||||||
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
|
|
||||||
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
$current_refresh_rate = nt_auth_get_session_var('current_refresh_rate');
|
||||||
|
|
||||||
if (isset($HTTP_POST_VARS['services_refresh']))
|
if (isset($_POST['services_refresh']))
|
||||||
{
|
{
|
||||||
if ($current_refresh_rate != $HTTP_POST_VARS['services_refresh'])
|
if ($current_refresh_rate != $_POST['services_refresh'])
|
||||||
{
|
{
|
||||||
$current_refresh_rate = $HTTP_POST_VARS['services_refresh'];
|
$current_refresh_rate = $_POST['services_refresh'];
|
||||||
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
nt_auth_set_session_var('current_refresh_rate',$current_refresh_rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue