mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
merge
This commit is contained in:
commit
acc6ce1b59
34 changed files with 1099 additions and 414 deletions
|
@ -232,6 +232,7 @@ public:
|
|||
CCDBNodeBranch *getDB() const { return _DbRootNode; }
|
||||
// yoyo: should avoid to try creating DbPropr with this system... very dangerous
|
||||
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)
|
||||
CCDBNodeBranch *getDbBranch(const std::string &name);
|
||||
// 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 needCheck = checkInData;
|
||||
bool needCheck = false;
|
||||
|
||||
#if !FINAL_VERSION
|
||||
needCheck = false;
|
||||
|
@ -554,10 +554,12 @@ bool CInterfaceParser::parseInterface (const std::vector<std::string> & strings,
|
|||
string::size_type pos = filename.find ("@");
|
||||
if (pos != string::npos)
|
||||
{
|
||||
std::string bigFilename = CBigFile::getInstance().getBigFileName(filename.substr(0, pos));
|
||||
std::string path = "data/"+filename.substr(0, pos);
|
||||
|
||||
isInData = bigFilename.find(path) != std::string::npos;
|
||||
vector<string> bigFilePaths;
|
||||
CBigFile::getInstance().getBigFilePaths(bigFilePaths);
|
||||
if (CBigFile::getInstance().getBigFileName(filename.substr(0, pos)) != "data/"+filename.substr(0, pos))
|
||||
isInData = false;
|
||||
else
|
||||
isInData = true;
|
||||
}
|
||||
|
||||
if ((needCheck && !isInData) || !file.open (CPath::lookup(firstFileName)))
|
||||
|
@ -4685,7 +4687,7 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error)
|
|||
{
|
||||
// get file
|
||||
|
||||
bool needCheck = true;
|
||||
bool needCheck = false;
|
||||
|
||||
#if !FINAL_VERSION
|
||||
needCheck = false;
|
||||
|
@ -4702,10 +4704,10 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error)
|
|||
std::string::size_type pos = pathName.find("@");
|
||||
if (pos != string::npos)
|
||||
{
|
||||
std::string bigFilename = CBigFile::getInstance().getBigFileName(pathName.substr(0, pos));
|
||||
std::string path = "data/"+pathName.substr(0, pos);
|
||||
|
||||
isInData = bigFilename.find(path) != std::string::npos;
|
||||
if (CBigFile::getInstance().getBigFileName(pathName.substr(0, pos)) != "data/"+pathName.substr(0, pos))
|
||||
isInData = false;
|
||||
else
|
||||
isInData = true;
|
||||
}
|
||||
|
||||
if (needCheck && !isInData)
|
||||
|
|
|
@ -44,12 +44,14 @@
|
|||
#include "../sheet_manager.h"
|
||||
#include "game_share/slot_equipment.h"
|
||||
#include "game_share/animal_status.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
|
||||
#include "../client_cfg.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
extern NLMISC::CLog g_log;
|
||||
// Context 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));
|
||||
NameId = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("NAMEID"), 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)
|
||||
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");
|
||||
if (prop) DbFilterMissMP = pIM->getDbProp(prop);
|
||||
|
||||
prop = xmlGetProp (cur, (xmlChar*)"filter_tp");
|
||||
if (prop) DbFilterTP = pIM->getDbProp(prop);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2041,6 +2047,13 @@ bool SBagOptions::isSomethingChanged()
|
|||
LastDbFilterMissMP = (DbFilterMissMP->getValue8() != 0);
|
||||
}
|
||||
|
||||
if (DbFilterTP != NULL)
|
||||
if ((DbFilterTP->getValue8() != 0) != LastDbFilterTP)
|
||||
{
|
||||
bRet = true;
|
||||
LastDbFilterTP = (DbFilterTP->getValue8() != 0);
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -2054,25 +2067,33 @@ bool SBagOptions::canDisplay(CDBCtrlSheet *pCS) const
|
|||
bool bFilterTool = getFilterTool();
|
||||
bool bFilterMP = getFilterMP();
|
||||
bool bFilterMissMP = getFilterMissMP();
|
||||
bool bFilterTP = getFilterTP();
|
||||
|
||||
const CItemSheet *pIS = pCS->asItemSheet();
|
||||
if (pIS != NULL)
|
||||
{
|
||||
// Armor
|
||||
if ((pIS->Family == ITEMFAMILY::ARMOR) || (pIS->Family == ITEMFAMILY::JEWELRY))
|
||||
if ((pIS->Family == ITEMFAMILY::ARMOR) ||
|
||||
(pIS->Family == ITEMFAMILY::JEWELRY))
|
||||
if (!bFilterArmor) bDisplay = false;
|
||||
|
||||
// Weapon
|
||||
if ((pIS->Family == ITEMFAMILY::SHIELD) || (pIS->Family == ITEMFAMILY::MELEE_WEAPON) ||
|
||||
(pIS->Family == ITEMFAMILY::RANGE_WEAPON) || (pIS->Family == ITEMFAMILY::AMMO) ||
|
||||
(pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) || (pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE) ||
|
||||
if ((pIS->Family == ITEMFAMILY::SHIELD) ||
|
||||
(pIS->Family == ITEMFAMILY::MELEE_WEAPON) ||
|
||||
(pIS->Family == ITEMFAMILY::RANGE_WEAPON) ||
|
||||
(pIS->Family == ITEMFAMILY::AMMO) ||
|
||||
(pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ||
|
||||
(pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE) ||
|
||||
(pIS->Family == ITEMFAMILY::BRICK) )
|
||||
if (!bFilterWeapon) bDisplay = false;
|
||||
|
||||
// Tool
|
||||
if ((pIS->Family == ITEMFAMILY::CRAFTING_TOOL) || (pIS->Family == ITEMFAMILY::HARVEST_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::TAMING_TOOL) || (pIS->Family == ITEMFAMILY::TRAINING_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::BAG) || (pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET) )
|
||||
if ((pIS->Family == ITEMFAMILY::CRAFTING_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::HARVEST_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::TAMING_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::TRAINING_TOOL) ||
|
||||
(pIS->Family == ITEMFAMILY::BAG) ||
|
||||
(pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET) )
|
||||
if (!bFilterTool) bDisplay = false;
|
||||
|
||||
// MP
|
||||
|
@ -2081,9 +2102,15 @@ bool SBagOptions::canDisplay(CDBCtrlSheet *pCS) const
|
|||
|
||||
// Mission MP
|
||||
if ((pIS->Family == ITEMFAMILY::MISSION_ITEM) ||
|
||||
(pIS->Family == ITEMFAMILY::XP_CATALYSER) ||
|
||||
(pIS->Family == ITEMFAMILY::CONSUMABLE) ||
|
||||
((pIS->Family == ITEMFAMILY::RAW_MATERIAL) && !pIS->canBuildSomeItemPart()))
|
||||
if (!bFilterMissMP) bDisplay = false;
|
||||
|
||||
|
||||
// Teleporter Pacts
|
||||
if ((pIS->Family == ITEMFAMILY::TELEPORT))
|
||||
if (!bFilterTP) bDisplay = false;
|
||||
|
||||
// Jobs Items
|
||||
if (pIS->Id.toString().substr(0, 6) == "rpjob_")
|
||||
bDisplay = false;
|
||||
|
@ -2776,6 +2803,37 @@ public:
|
|||
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
|
||||
|
@ -2844,11 +2902,11 @@ class CHandlerInvTempAll : public IActionHandler
|
|||
|
||||
nlctassert(MAX_INVENTORY_ANIMAL==4);
|
||||
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))
|
||||
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))
|
||||
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))
|
||||
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/temp_inventory_mode.h"
|
||||
#include "game_share/inventories.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
|
||||
class CCDBNodeBranch;
|
||||
class CDBCtrlSheet;
|
||||
|
@ -62,6 +63,7 @@ public:
|
|||
CCDBNodeLeaf *Weight;
|
||||
CCDBNodeLeaf *NameId;
|
||||
CCDBNodeLeaf *InfoVersion;
|
||||
CCDBNodeLeaf *ResaleFlag;
|
||||
|
||||
public:
|
||||
// ctor
|
||||
|
@ -77,6 +79,8 @@ public:
|
|||
uint32 getWeight() const { return (uint32) (Weight ? Weight->getValue32() : 0); }
|
||||
uint32 getNameId() const { return (uint32) (NameId ? NameId->getValue32() : 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 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 setNameId(uint32 nid) { if (NameId) NameId->setValue32((sint32) nid); }
|
||||
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 *DbFilterMP;
|
||||
CCDBNodeLeaf *DbFilterMissMP;
|
||||
CCDBNodeLeaf *DbFilterTP;
|
||||
|
||||
bool LastDbFilterArmor;
|
||||
bool LastDbFilterWeapon;
|
||||
bool LastDbFilterTool;
|
||||
bool LastDbFilterMP;
|
||||
bool LastDbFilterMissMP;
|
||||
bool LastDbFilterTP;
|
||||
// -----------------------
|
||||
SBagOptions()
|
||||
{
|
||||
InvType = CInventoryManager::InvUnknown;
|
||||
DbFilterArmor = DbFilterWeapon = DbFilterTool = DbFilterMP = DbFilterMissMP = NULL;
|
||||
LastDbFilterArmor = LastDbFilterWeapon = LastDbFilterTool = LastDbFilterMP = LastDbFilterMissMP = false;
|
||||
DbFilterArmor = DbFilterWeapon = DbFilterTool = DbFilterMP = DbFilterMissMP = DbFilterTP = NULL;
|
||||
LastDbFilterArmor = LastDbFilterWeapon = LastDbFilterTool = LastDbFilterMP = LastDbFilterMissMP = LastDbFilterTP = false;
|
||||
}
|
||||
|
||||
bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||
|
@ -552,6 +559,12 @@ struct SBagOptions
|
|||
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
|
||||
bool canDisplay(CDBCtrlSheet *pCS) const;
|
||||
};
|
||||
|
|
|
@ -143,7 +143,7 @@ extern NLMISC::CLog g_log;
|
|||
extern CContinentManager ContinentMngr;
|
||||
extern uint8 PlayerSelectedSlot;
|
||||
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
|
||||
std::ostream &operator<<(std::ostream &str, const ucstring &value)
|
||||
|
@ -1323,6 +1323,7 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
ls.registerFunc("getIndexInDB", getIndexInDB);
|
||||
ls.registerFunc("getUIId", getUIId);
|
||||
ls.registerFunc("createGroupInstance", createGroupInstance);
|
||||
ls.registerFunc("createRootGroupInstance", createRootGroupInstance);
|
||||
ls.registerFunc("createUIElement", createUIElement);
|
||||
ls.registerFunc("launchContextMenuInGame", launchContextMenuInGame);
|
||||
ls.registerFunc("parseInterfaceFromString", parseInterfaceFromString);
|
||||
|
@ -1356,6 +1357,19 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
ls.registerFunc("enableModalWindow", enableModalWindow);
|
||||
ls.registerFunc("disableModalWindow", disableModalWindow);
|
||||
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("displaySystemInfo", displaySystemInfo);
|
||||
ls.registerFunc("disableContextHelpForControl", disableContextHelpForControl);
|
||||
|
@ -1363,6 +1377,7 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
ls.registerFunc("setWeatherValue", setWeatherValue);
|
||||
ls.registerFunc("getWeatherValue", getWeatherValue);
|
||||
ls.registerFunc("getCompleteIslands", getCompleteIslands);
|
||||
ls.registerFunc("displayBubble", displayBubble);
|
||||
ls.registerFunc("getIslandId", getIslandId);
|
||||
ls.registerFunc("getClientCfgVar", getClientCfgVar);
|
||||
ls.registerFunc("isPlayerFreeTrial", isPlayerFreeTrial);
|
||||
|
@ -1370,14 +1385,18 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
ls.registerFunc("isInRingMode", isInRingMode);
|
||||
ls.registerFunc("getUserRace", getUserRace);
|
||||
ls.registerFunc("getSheet2idx", getSheet2idx);
|
||||
ls.registerFunc("getTargetSlot", getTargetSlot);
|
||||
ls.registerFunc("getSlotDataSetId", getSlotDataSetId);
|
||||
|
||||
// Through LUABind API
|
||||
lua_State *L= ls.getStatePointer();
|
||||
|
||||
luabind::module(L)
|
||||
[
|
||||
LUABIND_FUNC(addDbProp),
|
||||
LUABIND_FUNC(getDbProp),
|
||||
LUABIND_FUNC(setDbProp),
|
||||
LUABIND_FUNC(delDbProp),
|
||||
LUABIND_FUNC(debugInfo),
|
||||
LUABIND_FUNC(rawDebugInfo),
|
||||
LUABIND_FUNC(dumpCallStack),
|
||||
|
@ -1456,9 +1475,16 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
luabind::def("shellExecute", CMiscFunctions::shellExecute),
|
||||
|
||||
LUABIND_FUNC(getPlayerLevel),
|
||||
LUABIND_FUNC(getPlayerVpa),
|
||||
LUABIND_FUNC(getPlayerVpb),
|
||||
LUABIND_FUNC(getPlayerVpc),
|
||||
LUABIND_FUNC(getTargetLevel),
|
||||
LUABIND_FUNC(getTargetForceRegion),
|
||||
LUABIND_FUNC(getTargetLevelForce),
|
||||
LUABIND_FUNC(getTargetSheet),
|
||||
LUABIND_FUNC(getTargetVpa),
|
||||
LUABIND_FUNC(getTargetVpb),
|
||||
LUABIND_FUNC(getTargetVpc),
|
||||
LUABIND_FUNC(isTargetNPC),
|
||||
LUABIND_FUNC(isTargetPlayer), // return 'true' if the target is an npc
|
||||
LUABIND_FUNC(isTargetUser),
|
||||
|
@ -1686,12 +1712,60 @@ void CLuaIHM::setDbProp(const std::string &dbProp, sint32 value)
|
|||
// Write to the DB if found
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(dbProp, false);
|
||||
|
||||
if(node)
|
||||
node->setValue32(value);
|
||||
else
|
||||
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)
|
||||
|
@ -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";
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
|
@ -1875,7 +1963,13 @@ static CEntityCL *getTargetSlot()
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
return EntitiesMngr.entity((uint) node->getValue32());
|
||||
return EntitiesMngr.entity((uint) node->getValue32());
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
static CEntityCL *getSlotEntity(uint slot)
|
||||
{
|
||||
return EntitiesMngr.entity(slot);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -1890,10 +1984,31 @@ sint32 CLuaIHM::getPlayerLevel()
|
|||
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()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return -1;
|
||||
if ( target->isPlayer() )
|
||||
{
|
||||
|
@ -1913,10 +2028,52 @@ sint32 CLuaIHM::getTargetLevel()
|
|||
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()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return -1;
|
||||
if ( target->isPlayer() )
|
||||
{
|
||||
|
@ -1944,7 +2101,7 @@ sint32 CLuaIHM::getTargetForceRegion()
|
|||
// ***************************************************************************
|
||||
sint32 CLuaIHM::getTargetLevelForce()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return -1;
|
||||
if ( target->isPlayer() )
|
||||
{
|
||||
|
@ -1972,7 +2129,7 @@ sint32 CLuaIHM::getTargetLevelForce()
|
|||
// ***************************************************************************
|
||||
bool CLuaIHM::isTargetNPC()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return false;
|
||||
return target->isNPC();
|
||||
}
|
||||
|
@ -1980,7 +2137,7 @@ bool CLuaIHM::isTargetNPC()
|
|||
// ***************************************************************************
|
||||
bool CLuaIHM::isTargetPlayer()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return false;
|
||||
return target->isPlayer();
|
||||
}
|
||||
|
@ -1989,7 +2146,7 @@ bool CLuaIHM::isTargetPlayer()
|
|||
// ***************************************************************************
|
||||
bool CLuaIHM::isTargetUser()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return false;
|
||||
return target->isUser();
|
||||
}
|
||||
|
@ -1998,15 +2155,15 @@ bool CLuaIHM::isTargetUser()
|
|||
bool CLuaIHM::isPlayerInPVPMode()
|
||||
{
|
||||
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()
|
||||
{
|
||||
CEntityCL *target = getTargetSlot();
|
||||
CEntityCL *target = getTargetEntity();
|
||||
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;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
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)
|
||||
{
|
||||
|
@ -2407,6 +2611,42 @@ int CLuaIHM::createUIElement(CLuaState &ls)
|
|||
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)
|
||||
{
|
||||
|
@ -3523,7 +3763,7 @@ void CLuaIHM::browseNpcWebPage(const std::string &htmlId, const std::string &url
|
|||
string("&lang=") + ClientCfg.getHtmlLanguageCode() +
|
||||
string("&guild_name=") + guildName;
|
||||
}
|
||||
/*
|
||||
/* Already added by GroupHtml
|
||||
if(webig)
|
||||
{
|
||||
// append special webig auth params
|
||||
|
@ -4242,6 +4482,126 @@ int CLuaIHM::getPlayerPos(CLuaState &ls)
|
|||
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)
|
||||
{
|
||||
|
@ -4437,3 +4797,23 @@ int CLuaIHM::getSheet2idx(CLuaState &ls)
|
|||
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
|
||||
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 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 isTargetPlayer(); // return 'true' if the target is a player
|
||||
static bool isTargetUser(); // return 'true' if the target is the user
|
||||
|
@ -202,10 +209,12 @@ private:
|
|||
static bool isInGame();
|
||||
static uint32 getPlayerSelectedSlot();
|
||||
static bool isPlayerSlotNewbieLand(uint32 slot); // test if one of the player slot is a newbieland one, if not so, client must be patched in order to continue
|
||||
static uint32 getLocalTime();
|
||||
static uint32 getLocalTime();
|
||||
static double getPreciseLocalTime();
|
||||
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 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 void messageBox(const ucstring &text);
|
||||
static void messageBox(const ucstring &text, const std::string &masterGroup);
|
||||
|
@ -286,17 +295,24 @@ private:
|
|||
static int getUICaller(CLuaState &ls); // params: none. return: CInterfaceElement* (nil if error)
|
||||
static int getCurrentWindowUnder(CLuaState &ls); // params: none. return: CInterfaceElement* (nil if none)
|
||||
static int getUI(CLuaState &ls); // params: "ui:interface:...". return: CInterfaceElement* (nil if error), an additionnal boolean parameter
|
||||
// can specify verbose display when the element is note found (default is true)
|
||||
// can specify verbose display when the element is note found (default is true)
|
||||
static int createGroupInstance(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
|
||||
// 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 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,
|
||||
// param 2 = id of parent where the instance will be inserted
|
||||
// param 3 = table with ("template_param", "template_param_value") key/value pairs
|
||||
// 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 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 getUIId(CLuaState &ls); // params: CInterfaceElement*. return: ui id (empty if error)
|
||||
static int runAH(CLuaState &ls); // params: CInterfaceElement *, "ah", "params". return: none
|
||||
|
@ -334,9 +350,9 @@ private:
|
|||
static int getServerSeason(CLuaState &ls); // get the last season sent by the server
|
||||
// 0->auto, computed locally from the current day (or not received from server yet)
|
||||
// 1->server force spring
|
||||
// 2->' ' ' summer
|
||||
// 3->' ' ' autumn
|
||||
// 4->' ' ' winter
|
||||
// 2->' ' ' summer
|
||||
// 3->' ' ' autumn
|
||||
// 4->' ' ' winter
|
||||
static int computeCurrSeason(CLuaState &ls); // compute current displayed season (1->spring, etc .)
|
||||
static int getAutoSeason(CLuaState &ls); // compute automatic season that would be at this time (1->spring, etc .)
|
||||
|
||||
|
@ -345,6 +361,19 @@ private:
|
|||
static int enableModalWindow(CLuaState &ls);
|
||||
static int disableModalWindow(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 getClientCfgVar(CLuaState &ls);
|
||||
static int isPlayerFreeTrial(CLuaState &ls);
|
||||
|
@ -352,6 +381,8 @@ private:
|
|||
static int isInRingMode(CLuaState &ls);
|
||||
static int getUserRace(CLuaState &ls);
|
||||
static int getSheet2idx(CLuaState &ls);
|
||||
static int getTargetSlot(CLuaState &ls);
|
||||
static int getSlotDataSetId(CLuaState &ls);
|
||||
|
||||
|
||||
// LUA functions exported for Dev only (debug)
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "../net_manager.h"
|
||||
#include "../connection.h"
|
||||
#include "group_tab.h"
|
||||
#include "guild_manager.h"
|
||||
// Game share
|
||||
#include "game_share/entity_types.h"
|
||||
// NeL
|
||||
|
@ -1418,7 +1419,47 @@ void CPeopleInterraction::updateContactInList(uint32 contactId, TCharConnectionS
|
|||
{
|
||||
sint index = FriendList.getIndexFromContactId(contactId);
|
||||
if (index != -1)
|
||||
FriendList.setOnline(index, online);
|
||||
{
|
||||
if (FriendList.getOnline(index) != online)
|
||||
{
|
||||
// Only do work if online status has changed
|
||||
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
|
||||
{
|
||||
|
@ -1988,6 +2029,39 @@ public:
|
|||
};
|
||||
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
|
||||
|
@ -3236,6 +3310,12 @@ NLMISC_COMMAND(chatLog, "", "")
|
|||
if (pIM->getLogState())
|
||||
pIM->displaySystemInfo(CI18N::get("uiLogTurnedOn"));
|
||||
|
||||
CCDBNodeLeaf *node = pIM->getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||
if (node)
|
||||
{
|
||||
node->setValue32(pIM->getLogState() ? 1 : 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
|
@ -211,7 +211,8 @@ bool CPeopleList::sortExByOnline(const CPeople& a, const CPeople& b)
|
|||
{
|
||||
return (name_a < name_b);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
// Compare online status
|
||||
switch (a.Online)
|
||||
{
|
||||
|
@ -467,18 +468,12 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c
|
|||
return;
|
||||
}
|
||||
|
||||
ucstring cur_time;
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||
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;
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
ucstring finalMsg = csr + CI18N::get("youTell") + ": " + msg;
|
||||
// display msg with good color
|
||||
CInterfaceProperty prop;
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", receiver);
|
||||
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||
|
@ -783,10 +778,6 @@ void CPeopleList::setOnline(uint index, TCharConnectionState online)
|
|||
|
||||
_Peoples[index].Online = online;
|
||||
|
||||
// If the people goes offline remove eventually opened chat
|
||||
if (online == ccs_offline)
|
||||
openCloseChat(index, false);
|
||||
|
||||
updatePeopleMenu(index);
|
||||
}
|
||||
|
||||
|
@ -944,14 +935,8 @@ class CHandlerContactEntry : public IActionHandler
|
|||
ucstring final;
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, false);
|
||||
|
||||
ucstring cur_time;
|
||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||
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")+": ";
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
final += csr + CI18N::get("youTell")+": ";
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
||||
final += text;
|
||||
|
@ -962,7 +947,6 @@ class CHandlerContactEntry : public IActionHandler
|
|||
strFindReplace(final, CI18N::get("youTell"), s);
|
||||
CInterfaceManager::getInstance()->log(final);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -139,6 +139,7 @@ void CPlayerTrade::restoreItem(CDBCtrlSheet *exchangeSlot)
|
|||
im.getBagItem(emptySlot).setWeight((uint32) exchangeSlot->getItemWeight());
|
||||
im.getBagItem(emptySlot).setNameId(exchangeSlot->getItemNameId());
|
||||
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
|
||||
|
|
|
@ -70,6 +70,10 @@ public:
|
|||
|
||||
// from CInterfaceElement
|
||||
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; }
|
||||
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; }
|
||||
|
||||
// Reflected
|
||||
|
|
|
@ -42,5 +42,23 @@ void CViewLink::setHTMLView(CGroupHTML *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
|
||||
std::string Link;
|
||||
|
||||
std::string LinkTitle;
|
||||
|
||||
// Set the main group
|
||||
void setHTMLView(class CGroupHTML *html);
|
||||
bool getMouseOverShape(std::string &texName, uint8 &rot, NLMISC::CRGBA &col);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ CViewPointer::CViewPointer (const TCtorParam ¶m)
|
|||
_Color = CRGBA(255,255,255,255);
|
||||
_LastHightLight = NULL;
|
||||
_StringMode = false;
|
||||
_ForceStringMode = false;
|
||||
_StringCursor = NULL;
|
||||
}
|
||||
|
||||
|
@ -255,6 +256,41 @@ void CViewPointer::draw ()
|
|||
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
|
||||
pCB = pIM->getCapturePointerRight();
|
||||
if (pCB != NULL)
|
||||
|
@ -521,16 +557,50 @@ bool CViewPointer::drawPan(CCtrlBase* pCB, NLMISC::CRGBA col)
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
||||
bool CViewPointer::drawCustom(CCtrlBase* pCB)
|
||||
{
|
||||
std::string texName;
|
||||
string texName;
|
||||
uint8 rot;
|
||||
NLMISC::CRGBA col;
|
||||
if (pCB->getMouseOverShape(texName, rot, col))
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||
sint32 texId = rVR.getTextureIdFromName (texName);
|
||||
drawCursor(texId, col, 0);
|
||||
return true;
|
||||
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();
|
||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||
sint32 texId = rVR.getTextureIdFromName (texName);
|
||||
drawCursor(texId, col, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ private:
|
|||
|
||||
// Cursor mode
|
||||
bool _StringMode;
|
||||
bool _ForceStringMode;
|
||||
CInterfaceGroup *_StringCursor;
|
||||
CInterfaceGroup *_StringCursorHardware;
|
||||
ucstring _ContextString;
|
||||
|
|
|
@ -743,8 +743,8 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std:
|
|||
image.UVMin.V = uvMinV;
|
||||
image.UVMax.U = uvMaxU;
|
||||
image.UVMax.V = uvMaxV;
|
||||
sTGAname = tgaName;
|
||||
sTGAname = toLower(sTGAname);
|
||||
sTGAname = toLower(string(tgaName));
|
||||
|
||||
string::size_type stripPng = sTGAname.find(".png");
|
||||
if (stripPng != string::npos)
|
||||
{
|
||||
|
@ -752,6 +752,7 @@ void CViewRenderer::loadTextures (const std::string &textureFileName, const std:
|
|||
sTGAname[stripPng + 2] = 'g';
|
||||
sTGAname[stripPng + 3] = 'a';
|
||||
}
|
||||
|
||||
image.Name = sTGAname;
|
||||
image.GlobalTexturePtr = &(_GlobalTextures.back());
|
||||
if (getTextureIdFromName(sTGAname) != -1)
|
||||
|
@ -1029,6 +1030,7 @@ sint32 CViewRenderer::getTextureIdFromName (const string &sName) const
|
|||
|
||||
// convert to lowCase
|
||||
string nameLwr = toLower(sName);
|
||||
|
||||
string::size_type stripPng = nameLwr.find(".png");
|
||||
if (stripPng != string::npos)
|
||||
{
|
||||
|
@ -1036,7 +1038,7 @@ sint32 CViewRenderer::getTextureIdFromName (const string &sName) const
|
|||
nameLwr[stripPng + 2] = 'g';
|
||||
nameLwr[stripPng + 3] = 'a';
|
||||
}
|
||||
|
||||
|
||||
// Search in map
|
||||
TTextureMap::const_iterator it= _TextureMap.find(nameLwr);
|
||||
if( it==_TextureMap.end() )
|
||||
|
@ -1531,6 +1533,7 @@ void CViewRenderer::initSystemTextures()
|
|||
addSystemTexture(RegenTexture, "regen.tga");
|
||||
addSystemTexture(RegenBackTexture, "regen_back.tga");
|
||||
addSystemTexture(GlowStarTexture, "glow_star_24.tga");
|
||||
addSystemTexture(ItemLockedByOwnerTexture, "r2ed_toolbar_lock_small.tga");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
RegenTexture,
|
||||
RegenBackTexture,
|
||||
GlowStarTexture,
|
||||
ItemLockedByOwnerTexture,
|
||||
NumSystemTextures,
|
||||
};
|
||||
|
||||
|
|
|
@ -225,7 +225,10 @@ HTAttr p_attr[] =
|
|||
|
||||
HTAttr div_attr[] =
|
||||
{
|
||||
HTML_ATTR(DIV,NAME),
|
||||
HTML_ATTR(DIV,CLASS),
|
||||
HTML_ATTR(DIV,ID),
|
||||
HTML_ATTR(DIV,NAME),
|
||||
HTML_ATTR(DIV,STYLE),
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -535,6 +538,7 @@ const std::string &setCurrentDomain(const std::string &url)
|
|||
return HTTPCurrentDomain;
|
||||
}
|
||||
|
||||
|
||||
void initLibWWW()
|
||||
{
|
||||
static bool initialized = false;
|
||||
|
|
|
@ -206,7 +206,10 @@ 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())
|
||||
{
|
||||
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||
if (pGEB != NULL)
|
||||
if (pGEB != NULL && (pGEB->getInputString().empty()))
|
||||
{
|
||||
pGEB->setInputString(l);
|
||||
}
|
||||
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
|
||||
}
|
||||
else
|
||||
|
@ -1792,7 +1794,6 @@ class CAHOpenURL : public IActionHandler
|
|||
}
|
||||
else
|
||||
{
|
||||
DWORD ret = 0;
|
||||
LPVOID lpMsgBuf;
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
|
@ -1922,21 +1923,21 @@ class CAHInitResLod : public IActionHandler
|
|||
// first indicates the preset-able cfg-variable
|
||||
// second indicates if its a double variable (else it's an int)
|
||||
CfgPresetList.clear();
|
||||
CfgPresetList.push_back(pair<string,bool>("LandscapeTileNear", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("LandscapeThreshold", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("Vision", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("MicroVeget", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("MicroVegetDensity", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("LandscapeTileNear", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("LandscapeThreshold", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("Vision", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("MicroVeget", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("MicroVegetDensity", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("FxNbMaxPoly", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("Cloud", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("Cloud", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("CloudQuality", true));
|
||||
CfgPresetList.push_back(pair<string,bool>("CloudUpdate", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("Shadows", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("SkinNbMaxPoly", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("SkinNbMaxPoly", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("NbMaxSkeletonNotCLod", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("CharacterFarClip", true));
|
||||
|
||||
CfgPresetList.push_back(pair<string,bool>("Bloom", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("Bloom", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("SquareBloom", false));
|
||||
CfgPresetList.push_back(pair<string,bool>("DensityBloom", true));
|
||||
|
||||
|
|
|
@ -2889,6 +2889,7 @@ bool mainLoop()
|
|||
// This code must remain at the very end of the 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
|
||||
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)
|
||||
lastConnectionState = CNetworkConnection::Connected;
|
||||
connectionState = NetMngr.getConnectionState();
|
||||
|
||||
CInterfaceManager::getInstance()->executeLuaScript("game:onFarTpEnd()");
|
||||
}
|
||||
|
||||
} // end of main loop
|
||||
|
|
|
@ -664,10 +664,12 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
|
|||
}
|
||||
|
||||
// select DB
|
||||
sint32 dbIndex = ChatMngr.getDynamicChannelDbIndexFromId(dynChatId);
|
||||
clamp(dbIndex,0 , CChatGroup::MaxDynChanPerPlayer);
|
||||
string entry="UI:SAVE:CHAT:COLORS:";
|
||||
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::shout: entry+="SHOUT"; 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)
|
||||
{
|
||||
// find the sender/text separator to put color tags
|
||||
|
@ -3206,7 +3213,7 @@ void impulseOutpostDeclareWarAck(NLMISC::CBitMemStream &impulse)
|
|||
node->setValue32(timeStartAttack);
|
||||
}
|
||||
|
||||
extern void addWebIGParams (string &url);
|
||||
extern void addWebIGParams(string &url, bool trustedDomain);
|
||||
|
||||
//-----------------------------------------------
|
||||
//-----------------------------------------------
|
||||
|
@ -3290,7 +3297,6 @@ private:
|
|||
string group = titleStr.toString();
|
||||
// <missing:XXX>
|
||||
group = group.substr(9, group.size()-10);
|
||||
nlinfo("group = %s", group.c_str());
|
||||
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:"+group+":content:html"));
|
||||
if (!groupHtml)
|
||||
{
|
||||
|
@ -3312,7 +3318,7 @@ private:
|
|||
if (group == "webig")
|
||||
pGC->setActive(true);
|
||||
string url = contentStr.toString();
|
||||
addWebIGParams(url);
|
||||
addWebIGParams(url, true);
|
||||
groupHtml->browse(url.c_str());
|
||||
pIM->setTopWindow(pGC);
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ bool CPlayerCL::isNeutral() const
|
|||
//-----------------------------------------------
|
||||
bool CPlayerCL::isFriend () const
|
||||
{
|
||||
return isNeutral() || isNeutralPVP() || isAlly();
|
||||
return isNeutral() || isAlly();
|
||||
}
|
||||
|
||||
|
||||
|
@ -174,12 +174,44 @@ bool CPlayerCL::isFriend () 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( UserEntity->getPvpMode() == PVP_MODE::None ||
|
||||
getPvpMode() == PVP_MODE::None )
|
||||
{
|
||||
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
|
||||
if ( isAnOutpostEnemy() )
|
||||
|
@ -187,19 +219,12 @@ bool CPlayerCL::isEnemy () const
|
|||
return true;
|
||||
}
|
||||
|
||||
// Challenge
|
||||
if( getPvpMode()&PVP_MODE::PvpChallenge &&
|
||||
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
||||
{
|
||||
if( !isInTeam() )
|
||||
return true;
|
||||
}
|
||||
|
||||
// Zone Free
|
||||
if( 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;
|
||||
}
|
||||
|
||||
|
@ -207,7 +232,11 @@ bool CPlayerCL::isEnemy () const
|
|||
if( 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;
|
||||
}
|
||||
|
||||
|
@ -219,29 +248,18 @@ bool CPlayerCL::isEnemy () const
|
|||
return true;
|
||||
}
|
||||
|
||||
// Duel
|
||||
if( getPvpMode()&PVP_MODE::PvpDuel &&
|
||||
UserEntity->getPvpMode()&PVP_MODE::PvpDuel )
|
||||
{
|
||||
return true; // TODO
|
||||
}
|
||||
|
||||
// Faction
|
||||
// Free PVP : Ennemis are not in team AND not in league
|
||||
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
||||
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
||||
{
|
||||
// Check if is not ally
|
||||
if (!isInTeam() && !isInGuild())
|
||||
{
|
||||
// Check for each Clan if is in opposition
|
||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
||||
{
|
||||
if ((isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) || (isPvpAlly(i) && UserEntity->isPvpEnnemy(i)))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// If in same Guild but different Leagues => ennemy
|
||||
if ( isInSameGuild() && oneInLeague() && !isInSameLeague() )
|
||||
return true;
|
||||
|
||||
if (!isInTeam() && !isInSameLeague())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
} // isEnemy //
|
||||
|
@ -253,32 +271,38 @@ bool CPlayerCL::isEnemy () 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 ||
|
||||
getPvpMode() == PVP_MODE::None )
|
||||
{
|
||||
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
|
||||
if ( isAnOutpostAlly() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Challenge
|
||||
if( getPvpMode()&PVP_MODE::PvpChallenge &&
|
||||
UserEntity->getPvpMode()&PVP_MODE::PvpChallenge )
|
||||
{
|
||||
if( isInTeam() )
|
||||
return true;
|
||||
}
|
||||
|
||||
// Zone Free
|
||||
if( getPvpMode()&PVP_MODE::PvpZoneFree &&
|
||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneFree )
|
||||
{
|
||||
if( isInTeam() || isInGuild() )
|
||||
if( isInTeam() || isInSameLeague() )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -286,8 +310,12 @@ bool CPlayerCL::isAlly() const
|
|||
if( getPvpMode()&PVP_MODE::PvpZoneGuild &&
|
||||
UserEntity->getPvpMode()&PVP_MODE::PvpZoneGuild )
|
||||
{
|
||||
if( isInTeam() || isInGuild() )
|
||||
if( isInTeam() || isInSameLeague() )
|
||||
return true;
|
||||
|
||||
if ( isInSameGuild() && !oneInLeague() )
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
// Zone Faction
|
||||
|
@ -298,26 +326,15 @@ bool CPlayerCL::isAlly() const
|
|||
return true;
|
||||
}
|
||||
|
||||
// Faction
|
||||
// Free PVP : Allies are in team OR in league
|
||||
if ((getPvpMode()&PVP_MODE::PvpFaction || getPvpMode()&PVP_MODE::PvpFactionFlagged) &&
|
||||
(UserEntity->getPvpMode()&PVP_MODE::PvpFaction || UserEntity->getPvpMode()&PVP_MODE::PvpFactionFlagged))
|
||||
{
|
||||
if (isInTeam() && isInGuild())
|
||||
if (isInTeam() || isInSameLeague())
|
||||
return true;
|
||||
|
||||
// Check for each Clan if is in opposition
|
||||
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;
|
||||
}
|
||||
if ( isInSameGuild() && !oneInLeague() )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -336,66 +353,12 @@ bool CPlayerCL::isNeutralPVP() const
|
|||
return false;
|
||||
}
|
||||
|
||||
// Outpost
|
||||
if ( getOutpostId() != 0 )
|
||||
if( UserEntity->getPvpMode() == PVP_MODE::None )
|
||||
{
|
||||
if( UserEntity->getOutpostId() != getOutpostId() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 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 true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return (!isEnemy() && !isAlly());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace STRING_MANAGER
|
|||
|
||||
// ***************************************************************************
|
||||
map<string, CStringManagerClient::CItem> CStringManagerClient::_SpecItem_TempMap;
|
||||
map<ucstring, ucstring> CStringManagerClient::_DynStrings;
|
||||
vector<ucstring> CStringManagerClient::_TitleWords;
|
||||
bool CStringManagerClient::_SpecItem_MemoryCompressed = false;
|
||||
char *CStringManagerClient::_SpecItem_Labels = NULL;
|
||||
ucchar *CStringManagerClient::_SpecItem_NameDesc = NULL;
|
||||
|
@ -381,7 +383,15 @@ restartLoop4:
|
|||
result = ucstring(tmp) + it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
|
@ -1595,9 +1605,29 @@ const ucchar *CStringManagerClient::getSPhraseLocalizedDescription(NLMISC::CShee
|
|||
// ***************************************************************************
|
||||
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)
|
||||
{
|
||||
|
@ -1641,7 +1671,14 @@ const ucchar *CStringManagerClient::getSquadLocalizedDescription(NLMISC::CSheetI
|
|||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
||||
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)
|
||||
{
|
||||
std::string label= id.toString();
|
||||
if (label.empty())
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
static void specialWordsMemoryCompress();
|
||||
// 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 replaceDynString(const ucstring &name, const ucstring &text);
|
||||
|
||||
// Get the Localized Name of the Places.
|
||||
static const ucchar *getPlaceLocalizedName(const std::string &placeNameID);
|
||||
|
@ -106,6 +107,7 @@ public:
|
|||
|
||||
// Get the Localized Title name
|
||||
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
|
||||
static const ucchar *getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type);
|
||||
|
||||
|
@ -215,8 +217,6 @@ private:
|
|||
// Callback for dyn string value from the server
|
||||
TStringCallbacksContainer _DynStringsCallbacks;
|
||||
|
||||
|
||||
|
||||
// Return value for waiting string..
|
||||
static ucstring _WaitString;
|
||||
|
||||
|
@ -273,6 +273,9 @@ private:
|
|||
static bool _SpecItem_MemoryCompressed;
|
||||
|
||||
static std::map<std::string, CItem> _SpecItem_TempMap;
|
||||
static std::vector<ucstring> _TitleWords;
|
||||
static std::map<ucstring, ucstring> _DynStrings;
|
||||
|
||||
|
||||
static char *_SpecItem_Labels;
|
||||
static ucchar *_SpecItem_NameDesc;
|
||||
|
|
|
@ -507,7 +507,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle,
|
|||
CPlayerCL::updateVisualPropertyName(gameCycle, prop);
|
||||
|
||||
// Name changed ?
|
||||
if (oldNameId != _NameId)
|
||||
/* if (oldNameId != _NameId)
|
||||
{
|
||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||
CInterfaceElement *element = pIM->getElementFromId("ui:interface:mailbox:content:html");
|
||||
|
@ -518,7 +518,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle,
|
|||
html->browse("home");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
}// updateVisualPropertyName //
|
||||
|
||||
//-----------------------------------------------
|
||||
|
@ -2657,36 +2657,39 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
|||
playerGiftNeeded->setValue32(0);
|
||||
}
|
||||
}
|
||||
/* TODO ULU : Add RP 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)
|
||||
{
|
||||
CPlayerCL *pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
||||
|
||||
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 (tag)
|
||||
{
|
||||
if ((pPlayer->getPvpMode()&PVP_MODE::PvpFaction || pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged) && pPlayer->isPvpAlly(i))
|
||||
{
|
||||
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
|
||||
{
|
||||
tag->setTexture("alpha_10.tga");
|
||||
}
|
||||
}
|
||||
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
||||
tagMode->setTexture("pvp_orange.tga");
|
||||
else if (pPlayer->getPvpMode()&PVP_MODE::PvpFactionFlagged)
|
||||
tagMode->setTexture("pvp_red.tga");
|
||||
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");
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -477,6 +477,14 @@ public:
|
|||
/// true if current behaviour allows to change front
|
||||
bool canChangeFront();
|
||||
|
||||
ucstring getLoginName()
|
||||
{
|
||||
if (_LoginName == ucstring(""))
|
||||
_LoginName = getDisplayName();
|
||||
|
||||
return _LoginName;
|
||||
}
|
||||
|
||||
protected:
|
||||
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)
|
||||
CItemSnapshot _PreviousRightHandItem;
|
||||
CItemSnapshot _PreviousLeftHandItem;
|
||||
|
||||
ucstring _LoginName;
|
||||
};
|
||||
|
||||
/// Out game received position
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
define('NELTOOL_NO_USER_NEEDED', true);
|
||||
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";
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
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);
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
|
@ -44,11 +44,11 @@
|
|||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
@ -637,10 +637,10 @@
|
|||
// 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_name = $HTTP_POST_VARS['shards_update_name'];
|
||||
$shard_update_mode = $_POST['shards_update'];
|
||||
$shard_update_name = $_POST['shards_update_name'];
|
||||
|
||||
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_shard_name = $HTTP_POST_VARS['ws_shard_name'];
|
||||
$shard_ws_shard_id = $HTTP_POST_VARS['ws_shard_id'];
|
||||
$shard_ws_su = $_POST['ws_su'];
|
||||
$shard_ws_shard_name = $_POST['ws_shard_name'];
|
||||
$shard_ws_shard_id = $_POST['ws_shard_id'];
|
||||
|
||||
$shard_ws_state = $HTTP_POST_VARS['ws_state_'. $shard_ws_shard_name];
|
||||
$shard_ws_motd = $HTTP_POST_VARS['ws_motd_'. $shard_ws_shard_name];
|
||||
$shard_ws_state = $_POST['ws_state_'. $shard_ws_shard_name];
|
||||
$shard_ws_motd = $_POST['ws_motd_'. $shard_ws_shard_name];
|
||||
|
||||
// coders don't know how to write it seems
|
||||
// ace: now they know if ($shard_ws_state == 'close') $shard_ws_state = 'closed';
|
||||
|
@ -705,9 +705,9 @@
|
|||
$tpl->clear_assign('tool_execute_result');
|
||||
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)
|
||||
{
|
||||
|
@ -997,9 +997,9 @@
|
|||
case '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();
|
||||
if (sizeof($service_list))
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
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']);
|
||||
|
||||
$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_menu', tool_admin_menu_get_list($IE_CHECK)); //$tool_admin_menu); // defined in 'functions_tool_administration.php'
|
||||
|
@ -42,7 +42,7 @@
|
|||
$log_step = 30;
|
||||
$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);
|
||||
|
||||
|
@ -76,8 +76,8 @@
|
|||
if (!tool_admin_applications_check('tool_admin_user')) nt_common_redirect('index.php');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -85,12 +85,12 @@
|
|||
|
||||
if ($tool_action == 'update applications')
|
||||
{
|
||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
||||
$tool_user_update_appl_ids = $HTTP_POST_VARS['tool_form_application_ids'];
|
||||
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||
$tool_user_update_appl_ids = $_POST['tool_form_application_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;
|
||||
|
@ -99,15 +99,15 @@
|
|||
|
||||
if ($tool_action == 'update domains')
|
||||
{
|
||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
||||
$tool_user_update_domain_ids = $HTTP_POST_VARS['tool_form_domain_ids'];
|
||||
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||
$tool_user_update_domain_ids = $_POST['tool_form_domain_ids'];
|
||||
|
||||
$tool_user_data = tool_admin_users_get_id($tool_user_update_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);
|
||||
|
||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
||||
$_GET['user_id'] = $tool_user_update_id;
|
||||
}
|
||||
|
||||
//break;
|
||||
|
@ -116,15 +116,15 @@
|
|||
|
||||
if ($tool_action == 'update shards')
|
||||
{
|
||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
||||
$tool_user_update_shard_ids = $HTTP_POST_VARS['tool_form_shard_ids'];
|
||||
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||
$tool_user_update_shard_ids = $_POST['tool_form_shard_ids'];
|
||||
|
||||
$tool_user_data = tool_admin_users_get_id($tool_user_update_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);
|
||||
|
||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
||||
$_GET['user_id'] = $tool_user_update_id;
|
||||
}
|
||||
|
||||
//break;
|
||||
|
@ -138,11 +138,11 @@
|
|||
|
||||
if ($tool_action == 'update')
|
||||
{
|
||||
$tool_user_update_id = $HTTP_POST_VARS['tool_form_user_id'];
|
||||
$tool_user_update_name = $HTTP_POST_VARS['tool_form_user_name'];
|
||||
$tool_user_update_password = $HTTP_POST_VARS['tool_form_user_password'];
|
||||
$tool_user_update_group = $HTTP_POST_VARS['tool_form_user_group'];
|
||||
$tool_user_update_active = $HTTP_POST_VARS['tool_form_user_active'];
|
||||
$tool_user_update_id = $_POST['tool_form_user_id'];
|
||||
$tool_user_update_name = $_POST['tool_form_user_name'];
|
||||
$tool_user_update_password = $_POST['tool_form_user_password'];
|
||||
$tool_user_update_group = $_POST['tool_form_user_group'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -150,7 +150,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['user_id'] = $tool_user_update_id;
|
||||
$_GET['user_id'] = $tool_user_update_id;
|
||||
}
|
||||
|
||||
//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_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))
|
||||
{
|
||||
$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_password = $HTTP_POST_VARS['tool_form_user_password'];
|
||||
$tool_user_create_group = $HTTP_POST_VARS['tool_form_user_group'];
|
||||
$tool_user_create_active = $HTTP_POST_VARS['tool_form_user_active'];
|
||||
$tool_user_create_name = $_POST['tool_form_user_name'];
|
||||
$tool_user_create_password = $_POST['tool_form_user_password'];
|
||||
$tool_user_create_group = $_POST['tool_form_user_group'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -255,8 +255,8 @@
|
|||
if (!tool_admin_applications_check('tool_admin_group')) nt_common_redirect('index.php');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -264,12 +264,12 @@
|
|||
|
||||
if ($tool_action == 'update applications')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_update_appl_ids = $HTTP_POST_VARS['tool_form_application_ids'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$tool_group_update_appl_ids = $_POST['tool_form_application_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;
|
||||
|
@ -278,12 +278,12 @@
|
|||
|
||||
if ($tool_action == 'update domains')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_update_domain_ids = $HTTP_POST_VARS['tool_form_domain_ids'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$tool_group_update_domain_ids = $_POST['tool_form_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;
|
||||
|
@ -292,12 +292,12 @@
|
|||
|
||||
if ($tool_action == 'update shards')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_update_shard_ids = $HTTP_POST_VARS['tool_form_shard_ids'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$tool_group_update_shard_ids = $_POST['tool_form_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;
|
||||
|
@ -311,11 +311,11 @@
|
|||
|
||||
if ($tool_action == 'update')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_update_name = $HTTP_POST_VARS['tool_form_group_name'];
|
||||
$tool_group_update_level = $HTTP_POST_VARS['tool_form_group_level'];
|
||||
$tool_group_update_default = $HTTP_POST_VARS['tool_form_group_default'];
|
||||
$tool_group_update_active = $HTTP_POST_VARS['tool_form_group_active'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$tool_group_update_name = $_POST['tool_form_group_name'];
|
||||
$tool_group_update_level = $_POST['tool_form_group_level'];
|
||||
$tool_group_update_default = $_POST['tool_form_group_default'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -323,7 +323,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
||||
$_GET['group_id'] = $tool_group_update_id;
|
||||
}
|
||||
|
||||
//break;
|
||||
|
@ -337,8 +337,8 @@
|
|||
|
||||
if ($tool_action == 'update default domain')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_default_domain = $HTTP_POST_VARS['tool_form_domain_default'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -346,7 +346,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
||||
$_GET['group_id'] = $tool_group_update_id;
|
||||
}
|
||||
|
||||
//break;
|
||||
|
@ -360,8 +360,8 @@
|
|||
|
||||
if ($tool_action == 'update default shard')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_default_shard = $HTTP_POST_VARS['tool_form_shard_default'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -369,7 +369,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
||||
$_GET['group_id'] = $tool_group_update_id;
|
||||
}
|
||||
|
||||
//break;
|
||||
|
@ -383,8 +383,8 @@
|
|||
|
||||
if ($tool_action == 'update default application')
|
||||
{
|
||||
$tool_group_update_id = $HTTP_POST_VARS['tool_form_group_id'];
|
||||
$tool_group_default_application = $HTTP_POST_VARS['tool_form_application_default'];
|
||||
$tool_group_update_id = $_POST['tool_form_group_id'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -392,7 +392,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['group_id'] = $tool_group_update_id;
|
||||
$_GET['group_id'] = $tool_group_update_id;
|
||||
}
|
||||
|
||||
//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);
|
||||
$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))
|
||||
{
|
||||
$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_level = $HTTP_POST_VARS['tool_form_group_level'];
|
||||
$tool_group_create_default = $HTTP_POST_VARS['tool_form_group_default'];
|
||||
$tool_group_create_active = $HTTP_POST_VARS['tool_form_group_active'];
|
||||
$tool_group_create_name = $_POST['tool_form_group_name'];
|
||||
$tool_group_create_level = $_POST['tool_form_group_level'];
|
||||
$tool_group_create_default = $_POST['tool_form_group_default'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -492,8 +492,8 @@
|
|||
if (!tool_admin_applications_check('tool_admin_application')) nt_common_redirect('index.php');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -504,13 +504,13 @@
|
|||
* -------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$tool_application_update_id = $HTTP_POST_VARS['tool_form_application_id'];
|
||||
$tool_application_update_name = $HTTP_POST_VARS['tool_form_application_name'];
|
||||
$tool_application_update_uri = $HTTP_POST_VARS['tool_form_application_uri'];
|
||||
$tool_application_update_restriction = $HTTP_POST_VARS['tool_form_application_restriction'];
|
||||
$tool_application_update_icon = $HTTP_POST_VARS['tool_form_application_icon'];
|
||||
$tool_application_update_order = $HTTP_POST_VARS['tool_form_application_order'];
|
||||
$tool_application_update_visible = $HTTP_POST_VARS['tool_form_application_visible'];
|
||||
$tool_application_update_id = $_POST['tool_form_application_id'];
|
||||
$tool_application_update_name = $_POST['tool_form_application_name'];
|
||||
$tool_application_update_uri = $_POST['tool_form_application_uri'];
|
||||
$tool_application_update_restriction = $_POST['tool_form_application_restriction'];
|
||||
$tool_application_update_icon = $_POST['tool_form_application_icon'];
|
||||
$tool_application_update_order = $_POST['tool_form_application_order'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -518,7 +518,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['application_id'] = $tool_application_update_id;
|
||||
$_GET['application_id'] = $tool_application_update_id;
|
||||
|
||||
//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);
|
||||
$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))
|
||||
{
|
||||
$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_uri = $HTTP_POST_VARS['tool_form_application_uri'];
|
||||
$tool_application_create_restriction = $HTTP_POST_VARS['tool_form_application_restriction'];
|
||||
$tool_application_create_icon = $HTTP_POST_VARS['tool_form_application_icon'];
|
||||
$tool_application_create_order = $HTTP_POST_VARS['tool_form_application_order'];
|
||||
$tool_application_create_visible = $HTTP_POST_VARS['tool_form_application_visible'];
|
||||
$tool_application_create_name = $_POST['tool_form_application_name'];
|
||||
$tool_application_create_uri = $_POST['tool_form_application_uri'];
|
||||
$tool_application_create_restriction = $_POST['tool_form_application_restriction'];
|
||||
$tool_application_create_icon = $_POST['tool_form_application_icon'];
|
||||
$tool_application_create_order = $_POST['tool_form_application_order'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -592,8 +592,8 @@
|
|||
if (!tool_admin_applications_check('tool_admin_domain')) nt_common_redirect('index.php');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -604,18 +604,18 @@
|
|||
* -------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$tool_domain_update_id = $HTTP_POST_VARS['tool_form_domain_id'];
|
||||
$tool_domain_update_name = $HTTP_POST_VARS['tool_form_domain_name'];
|
||||
$tool_domain_update_application = $HTTP_POST_VARS['tool_form_domain_application'];
|
||||
$tool_domain_update_as_host = $HTTP_POST_VARS['tool_form_domain_as_host'];
|
||||
$tool_domain_update_as_port = $HTTP_POST_VARS['tool_form_domain_as_port'];
|
||||
$tool_domain_update_mfs_web = $HTTP_POST_VARS['tool_form_domain_mfs_web'];
|
||||
$tool_domain_update_rrd_path = $HTTP_POST_VARS['tool_form_domain_rrd_path'];
|
||||
$tool_domain_update_las_admin_path = $HTTP_POST_VARS['tool_form_domain_las_admin_path'];
|
||||
$tool_domain_update_las_local_path = $HTTP_POST_VARS['tool_form_domain_las_local_path'];
|
||||
$tool_domain_update_sql_string = $HTTP_POST_VARS['tool_form_domain_sql_string'];
|
||||
$tool_domain_update_cs_sql_string = $HTTP_POST_VARS['tool_form_domain_cs_sql_string'];
|
||||
$tool_domain_update_hd_check = $HTTP_POST_VARS['tool_form_domain_hd_check'];
|
||||
$tool_domain_update_id = $_POST['tool_form_domain_id'];
|
||||
$tool_domain_update_name = $_POST['tool_form_domain_name'];
|
||||
$tool_domain_update_application = $_POST['tool_form_domain_application'];
|
||||
$tool_domain_update_as_host = $_POST['tool_form_domain_as_host'];
|
||||
$tool_domain_update_as_port = $_POST['tool_form_domain_as_port'];
|
||||
$tool_domain_update_mfs_web = $_POST['tool_form_domain_mfs_web'];
|
||||
$tool_domain_update_rrd_path = $_POST['tool_form_domain_rrd_path'];
|
||||
$tool_domain_update_las_admin_path = $_POST['tool_form_domain_las_admin_path'];
|
||||
$tool_domain_update_las_local_path = $_POST['tool_form_domain_las_local_path'];
|
||||
$tool_domain_update_sql_string = $_POST['tool_form_domain_sql_string'];
|
||||
$tool_domain_update_cs_sql_string = $_POST['tool_form_domain_cs_sql_string'];
|
||||
$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_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);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['domain_id'] = $tool_domain_update_id;
|
||||
$_GET['domain_id'] = $tool_domain_update_id;
|
||||
|
||||
//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_name = $HTTP_POST_VARS['tool_form_domain_nel_name'];
|
||||
$tool_domain_nel_update_status = $HTTP_POST_VARS['tool_form_domain_nel_status'];
|
||||
//$tool_domain_nel_update_version = $HTTP_POST_VARS['tool_form_domain_nel_version'];
|
||||
$tool_domain_nel_update_id = $_POST['tool_form_domain_nel_id'];
|
||||
$tool_domain_nel_update_name = $_POST['tool_form_domain_nel_name'];
|
||||
$tool_domain_nel_update_status = $_POST['tool_form_domain_nel_status'];
|
||||
//$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_status);
|
||||
|
||||
$HTTP_GET_VARS['domain_id'] = $HTTP_POST_VARS['tool_form_domain_id'];
|
||||
$_GET['domain_id'] = $_POST['tool_form_domain_id'];
|
||||
}
|
||||
|
||||
// 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);
|
||||
$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))
|
||||
{
|
||||
$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_application = $HTTP_POST_VARS['tool_form_domain_application'];
|
||||
$tool_domain_create_as_host = $HTTP_POST_VARS['tool_form_domain_as_host'];
|
||||
$tool_domain_create_as_port = $HTTP_POST_VARS['tool_form_domain_as_port'];
|
||||
$tool_domain_create_mfs_web = $HTTP_POST_VARS['tool_form_domain_mfs_web'];
|
||||
$tool_domain_create_rrd_path = $HTTP_POST_VARS['tool_form_domain_rrd_path'];
|
||||
$tool_domain_create_las_admin_path = $HTTP_POST_VARS['tool_form_domain_las_admin_path'];
|
||||
$tool_domain_create_las_local_path = $HTTP_POST_VARS['tool_form_domain_las_local_path'];
|
||||
$tool_domain_create_sql_string = $HTTP_POST_VARS['tool_form_domain_sql_string'];
|
||||
$tool_domain_create_cs_sql_string = $HTTP_POST_VARS['tool_form_domain_cs_sql_string'];
|
||||
$tool_domain_create_hd_check = $HTTP_POST_VARS['tool_form_domain_hd_check'];
|
||||
$tool_domain_create_name = $_POST['tool_form_domain_name'];
|
||||
$tool_domain_create_application = $_POST['tool_form_domain_application'];
|
||||
$tool_domain_create_as_host = $_POST['tool_form_domain_as_host'];
|
||||
$tool_domain_create_as_port = $_POST['tool_form_domain_as_port'];
|
||||
$tool_domain_create_mfs_web = $_POST['tool_form_domain_mfs_web'];
|
||||
$tool_domain_create_rrd_path = $_POST['tool_form_domain_rrd_path'];
|
||||
$tool_domain_create_las_admin_path = $_POST['tool_form_domain_las_admin_path'];
|
||||
$tool_domain_create_las_local_path = $_POST['tool_form_domain_las_local_path'];
|
||||
$tool_domain_create_sql_string = $_POST['tool_form_domain_sql_string'];
|
||||
$tool_domain_create_cs_sql_string = $_POST['tool_form_domain_cs_sql_string'];
|
||||
$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_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');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -753,11 +753,11 @@
|
|||
* -------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$tool_shard_update_id = $HTTP_POST_VARS['tool_form_shard_id'];
|
||||
$tool_shard_update_name = $HTTP_POST_VARS['tool_form_shard_name'];
|
||||
$tool_shard_update_as_id = $HTTP_POST_VARS['tool_form_shard_as_id'];
|
||||
$tool_shard_update_domain_id = $HTTP_POST_VARS['tool_form_shard_domain_id'];
|
||||
$tool_shard_update_language = $HTTP_POST_VARS['tool_form_shard_language'];
|
||||
$tool_shard_update_id = $_POST['tool_form_shard_id'];
|
||||
$tool_shard_update_name = $_POST['tool_form_shard_name'];
|
||||
$tool_shard_update_as_id = $_POST['tool_form_shard_as_id'];
|
||||
$tool_shard_update_domain_id = $_POST['tool_form_shard_domain_id'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -765,7 +765,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['shard_id'] = $tool_shard_update_id;
|
||||
$_GET['shard_id'] = $tool_shard_update_id;
|
||||
|
||||
//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);
|
||||
$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))
|
||||
{
|
||||
$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_as_id = $HTTP_POST_VARS['tool_form_shard_as_id'];
|
||||
$tool_shard_create_domain_id = $HTTP_POST_VARS['tool_form_shard_domain_id'];
|
||||
$tool_shard_create_language = $HTTP_POST_VARS['tool_form_shard_language'];
|
||||
$tool_shard_create_name = $_POST['tool_form_shard_name'];
|
||||
$tool_shard_create_as_id = $_POST['tool_form_shard_as_id'];
|
||||
$tool_shard_create_domain_id = $_POST['tool_form_shard_domain_id'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -842,8 +842,8 @@
|
|||
if (!tool_admin_applications_check('tool_admin_restart')) nt_common_redirect('index.php');
|
||||
|
||||
$tool_action = null;
|
||||
if (isset($HTTP_POST_VARS['toolaction'])) $tool_action = $HTTP_POST_VARS['toolaction'];
|
||||
elseif (isset($HTTP_GET_VARS['toolaction'])) $tool_action = $HTTP_GET_VARS['toolaction'];
|
||||
if (isset($_POST['toolaction'])) $tool_action = $_POST['toolaction'];
|
||||
elseif (isset($_GET['toolaction'])) $tool_action = $_GET['toolaction'];
|
||||
|
||||
switch ($tool_action)
|
||||
{
|
||||
|
@ -854,10 +854,10 @@
|
|||
* -------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$tool_restart_update_id = $HTTP_POST_VARS['tool_form_restart_id'];
|
||||
$tool_restart_update_name = $HTTP_POST_VARS['tool_form_restart_name'];
|
||||
$tool_restart_update_services = $HTTP_POST_VARS['tool_form_restart_services'];
|
||||
$tool_restart_update_order = $HTTP_POST_VARS['tool_form_restart_order'];
|
||||
$tool_restart_update_id = $_POST['tool_form_restart_id'];
|
||||
$tool_restart_update_name = $_POST['tool_form_restart_name'];
|
||||
$tool_restart_update_services = $_POST['tool_form_restart_services'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -865,7 +865,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['restart_id'] = $tool_restart_update_id;
|
||||
$_GET['restart_id'] = $tool_restart_update_id;
|
||||
|
||||
//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);
|
||||
$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))
|
||||
{
|
||||
$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_services = $HTTP_POST_VARS['tool_form_restart_services'];
|
||||
$tool_restart_create_order = $HTTP_POST_VARS['tool_form_restart_order'];
|
||||
$tool_restart_create_name = $_POST['tool_form_restart_name'];
|
||||
$tool_restart_create_services = $_POST['tool_form_restart_services'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -927,10 +927,10 @@
|
|||
* -------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$tool_message_update_id = $HTTP_POST_VARS['tool_form_message_id'];
|
||||
$tool_message_update_name = $HTTP_POST_VARS['tool_form_message_name'];
|
||||
$tool_message_update_value = $HTTP_POST_VARS['tool_form_message_value'];
|
||||
$tool_message_update_lang = $HTTP_POST_VARS['tool_form_message_lang'];
|
||||
$tool_message_update_id = $_POST['tool_form_message_id'];
|
||||
$tool_message_update_name = $_POST['tool_form_message_name'];
|
||||
$tool_message_update_value = $_POST['tool_form_message_value'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
@ -938,7 +938,7 @@
|
|||
$tpl->assign('tool_alert_message', $tool_error);
|
||||
}
|
||||
|
||||
$HTTP_GET_VARS['msg_id'] = $tool_message_update_id;
|
||||
$_GET['msg_id'] = $tool_message_update_id;
|
||||
|
||||
//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);
|
||||
$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))
|
||||
{
|
||||
$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_value = $HTTP_POST_VARS['tool_form_message_value'];
|
||||
$tool_message_create_lang = $HTTP_POST_VARS['tool_form_message_lang'];
|
||||
$tool_message_create_name = $_POST['tool_form_message_name'];
|
||||
$tool_message_create_value = $_POST['tool_form_message_value'];
|
||||
$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);
|
||||
if ($tool_error != "")
|
||||
|
|
|
@ -82,11 +82,11 @@
|
|||
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
@ -361,8 +361,8 @@
|
|||
$tpl->assign('tool_graph_variables', $graph_variables);
|
||||
$tpl->assign('tool_graph_datas', $graph_datas);
|
||||
|
||||
$tool_variable_selected = $HTTP_GET_VARS['variable'];
|
||||
$tool_service_selected = $HTTP_GET_VARS['service'];
|
||||
$tool_variable_selected = $_GET['variable'];
|
||||
$tool_service_selected = $_GET['service'];
|
||||
|
||||
$tpl->assign('tool_graph_variable_selected', $tool_variable_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');
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@
|
|||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue