merge
This commit is contained in:
commit
c2cad75ef7
66 changed files with 932 additions and 148 deletions
|
@ -169,7 +169,7 @@ void setCrashAlreadyReported(bool state);
|
|||
*\endcode
|
||||
*/
|
||||
#ifdef NL_NO_DEBUG
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# define nldebug __noop
|
||||
# else
|
||||
# define nldebug 0&&
|
||||
|
@ -184,7 +184,7 @@ void setCrashAlreadyReported(bool state);
|
|||
* Same as nldebug but it will be display in debug and in release mode.
|
||||
*/
|
||||
#ifdef NL_NO_DEBUG
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# define nlinfo __noop
|
||||
# else
|
||||
# define nlinfo 0&&
|
||||
|
@ -212,7 +212,7 @@ void setCrashAlreadyReported(bool state);
|
|||
*/
|
||||
|
||||
#ifdef NL_NO_DEBUG
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# define nlwarning __noop
|
||||
# else
|
||||
# define nlwarning 0&&
|
||||
|
@ -583,7 +583,11 @@ template<class T, class U> inline T type_cast(U o)
|
|||
|
||||
/** Compile time assertion
|
||||
*/
|
||||
#define nlctassert(cond) sizeof(uint[(cond) ? 1 : 0])
|
||||
#ifdef NL_ISO_CPP0X_AVAILABLE
|
||||
# define nlctassert(cond) static_assert(cond, "Compile time assert in "#cond)
|
||||
#else
|
||||
# define nlctassert(cond) sizeof(uint[(cond) ? 1 : 0])
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Allow to verify an object was accessed before its destructor call.
|
||||
|
|
|
@ -105,4 +105,7 @@ CHashKey getSHA1(const std::string &filename, bool forcePath = false);
|
|||
// This function get a buffer with size and returns his SHA hash key
|
||||
CHashKey getSHA1(const uint8 *buffer, uint32 size);
|
||||
|
||||
// This function get a buffer and key with size and returns his HMAC-SHA1 hash key
|
||||
CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint32 key_len);
|
||||
|
||||
#endif // NL_SHA1_H
|
||||
|
|
|
@ -352,7 +352,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
|
||||
// This operator only purpose is to compare with NULL value
|
||||
template <class T>
|
||||
|
|
|
@ -51,14 +51,10 @@
|
|||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0500 // Minimal OS = Windows 2000 (NeL is not supported on Windows 95/98)
|
||||
# endif
|
||||
# if _MSC_VER >= 1500
|
||||
# if _MSC_VER >= 1600
|
||||
# define NL_COMP_VC10
|
||||
# elif _MSC_VER >= 1500
|
||||
# define NL_COMP_VC9
|
||||
# ifndef _STLPORT_VERSION // STLport doesn't depend on MS STL features
|
||||
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack
|
||||
# define NL_ISO_STDTR1_AVAILABLE
|
||||
# define NL_ISO_STDTR1_HEADER(header) <header>
|
||||
# endif
|
||||
# endif
|
||||
# elif _MSC_VER >= 1400
|
||||
# define NL_COMP_VC8
|
||||
# undef nl_time
|
||||
|
@ -79,6 +75,10 @@
|
|||
# define NL_COMP_VC6
|
||||
# define NL_COMP_NEED_PARAM_ON_METHOD
|
||||
# endif
|
||||
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack or later
|
||||
# define NL_ISO_STDTR1_AVAILABLE
|
||||
# define NL_ISO_STDTR1_HEADER(header) <header>
|
||||
# endif
|
||||
# ifdef _DEBUG
|
||||
# define NL_DEBUG
|
||||
# elif defined (NDEBUG)
|
||||
|
@ -117,6 +117,10 @@
|
|||
# define NL_COMP_GCC
|
||||
#endif
|
||||
|
||||
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define NL_ISO_CPP0X_AVAILABLE
|
||||
#endif
|
||||
|
||||
// gcc 3.4 introduced ISO C++ with tough template rules
|
||||
//
|
||||
// NL_ISO_SYNTAX can be used using #if NL_ISO_SYNTAX or #if !NL_ISO_SYNTAX
|
||||
|
@ -149,7 +153,7 @@
|
|||
# pragma warning (disable : 4390) // don't warn in empty block "if(exp) ;"
|
||||
# pragma warning (disable : 4996) // 'vsnprintf': This function or variable may be unsafe. Consider using vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
// Debug : Sept 01 2006
|
||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# pragma warning (disable : 4005) // don't warn on redefinitions caused by xp platform sdk
|
||||
# endif // NL_COMP_VC8 || NL_COMP_VC9
|
||||
#endif // NL_OS_WINDOWS
|
||||
|
@ -362,7 +366,7 @@ typedef uint16 ucchar;
|
|||
|
||||
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# define INT64_CONSTANT(c) (c##LL)
|
||||
# define SINT64_CONSTANT(c) (c##LL)
|
||||
# define UINT64_CONSTANT(c) (c##LL)
|
||||
|
|
|
@ -42,7 +42,6 @@ using namespace std;
|
|||
using namespace NL3D;
|
||||
using namespace NLMISC;
|
||||
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
int WINAPI WinMain( HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
|
@ -139,7 +138,7 @@ int main(int argc, char **argv)
|
|||
tc.setScaleX (scale);
|
||||
tc.setScaleZ (scale);
|
||||
tc.printAt (0.1f, 0.3f, string("printAt Scale String"));
|
||||
|
||||
|
||||
// display the same string with no scale
|
||||
tc.setHotSpot (CComputedString::TopLeft);
|
||||
tc.setScaleX (1.0f);
|
||||
|
|
|
@ -109,7 +109,7 @@ CRGBA CFastHLSModifier::convert(uint H, uint L, uint S)
|
|||
return col;
|
||||
}
|
||||
|
||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable : 4799 )
|
||||
#endif
|
||||
|
@ -262,7 +262,7 @@ uint16 CFastHLSModifier::applyHLSMod(uint16 colorIn, uint8 dHue, uint dLum, uin
|
|||
#pragma managed(pop)
|
||||
#endif
|
||||
|
||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
#if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# pragma warning( pop )
|
||||
#endif
|
||||
|
||||
|
|
|
@ -233,6 +233,7 @@ const CType* CFormElm::getType ()
|
|||
warning (false, "getType", "This node is not an atom.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
bool CFormElm::getValue (string &/* result */, TEval /* evaluate */) const
|
||||
|
|
|
@ -187,6 +187,77 @@ CHashKey getSHA1(const string &filename, bool forcePath)
|
|||
return hk;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* HMAC = hash( (Key ^ 0x5c) .. hash( (Key ^0x36) .. Message ) )
|
||||
*
|
||||
*/
|
||||
|
||||
CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint32 key_len)
|
||||
{
|
||||
SHA1Context sha;
|
||||
|
||||
uint8_t SHA1_Key[64];
|
||||
uint8_t SHA1_Key1[20];
|
||||
uint8_t SHA1_Key2[20];
|
||||
|
||||
string buffer1;
|
||||
string buffer2;
|
||||
|
||||
// Init some vars
|
||||
for (uint i = 0; i < 64; i++)
|
||||
SHA1_Key[i] = 0;
|
||||
|
||||
// If lenght of key > 64 use sha1 hash
|
||||
if (key_len > 64) {
|
||||
uint8_t SHA1_Key0[20];
|
||||
SHA1Reset(&sha);
|
||||
SHA1Input(&sha, (const uint8_t*)key, key_len);
|
||||
SHA1Result(&sha, SHA1_Key0);
|
||||
CHashKey hk0 (SHA1_Key0);
|
||||
for (uint i = 0; i < 20; i++)
|
||||
SHA1_Key[i] = hk0.HashKeyString[i];
|
||||
} else {
|
||||
for (uint i = 0; i < key_len; i++)
|
||||
SHA1_Key[i] = key[i];
|
||||
}
|
||||
|
||||
// Do 0x36 XOR Key
|
||||
for (uint i = 0; i < 64; i++)
|
||||
buffer1 += 0x36 ^ SHA1_Key[i];
|
||||
|
||||
// Append text
|
||||
for (uint i = 0; i < text_len; i++)
|
||||
buffer1 += text[i];
|
||||
|
||||
// Get hash
|
||||
SHA1Reset(&sha);
|
||||
SHA1Input(&sha, (const uint8_t*)buffer1.c_str(), (uint)buffer1.size());
|
||||
SHA1Result(&sha, SHA1_Key1);
|
||||
CHashKey hk1 (SHA1_Key1);
|
||||
|
||||
// Do 0x5c XOR Key
|
||||
for (uint i = 0; i < 64; i++)
|
||||
buffer2 += 0x5c ^ SHA1_Key[i];
|
||||
|
||||
// Append previous hash
|
||||
for (uint i = 0; i < 20; i++)
|
||||
buffer2 += hk1.HashKeyString[i];
|
||||
|
||||
// Get new hash
|
||||
SHA1Reset(&sha);
|
||||
SHA1Input(&sha, (const uint8_t*)buffer2.c_str(), (uint)buffer2.size());
|
||||
SHA1Result(&sha, SHA1_Key2);
|
||||
CHashKey hk (SHA1_Key2);
|
||||
|
||||
return hk;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _MFC_VER
|
||||
#pragma runtime_checks( "", off )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define the SHA1 circular left shift macro
|
||||
*/
|
||||
|
|
|
@ -36,8 +36,8 @@ namespace NLMISC {
|
|||
// Storage for file handles, necessary to close the handles
|
||||
map<void*,HANDLE> AccessAddressesToHandles;
|
||||
#else
|
||||
// Storage for shmid, necessary to destroy the segments
|
||||
map<TSharedMemId, int> SharedMemIdsToShmids;
|
||||
// Storage for shmid, necessary to destroy the segments
|
||||
map<TSharedMemId, sint> SharedMemIdsToShmids;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ void *CSharedMemory::createSharedMemory( TSharedMemId sharedMemId, uint32 size
|
|||
#else
|
||||
|
||||
// Create a shared memory segment
|
||||
int shmid = shmget( sharedMemId, size, IPC_CREAT | IPC_EXCL | 0666 );
|
||||
sint shmid = shmget( sharedMemId, size, IPC_CREAT | IPC_EXCL | 0666 );
|
||||
if ( shmid == -1 )
|
||||
return NULL;
|
||||
SharedMemIdsToShmids.insert( make_pair( sharedMemId, shmid ) );
|
||||
|
@ -82,6 +82,7 @@ void *CSharedMemory::createSharedMemory( TSharedMemId sharedMemId, uint32 size
|
|||
return NULL;
|
||||
else
|
||||
return accessAddress;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -22,10 +22,8 @@
|
|||
#include "nel/misc/hierarchical_timer.h"
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <winsock2.h>
|
||||
# endif
|
||||
# define NOMINMAX
|
||||
# include <winsock2.h>
|
||||
# include <windows.h>
|
||||
# define socklen_t int
|
||||
# define ERROR_NUM WSAGetLastError()
|
||||
|
|
|
@ -20,9 +20,7 @@
|
|||
#include "nel/net/net_log.h"
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
# if defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <winsock2.h>
|
||||
# endif
|
||||
# include <winsock2.h>
|
||||
# define NOMINMAX
|
||||
# include <windows.h>
|
||||
# define socklen_t int
|
||||
|
|
|
@ -81,6 +81,7 @@ QWidget *VegetableSettingsPage::createPage(QWidget *parent)
|
|||
connect(m_ui.coarseToolButton, SIGNAL(clicked()), this, SLOT(setCoarseMeshTexture()));
|
||||
connect(m_ui.addZoneToolButton, SIGNAL(clicked()), this, SLOT(addZone()));
|
||||
connect(m_ui.removeZoneToolButton, SIGNAL(clicked()), this, SLOT(removeZone()));
|
||||
connect(m_ui.clearButton, SIGNAL(clicked()), m_ui.zonesListWidget, SLOT(clear()));
|
||||
|
||||
return m_page;
|
||||
}
|
||||
|
|
|
@ -181,6 +181,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="clearButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="object_viewer.qrc">
|
||||
<normaloff>:/icons/ic_nel_reset_all.png</normaloff>:/icons/ic_nel_reset_all.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
|
|
|
@ -23,7 +23,7 @@ using namespace NLMISC;
|
|||
#ifdef NL_DEBUG
|
||||
#define INFO nlinfo
|
||||
#else // NL_DEBUG
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# if defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) || defined(NL_COMP_VC10)
|
||||
# define INFO __noop
|
||||
# else
|
||||
# define INFO 0&&
|
||||
|
|
|
@ -71,6 +71,8 @@ public:
|
|||
const NLMISC::CMatrix *StaticMatrix; // Useful if stick mode is "StaticMatrix"
|
||||
uint MaxNumAnimCount; // Number of frame on which the fx can overlap when it is being shutdown
|
||||
float TimeOut;
|
||||
double StartTime;
|
||||
float DelayBeforeStart;
|
||||
public:
|
||||
CBuildInfo()
|
||||
{
|
||||
|
@ -80,6 +82,8 @@ public:
|
|||
StaticMatrix = NULL;
|
||||
MaxNumAnimCount = 0;
|
||||
TimeOut = FX_MANAGER_DEFAULT_TIMEOUT;
|
||||
StartTime = 0.0;
|
||||
DelayBeforeStart = 0.f;
|
||||
}
|
||||
};
|
||||
CAttachedFX();
|
||||
|
|
|
@ -5874,6 +5874,27 @@ void CCharacterCL::updateAttachedFX()
|
|||
CMatrix alignMatrix;
|
||||
buildAlignMatrix(alignMatrix);
|
||||
|
||||
std::list<CAttachedFX::CBuildInfo>::iterator itAttachedFxToStart = _AttachedFXListToStart.begin();
|
||||
while(itAttachedFxToStart != _AttachedFXListToStart.end())
|
||||
{
|
||||
if ((*itAttachedFxToStart).DelayBeforeStart < (float)(TimeInSec - (*itAttachedFxToStart).StartTime))
|
||||
{
|
||||
uint index = (*itAttachedFxToStart).MaxNumAnimCount;
|
||||
(*itAttachedFxToStart).MaxNumAnimCount = 0;
|
||||
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
||||
fx->create(*this, (*itAttachedFxToStart), CAttachedFX::CTargeterInfo());
|
||||
if (!fx->FX.empty())
|
||||
{
|
||||
_AuraFX[index] = fx;
|
||||
}
|
||||
itAttachedFxToStart = _AttachedFXListToStart.erase(itAttachedFxToStart);
|
||||
}
|
||||
else
|
||||
{
|
||||
++itAttachedFxToStart;
|
||||
}
|
||||
}
|
||||
|
||||
// update tracks & pos for anim attachedfxs
|
||||
std::list<CAttachedFX::TSmartPtr>::iterator itAttachedFx = _AttachedFXListForCurrentAnim.begin();
|
||||
while(itAttachedFx != _AttachedFXListForCurrentAnim.end())
|
||||
|
@ -8993,16 +9014,40 @@ void CCharacterCL::setAuraFX(uint index, const CAnimationFX *sheet)
|
|||
}
|
||||
else
|
||||
{
|
||||
std::list<CAttachedFX::CBuildInfo>::iterator itAttachedFxToStart = _AttachedFXListToStart.begin();
|
||||
while(itAttachedFxToStart != _AttachedFXListToStart.end())
|
||||
{
|
||||
if ((*itAttachedFxToStart).MaxNumAnimCount == index)
|
||||
return;
|
||||
}
|
||||
// remove previous aura
|
||||
_AuraFX[index] = NULL;
|
||||
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
||||
CAttachedFX::CBuildInfo bi;
|
||||
bi.Sheet = sheet;
|
||||
bi.TimeOut = 0.f;
|
||||
fx->create(*this, bi, CAttachedFX::CTargeterInfo());
|
||||
if (!fx->FX.empty())
|
||||
|
||||
if (sheet->Sheet->PSName == "misc_caravan_teleportout.ps")
|
||||
{
|
||||
_AuraFX[index] = fx;
|
||||
bi.MaxNumAnimCount = index;
|
||||
bi.StartTime = TimeInSec;
|
||||
bi.DelayBeforeStart = 12.5f;
|
||||
_AttachedFXListToStart.push_front(bi);
|
||||
}
|
||||
else if (sheet->Sheet->PSName == "misc_kami_teleportout.ps")
|
||||
{
|
||||
bi.MaxNumAnimCount = index;
|
||||
bi.StartTime = TimeInSec;
|
||||
bi.DelayBeforeStart = 11.5f;
|
||||
_AttachedFXListToStart.push_front(bi);
|
||||
}
|
||||
else
|
||||
{
|
||||
CAttachedFX::TSmartPtr fx = new CAttachedFX;
|
||||
fx->create(*this, bi, CAttachedFX::CTargeterInfo());
|
||||
if (!fx->FX.empty())
|
||||
{
|
||||
_AuraFX[index] = fx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -675,6 +675,7 @@ protected:
|
|||
/// List of attached to remove as soon as possible (when there are no particles left)
|
||||
std::list<CAttachedFX::TSmartPtr> _AttachedFXListToRemove;
|
||||
|
||||
std::list<CAttachedFX::CBuildInfo> _AttachedFXListToStart;
|
||||
|
||||
CAttachedFX::TSmartPtr _AuraFX[MaxNumAura]; // special case for aura
|
||||
CAttachedFX::TSmartPtr _LinkFX; // special case for link
|
||||
|
|
|
@ -1942,7 +1942,7 @@ void CClientConfig::init(const string &configFileName)
|
|||
|
||||
// save the updated config file
|
||||
NLMISC::COFile configFile(configFileName, false, true, false);
|
||||
configFile.serialBuffer((uint8*)contentUtf8.c_str(), contentUtf8.size());
|
||||
configFile.serialBuffer((uint8*)contentUtf8.c_str(), (uint)contentUtf8.size());
|
||||
configFile.close();
|
||||
|
||||
// now we can continue loading and parsing the config file
|
||||
|
|
|
@ -1199,6 +1199,11 @@ class CHandlerTell : public IActionHandler
|
|||
// display msg with good color
|
||||
// TDataSetIndex dsi; // not used ....
|
||||
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*dsi, */finalMsg, receiver, prop.getRGBA());
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", receiver);
|
||||
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||
CInterfaceManager::getInstance()->log(finalMsg);
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER( CHandlerTell, "tell");
|
||||
|
|
|
@ -1271,6 +1271,30 @@ NLMISC_COMMAND(7,"talk in 7th dynamic chat channel","<channel_nb> <sentence>")
|
|||
{
|
||||
return talkInChan(7,args);
|
||||
}
|
||||
|
||||
|
||||
NLMISC_COMMAND(setItemName, "set name of items, sbrick, etc..","<sheet_id> <name> <desc> <desc2>")
|
||||
{
|
||||
if (args.size() < 2) return false;
|
||||
CSheetId id(args[0]);
|
||||
ucstring name;
|
||||
name.fromUtf8(args[1]);
|
||||
ucstring desc;
|
||||
ucstring desc2;
|
||||
if (args.size() > 2)
|
||||
desc.fromUtf8(args[2]);
|
||||
if (args.size() > 2)
|
||||
desc2.fromUtf8(args[3]);
|
||||
|
||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||
if (pSMC)
|
||||
pSMC->replaceSBrickName(id, name, desc, desc2);
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -550,7 +550,9 @@ void checkUnderCursor()
|
|||
if (!instref.ContextText.empty())
|
||||
{
|
||||
selectedInstanceURL = instref.ContextURL;
|
||||
if(ContextCur.context("WEBIG", 0.f, ucstring(instref.ContextText)))
|
||||
ucstring contextText;
|
||||
contextText.fromUtf8(instref.ContextText);
|
||||
if(ContextCur.context("WEBIG", 0.f, contextText))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1326,7 +1326,7 @@ void postlogInit()
|
|||
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
||||
|
||||
CSBrickManager::getInstance()->init(); // Must be done after sheet loading
|
||||
STRING_MANAGER::CStringManagerClient::specialWordsMemoryCompress(); // Must be done after brick manager init
|
||||
//STRING_MANAGER::CStringManagerClient::specialWordsMemoryCompress(); // Must be done after brick manager init
|
||||
|
||||
initLast = initCurrent;
|
||||
initCurrent = ryzomGetLocalTime();
|
||||
|
|
|
@ -1761,7 +1761,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
|||
if (pCS->getInventoryIndex()==INVENTORIES::bag)
|
||||
{
|
||||
bool isTextEditionActive = false;
|
||||
static const string itemTextEditionPriv = ":DEV:SGM:EM:";
|
||||
static const string itemTextEditionPriv = ":DEV:SGM:GM:EM:";
|
||||
if (!UserPrivileges.empty() && itemTextEditionPriv.find(UserPrivileges)!=std::string::npos)
|
||||
{
|
||||
isTextEditionActive = true;
|
||||
|
|
|
@ -60,6 +60,7 @@ void launchPhraseComposition(bool creation);
|
|||
const std::string PhraseComposition="ui:interface:phrase_composition";
|
||||
const std::string PhraseCompositionGroup="ui:interface:phrase_composition:header_opened";
|
||||
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
||||
const std::string PhraseMemoryAltCtrlBase= "ui:interface:gestionsets2:header_closed:shortcuts:s";
|
||||
|
||||
|
||||
// **********************************************************************************************************
|
||||
|
@ -129,7 +130,11 @@ public:
|
|||
if(pCSDst && pCSDst->isSPhraseId() && pCSDst->isSPhraseIdMemory())
|
||||
{
|
||||
// then will auto-memorize it in this slot
|
||||
pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryLineDB();
|
||||
if (pCSDst->isShortCut())
|
||||
pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryLineDB();
|
||||
else
|
||||
pPM->CompositionPhraseMemoryLineDest= 0;
|
||||
|
||||
pPM->CompositionPhraseMemorySlotDest= pCSDst->getIndexInDB();
|
||||
}
|
||||
// else no auto memorize
|
||||
|
@ -1110,7 +1115,11 @@ public:
|
|||
return;
|
||||
|
||||
// Ok, the user try to cast a phrase slot.
|
||||
sint32 memoryLine= pPM->getSelectedMemoryLineDB();
|
||||
sint32 memoryLine;
|
||||
if (pCSDst->isShortCut())
|
||||
memoryLine = pPM->getSelectedMemoryLineDB();
|
||||
else
|
||||
memoryLine = 0;
|
||||
if(memoryLine<0)
|
||||
return;
|
||||
|
||||
|
@ -1249,12 +1258,16 @@ public:
|
|||
{
|
||||
sint shortcut;
|
||||
fromString(Params, shortcut);
|
||||
if (shortcut>=0 && shortcut <= RYZOM_MAX_SHORTCUT)
|
||||
if (shortcut>=0 && shortcut <= 2*RYZOM_MAX_SHORTCUT)
|
||||
{
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
|
||||
// get the control
|
||||
CInterfaceElement *elm= pIM->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
||||
CInterfaceElement *elm;
|
||||
if (shortcut < RYZOM_MAX_SHORTCUT)
|
||||
elm = pIM->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
||||
else
|
||||
elm = pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(shortcut-RYZOM_MAX_SHORTCUT) );
|
||||
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(elm);
|
||||
if(ctrl)
|
||||
{
|
||||
|
@ -1491,7 +1504,11 @@ public:
|
|||
return;
|
||||
|
||||
// Ok, the user try to cast a phrase slot.
|
||||
sint32 memoryLine= pPM->getSelectedMemoryLineDB();
|
||||
sint32 memoryLine;
|
||||
if (pCSDst->isShortCut())
|
||||
memoryLine = pPM->getSelectedMemoryLineDB();
|
||||
else
|
||||
memoryLine = 0;
|
||||
if(memoryLine<0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ void CChatTargetFilter::msgEntered(const ucstring &msg, CChatWindow *chatWindow)
|
|||
// the target must be a player, make a tell on him
|
||||
ChatMngr.tell(_TargetPlayer.toString(), msg);
|
||||
// direct output in the chat
|
||||
chatWindow->displayLocalPlayerTell(msg);
|
||||
chatWindow->displayLocalPlayerTell(_TargetPlayer.toString(), msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -199,7 +199,7 @@ bool CChatWindow::isVisible() const
|
|||
}
|
||||
|
||||
//=================================================================================
|
||||
void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGroup::TGroupType /* gt */, uint32 /* dynamicChatDbIndex */, uint numBlinks /* = 0*/, bool *windowVisible /*= NULL*/)
|
||||
void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGroup::TGroupType gt, uint32 dynamicChatDbIndex, uint numBlinks /* = 0*/, bool *windowVisible /*= NULL*/)
|
||||
{
|
||||
if (!_Chat)
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ void CChatWindow::setHeaderColor(const std::string &n)
|
|||
}
|
||||
|
||||
//=================================================================================
|
||||
void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*= 0*/)
|
||||
void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstring &msg, uint numBlinks /*= 0*/)
|
||||
{
|
||||
ucstring finalMsg;
|
||||
CInterfaceProperty prop;
|
||||
|
@ -484,7 +484,12 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*=
|
|||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||
finalMsg += msg;
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", receiver);
|
||||
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||
displayMessage(finalMsg, prop.getRGBA(), CChatGroup::tell, 0, numBlinks);
|
||||
CInterfaceManager::getInstance()->log(finalMsg);
|
||||
}
|
||||
|
||||
void CChatWindow::encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append)
|
||||
|
@ -797,14 +802,6 @@ CGroupContainer *CChatGroupWindow::createFreeTeller(const ucstring &winNameIn, c
|
|||
}
|
||||
}
|
||||
|
||||
// Create the free teller in all the desktops
|
||||
uint8 nMode = pIM->getMode();
|
||||
pGC->setActive(false);
|
||||
for (uint8 m = 0; m < MAX_NUM_MODES; ++m)
|
||||
{
|
||||
if (m != nMode)
|
||||
pIM->updateGroupContainerImage(*pGC, m);
|
||||
}
|
||||
// the group is only active on the current desktop
|
||||
pGC->setActive(true);
|
||||
}
|
||||
|
@ -812,7 +809,7 @@ CGroupContainer *CChatGroupWindow::createFreeTeller(const ucstring &winNameIn, c
|
|||
if (!winColor.empty())
|
||||
_FreeTellers[i]->setHeaderColor(winColor);
|
||||
|
||||
updateFreeTellerHeader(*_FreeTellers[i]);
|
||||
// updateFreeTellerHeader(*_FreeTellers[i]);
|
||||
return _FreeTellers[i];
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
void setAHOnCloseButtonParams(const std::string &n);
|
||||
void setHeaderColor(const std::string &n);
|
||||
//
|
||||
void displayLocalPlayerTell(const ucstring &msg, uint numBlinks = 0);
|
||||
void displayLocalPlayerTell(const ucstring &receiver, const ucstring &msg, uint numBlinks = 0);
|
||||
|
||||
/// Encode a color tag '@{RGBA}' in the text. If append is true, append at end of text, otherwise, replace the text
|
||||
static void encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append=true);
|
||||
|
|
|
@ -114,7 +114,7 @@ public:
|
|||
/// \name Handlers
|
||||
// @{
|
||||
// Event part
|
||||
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
||||
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClickString = actionHandlerName; _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
||||
void setActionOnRightClick (const std::string &actionHandlerName) { _AHOnRightClick = getAH(actionHandlerName, _AHRightClickParams); }
|
||||
void setActionOnClockTick (const std::string &ahName) { _AHOnClockTick = getAH(ahName, _AHClockTickParams); }
|
||||
void setParamsOnLeftClick (const std::string ¶msHandlerName) { _AHLeftClickParams = paramsHandlerName; }
|
||||
|
@ -203,6 +203,7 @@ protected:
|
|||
//@{
|
||||
IActionHandler *_AHOnOver;
|
||||
CStringShared _AHOverParams;
|
||||
std::string _AHOnLeftClickString;
|
||||
IActionHandler *_AHOnLeftClick;
|
||||
CStringShared _AHLeftClickParams;
|
||||
IActionHandler *_AHOnLeftDblClick;
|
||||
|
|
|
@ -333,4 +333,16 @@ void CCtrlButton::fitTexture()
|
|||
setH(h);
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
bool CCtrlButton::getMouseOverShape(string &texName, uint8 &rot, CRGBA &col)
|
||||
{
|
||||
if (_AHOnLeftClickString == "browse")
|
||||
{
|
||||
texName = "curs_pick.tga";
|
||||
rot= 0;
|
||||
col = CRGBA::White;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
|
||||
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||
|
||||
virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */);
|
||||
|
||||
// Display part
|
||||
virtual void draw();
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
_TextureIdOver[2].setTexture((TxName+"_r.tga").c_str());
|
||||
}
|
||||
|
||||
// Compute Bmp Sizes (crash with VC++ 2010)
|
||||
// nlctassert(NumTexture==3);
|
||||
// Compute Bmp Sizes
|
||||
nlctassert(NumTexture==3);
|
||||
rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH);
|
||||
rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH);
|
||||
rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "group_editbox.h"
|
||||
#include "interface_manager.h"
|
||||
#include "input_handler_manager.h"
|
||||
#include "nel/misc/command.h"
|
||||
#include "view_text.h"
|
||||
#include "game_share/xml_auto_ptr.h"
|
||||
#include "interface_options.h"
|
||||
|
@ -56,6 +57,7 @@ CGroupEditBox::CGroupEditBox(const TCtorParam ¶m) :
|
|||
_MaxCharsSize(32768),
|
||||
_FirstVisibleChar(0),
|
||||
_LastVisibleChar(0),
|
||||
_SelectingText(false),
|
||||
_ViewText(NULL),
|
||||
_MaxHistoric(0),
|
||||
_CurrentHistoricIndex(-1),
|
||||
|
@ -354,16 +356,27 @@ void CGroupEditBox::paste()
|
|||
if (Driver->pasteTextFromClipboard(sString))
|
||||
{
|
||||
// append string now
|
||||
appendString(sString);
|
||||
appendStringFromClipboard(sString);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CGroupEditBox::appendString(const ucstring &str)
|
||||
void CGroupEditBox::appendStringFromClipboard(const ucstring &str)
|
||||
{
|
||||
stopParentBlink();
|
||||
makeTopWindow();
|
||||
|
||||
writeString(str, true, false);
|
||||
nlinfo ("Chat input was pasted from the clipboard");
|
||||
|
||||
triggerOnChangeAH();
|
||||
|
||||
_CursorAtPreviousLineEnd = false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CGroupEditBox::writeString(const ucstring &str, bool replace, bool atEnd)
|
||||
{
|
||||
sint length = (sint)str.length();
|
||||
|
||||
ucstring toAppend;
|
||||
|
@ -500,13 +513,41 @@ void CGroupEditBox::appendString(const ucstring &str)
|
|||
length = _MaxNumChar - (sint)_InputString.length();
|
||||
}
|
||||
ucstring toAdd = toAppend.substr(0, length);
|
||||
_InputString = _InputString.substr(0, _CursorPos) + toAdd + _InputString.substr(_CursorPos);
|
||||
_CursorPos += (sint32)toAdd.length();
|
||||
nlinfo ("Chat input was pasted from the clipboard");
|
||||
sint32 minPos;
|
||||
sint32 maxPos;
|
||||
if (_CurrSelection == this)
|
||||
{
|
||||
minPos = min(_CursorPos, _SelectCursorPos);
|
||||
maxPos = max(_CursorPos, _SelectCursorPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
minPos = _CursorPos;
|
||||
maxPos = _CursorPos;
|
||||
}
|
||||
|
||||
triggerOnChangeAH();
|
||||
nlinfo("%d, %d", minPos, maxPos);
|
||||
if (replace)
|
||||
{
|
||||
_InputString = _InputString.substr(0, minPos) + toAdd + _InputString.substr(maxPos);
|
||||
_CursorPos = minPos+(sint32)toAdd.length();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (atEnd)
|
||||
{
|
||||
_InputString = _InputString.substr(0, maxPos) + toAdd + _InputString.substr(maxPos);
|
||||
_CursorPos = maxPos;
|
||||
_SelectCursorPos = _CursorPos;
|
||||
|
||||
_CursorAtPreviousLineEnd = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_InputString = _InputString.substr(0, minPos) + toAdd + _InputString.substr(minPos);
|
||||
_CursorPos = minPos+(sint32)toAdd.length();
|
||||
_SelectCursorPos = maxPos+(sint32)toAdd.length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -672,7 +713,7 @@ void CGroupEditBox::handleEventChar(const CEventDescriptorKey &rEDK)
|
|||
// ----------------------------------------------------------------------------
|
||||
void CGroupEditBox::handleEventString(const CEventDescriptorKey &rEDK)
|
||||
{
|
||||
appendString(rEDK.getString());
|
||||
appendStringFromClipboard(rEDK.getString());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -862,6 +903,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
|
|||
// if click, and not frozen, then get the focus
|
||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && !_Frozen)
|
||||
{
|
||||
_SelectingText = true;
|
||||
stopParentBlink();
|
||||
pIM->setCaptureKeyboard (this);
|
||||
// set the right cursor position
|
||||
|
@ -872,9 +914,34 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
|
|||
_CursorPos = newCurPos;
|
||||
_CursorPos -= (sint32)_Prompt.length();
|
||||
_CursorPos = std::max(_CursorPos, sint32(0));
|
||||
_SelectCursorPos = _CursorPos;
|
||||
_CurrSelection = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
// if click, and not frozen, then get the focus
|
||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove && !_Frozen && _SelectingText)
|
||||
{
|
||||
// set the right cursor position
|
||||
uint newCurPos;
|
||||
bool cursorAtPreviousLineEnd;
|
||||
_CurrSelection = this;
|
||||
_ViewText->getCharacterIndexFromPosition(eventDesc.getX() - _ViewText->getXReal(), eventDesc.getY() - _ViewText->getYReal(), newCurPos, cursorAtPreviousLineEnd);
|
||||
_SelectCursorPos = newCurPos;
|
||||
_SelectCursorPos -= (sint32)_Prompt.length();
|
||||
_SelectCursorPos = std::max(_SelectCursorPos, sint32(0));
|
||||
return true;
|
||||
}
|
||||
|
||||
// if click, and not frozen, then get the focus
|
||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup && !_Frozen)
|
||||
{
|
||||
_SelectingText = false;
|
||||
if (_SelectCursorPos == _CursorPos)
|
||||
_CurrSelection = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown)
|
||||
{
|
||||
|
|
|
@ -125,6 +125,8 @@ public:
|
|||
void copy();
|
||||
// Paste the selection into buffer
|
||||
void paste();
|
||||
// Write the string into buffer
|
||||
void writeString(const ucstring &str, bool replace = true, bool atEnd = true);
|
||||
|
||||
// Expand the expression (true if there was a '/' at the start of the line)
|
||||
bool expand();
|
||||
|
@ -217,6 +219,7 @@ protected:
|
|||
// Text selection
|
||||
static sint32 _SelectCursorPos;
|
||||
static CGroupEditBox *_CurrSelection; // the edit box for which the selection is currently active, or NULL if there's none
|
||||
bool _SelectingText;
|
||||
NLMISC::CRGBA _TextSelectColor;
|
||||
NLMISC::CRGBA _BackSelectColor;
|
||||
|
||||
|
@ -291,7 +294,7 @@ private:
|
|||
void handleEventString(const CEventDescriptorKey &event);
|
||||
void setup();
|
||||
void triggerOnChangeAH();
|
||||
void appendString(const ucstring &str);
|
||||
void appendStringFromClipboard(const ucstring &str);
|
||||
|
||||
ucstring getSelection();
|
||||
|
||||
|
|
|
@ -442,6 +442,9 @@ void CGroupHTML::addText (const char * buf, int len)
|
|||
{
|
||||
if (_Browsing)
|
||||
{
|
||||
if (_IgnoreText)
|
||||
return;
|
||||
|
||||
// Build a UTF8 string
|
||||
string inputString(buf, buf+len);
|
||||
// inputString.resize (len);
|
||||
|
@ -525,6 +528,11 @@ void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTCh
|
|||
// in ah: command we don't respect the uri standard so the HTAnchor_address doesn't work correctly
|
||||
_Link.push_back (suri);
|
||||
}
|
||||
else if (suri[0] == '#')
|
||||
{
|
||||
// Direct url (hack for lua beginElement)
|
||||
_Link.push_back (suri.substr(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
HTAnchor * dest = HTAnchor_followMainLink((HTAnchor *) anchor);
|
||||
|
@ -839,6 +847,14 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|||
}
|
||||
}
|
||||
break;
|
||||
case HTML_DIV:
|
||||
{
|
||||
if (present[MY_HTML_DIV_NAME] && value[MY_HTML_DIV_NAME])
|
||||
{
|
||||
_DivName = value[MY_HTML_DIV_NAME];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_FONT:
|
||||
{
|
||||
bool found = false;
|
||||
|
@ -856,7 +872,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|||
_TextColor.push_back(_TextColor.empty() ? CRGBA::White : _TextColor.back());
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case HTML_BR:
|
||||
addString(ucstring ("\n"));
|
||||
break;
|
||||
|
@ -1372,6 +1388,9 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
|||
_ObjectAction = value[HTML_OBJECT_STANDBY];
|
||||
_Object = true;
|
||||
|
||||
break;
|
||||
case HTML_STYLE:
|
||||
_IgnoreText = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1409,6 +1428,10 @@ void CGroupHTML::endElement (uint element_number)
|
|||
case HTML_PRE:
|
||||
popIfNotEmpty (_PRE);
|
||||
break;
|
||||
case HTML_DIV:
|
||||
_DivName = "";
|
||||
break;
|
||||
|
||||
case HTML_TABLE:
|
||||
popIfNotEmpty (_CellParams);
|
||||
popIfNotEmpty (_TR);
|
||||
|
@ -1493,6 +1516,9 @@ void CGroupHTML::endElement (uint element_number)
|
|||
popIfNotEmpty (_UL);
|
||||
}
|
||||
break;
|
||||
case HTML_STYLE:
|
||||
_IgnoreText = false;
|
||||
break;
|
||||
case HTML_OBJECT:
|
||||
if (_ObjectType=="application/ryzom-data")
|
||||
{
|
||||
|
@ -1560,6 +1586,7 @@ CGroupHTML::CGroupHTML(const TCtorParam ¶m)
|
|||
|
||||
// init
|
||||
_ParsingLua = false;
|
||||
_IgnoreText = false;
|
||||
_BrowseNextTime = false;
|
||||
_PostNextTime = false;
|
||||
_Browsing = false;
|
||||
|
@ -2506,6 +2533,7 @@ void CGroupHTML::clearContext()
|
|||
_Cells.clear();
|
||||
_TR.clear();
|
||||
_Forms.clear();
|
||||
_Groups.clear();
|
||||
_CellParams.clear();
|
||||
_Title = false;
|
||||
_TextArea = false;
|
||||
|
@ -2584,6 +2612,12 @@ void CGroupHTML::addGroup (CInterfaceGroup *group, uint beginSpace)
|
|||
_Paragraph = NULL;
|
||||
}
|
||||
|
||||
if (!_DivName.empty())
|
||||
{
|
||||
group->setName(_DivName);
|
||||
_Groups.push_back(group);
|
||||
}
|
||||
|
||||
group->setSizeRef(CInterfaceElement::width);
|
||||
|
||||
// Compute begin space between paragraph and tables
|
||||
|
@ -3337,6 +3371,171 @@ int CGroupHTML::luaRefresh(CLuaState &ls)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaRemoveContent(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "refresh";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 0);
|
||||
removeContent();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaInsertText(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "insertText";
|
||||
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_TBOOLEAN);
|
||||
|
||||
string name = ls.toString(1);
|
||||
|
||||
ucstring text;
|
||||
text.fromUtf8(ls.toString(2));
|
||||
|
||||
if (!_Forms.empty()) {
|
||||
for (uint i=0; i<_Forms.back().Entries.size(); i++)
|
||||
{
|
||||
if (_Forms.back().Entries[i].TextArea && _Forms.back().Entries[i].Name == name)
|
||||
{
|
||||
// Get the edit box view
|
||||
CInterfaceGroup *group = _Forms.back().Entries[i].TextArea->getGroup ("eb");
|
||||
if (group)
|
||||
{
|
||||
// Should be a CGroupEditBox
|
||||
CGroupEditBox *editBox = dynamic_cast<CGroupEditBox*>(group);
|
||||
if (editBox)
|
||||
editBox->writeString(text, false, ls.toBoolean(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaAddString(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "addString";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||
addString(ucstring(ls.toString(1)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaAddImage(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "addImage";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN);
|
||||
if (!_Paragraph)
|
||||
{
|
||||
newParagraph(0);
|
||||
paragraphChange();
|
||||
}
|
||||
string url = getLink();
|
||||
if (!url.empty()) {
|
||||
string params = "name=" + getId() + "|url=" + getLink ();
|
||||
addButton(CCtrlButton::PushButton, ls.toString(1), ls.toString(1), ls.toString(1),
|
||||
"", ls.toBoolean(2), "browse", params.c_str(), "");
|
||||
} else {
|
||||
addImage(ls.toString(1), ls.toBoolean(2));
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaBeginElement(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "beginElement";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TTABLE);
|
||||
|
||||
uint element_number = (uint)ls.toNumber(1);
|
||||
std::vector<BOOL> present;
|
||||
std::vector<const char *> value;
|
||||
present.resize(30, false);
|
||||
value.resize(30);
|
||||
|
||||
CLuaObject params;
|
||||
params.pop(ls);
|
||||
uint max_idx = 0;
|
||||
|
||||
|
||||
ENUM_LUA_TABLE(params, it)
|
||||
{
|
||||
if (!it.nextKey().isNumber())
|
||||
{
|
||||
nlwarning("%s : bad key encountered with type %s, number 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;
|
||||
}
|
||||
uint idx = (uint)it.nextKey().toNumber();
|
||||
|
||||
present.insert(present.begin() + (uint)it.nextKey().toNumber(), true);
|
||||
|
||||
string str = it.nextValue().toString();
|
||||
size_t size = str.size() + 1;
|
||||
char * buffer = new char[ size ];
|
||||
strncpy(buffer, str.c_str(), size );
|
||||
|
||||
value.insert(value.begin() + (uint)it.nextKey().toNumber(), buffer);
|
||||
}
|
||||
|
||||
beginElement(element_number, &present[0], &value[0]);
|
||||
if (element_number == HTML_A)
|
||||
addLink(element_number, 0, NULL, &present[0], &value[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaEndElement(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "endElement";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 1);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
||||
|
||||
uint element_number = (uint)ls.toNumber(1);
|
||||
endElement(element_number);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
int CGroupHTML::luaShowDiv(CLuaState &ls)
|
||||
{
|
||||
const char *funcName = "showDiv";
|
||||
CLuaIHM::checkArgCount(ls, funcName, 2);
|
||||
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
|
||||
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN);
|
||||
|
||||
if (!_Groups.empty()) {
|
||||
for (uint i=0; i<_Groups.size(); i++)
|
||||
{
|
||||
CInterfaceGroup *group = _Groups[i];
|
||||
if (group->getName() == ls.toString(1))
|
||||
{
|
||||
group->setActive(ls.toBoolean(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CGroupHTML::setURL(const std::string &url)
|
||||
{
|
||||
|
|
|
@ -165,10 +165,24 @@ public:
|
|||
|
||||
int luaBrowse(CLuaState &ls);
|
||||
int luaRefresh(CLuaState &ls);
|
||||
int luaRemoveContent(CLuaState &ls);
|
||||
int luaInsertText(CLuaState &ls);
|
||||
int luaAddString(CLuaState &ls);
|
||||
int luaAddImage(CLuaState &ls);
|
||||
int luaBeginElement(CLuaState &ls);
|
||||
int luaEndElement(CLuaState &ls);
|
||||
int luaShowDiv(CLuaState &ls);
|
||||
|
||||
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
||||
REFLECT_LUA_METHOD("browse", luaBrowse)
|
||||
REFLECT_LUA_METHOD("refresh", luaRefresh)
|
||||
REFLECT_LUA_METHOD("removeContent", luaRemoveContent)
|
||||
REFLECT_LUA_METHOD("insertText", luaInsertText)
|
||||
REFLECT_LUA_METHOD("addString", luaAddString)
|
||||
REFLECT_LUA_METHOD("addImage", luaAddImage)
|
||||
REFLECT_LUA_METHOD("beginElement", luaBeginElement)
|
||||
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
||||
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
||||
REFLECT_STRING("url", getURL, setURL)
|
||||
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
||||
REFLECT_EXPORT_END
|
||||
|
@ -290,6 +304,7 @@ protected :
|
|||
// element has been found
|
||||
// True when the <lua> element has been encountered
|
||||
bool _ParsingLua;
|
||||
bool _IgnoreText;
|
||||
// the script to execute
|
||||
std::string _LuaScript;
|
||||
|
||||
|
@ -303,6 +318,7 @@ protected :
|
|||
class CLibWWWData *_LibWWW;
|
||||
|
||||
// Current paragraph
|
||||
std::string _DivName;
|
||||
CGroupParagraph* _Paragraph;
|
||||
inline CGroupParagraph *getParagraph()
|
||||
{
|
||||
|
@ -442,6 +458,7 @@ protected :
|
|||
std::vector<CEntry> Entries;
|
||||
};
|
||||
std::vector<CForm> _Forms;
|
||||
std::vector<CInterfaceGroup *> _Groups;
|
||||
|
||||
// Cells parameters
|
||||
class CCellParams
|
||||
|
|
|
@ -278,8 +278,11 @@ void CGroupQuickHelp::browse (const char *url)
|
|||
_IsQuickHelp = false;
|
||||
|
||||
string completeURL = url;
|
||||
completeURL = completeURL.substr(0, completeURL.size()-5); // Substract the ".html"
|
||||
completeURL += "_" + ClientCfg.getHtmlLanguageCode() + ".html";
|
||||
if (completeURL.substr(completeURL.size()-5, 5) == ".html")
|
||||
{
|
||||
completeURL = completeURL.substr(0, completeURL.size()-5); // Substract the ".html"
|
||||
completeURL += "_" + ClientCfg.getHtmlLanguageCode() + ".html";
|
||||
}
|
||||
|
||||
CGroupHTML::browse (completeURL.c_str());
|
||||
}
|
||||
|
|
|
@ -250,6 +250,9 @@ public:
|
|||
/// Accessors : SET
|
||||
void setId (const std::string &newID) { _Id = newID; }
|
||||
|
||||
inline void setName(const std::string &name) { _Name = name; }
|
||||
inline const std::string& getName() { return _Name; }
|
||||
|
||||
virtual void setIdRecurse(const std::string &newID);
|
||||
|
||||
void setParent (CInterfaceGroup *pIG) { _Parent = pIG; }
|
||||
|
@ -510,6 +513,8 @@ protected:
|
|||
///the id of the element
|
||||
std::string _Id;
|
||||
|
||||
std::string _Name;
|
||||
|
||||
///is the element active?
|
||||
bool _Active;
|
||||
|
||||
|
|
|
@ -113,6 +113,33 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
|||
effects += "\n";
|
||||
}
|
||||
|
||||
if ( name == "SP_LIFE_AURA2" )
|
||||
{
|
||||
|
||||
uint16 regenMod;
|
||||
fromString(params[0].c_str(), regenMod);
|
||||
uint32 bonus = regenMod * itemQuality;
|
||||
uint32 duration;
|
||||
fromString(params[1].c_str(), duration);
|
||||
uint32 radius;
|
||||
fromString(params[2].c_str(), radius);
|
||||
uint32 targetDisableTime;
|
||||
fromString(params[3].c_str(), targetDisableTime);
|
||||
uint32 userDisableTime;
|
||||
fromString(params[4].c_str(), userDisableTime);
|
||||
|
||||
ucstring result = CI18N::get("uiItemConsumableEffectLifeAura");
|
||||
strFindReplace(result, "%modifier", toString(bonus));
|
||||
strFindReplace(result, "%minutes", toString(duration/60));
|
||||
strFindReplace(result, "%secondes", toString(duration%60));
|
||||
strFindReplace(result, "%radius", toString(radius));
|
||||
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||
|
||||
effects += result;
|
||||
effects += "\n";
|
||||
}
|
||||
|
||||
if ( name == "SP_STAMINA_AURA" )
|
||||
{
|
||||
|
||||
|
@ -139,6 +166,34 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
|||
effects += "\n";
|
||||
}
|
||||
|
||||
|
||||
if ( name == "SP_STAMINA_AURA2" )
|
||||
{
|
||||
|
||||
uint16 regenMod;
|
||||
fromString(params[0].c_str(), regenMod);
|
||||
uint32 bonus = regenMod * itemQuality;
|
||||
uint32 duration;
|
||||
fromString(params[1].c_str(), duration);
|
||||
uint32 radius;
|
||||
fromString(params[2].c_str(), radius);
|
||||
uint32 targetDisableTime;
|
||||
fromString(params[3].c_str(), targetDisableTime);
|
||||
uint32 userDisableTime;
|
||||
fromString(params[4].c_str(), userDisableTime);
|
||||
|
||||
ucstring result = CI18N::get("uiItemConsumableEffectStaminaAura");
|
||||
strFindReplace(result, "%modifier", toString(regenMod));
|
||||
strFindReplace(result, "%minutes", toString(duration/60));
|
||||
strFindReplace(result, "%secondes", toString(duration%60));
|
||||
strFindReplace(result, "%radius", toString(radius));
|
||||
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||
|
||||
effects += result;
|
||||
effects += "\n";
|
||||
}
|
||||
|
||||
if ( name == "SP_SAP_AURA" )
|
||||
{
|
||||
|
||||
|
@ -165,6 +220,33 @@ void CItemConsumableEffectHelper::getItemConsumableEffectText(const CItemSheet *
|
|||
effects += "\n";
|
||||
}
|
||||
|
||||
if ( name == "SP_SAP_AURA2" )
|
||||
{
|
||||
|
||||
uint16 regenMod;
|
||||
fromString(params[0].c_str(), regenMod);
|
||||
uint32 bonus = regenMod * itemQuality;
|
||||
uint32 duration;
|
||||
fromString(params[1].c_str(), duration);
|
||||
uint32 radius;
|
||||
fromString(params[2].c_str(), radius);
|
||||
uint32 targetDisableTime;
|
||||
fromString(params[3].c_str(), targetDisableTime);
|
||||
uint32 userDisableTime;
|
||||
fromString(params[4].c_str(), userDisableTime);
|
||||
|
||||
ucstring result = CI18N::get("uiItemConsumableEffectSapAura");
|
||||
strFindReplace(result, "%modifier", toString(bonus));
|
||||
strFindReplace(result, "%minutes", toString(duration/60));
|
||||
strFindReplace(result, "%secondes", toString(duration%60));
|
||||
strFindReplace(result, "%radius", toString(radius));
|
||||
strFindReplace(result, "%targetDisableTime", toString(targetDisableTime));
|
||||
strFindReplace(result, "%userDisableTime", toString(userDisableTime));
|
||||
|
||||
effects += result;
|
||||
effects += "\n";
|
||||
}
|
||||
|
||||
// skill modifier consumables
|
||||
//---------------------------
|
||||
ucstring result("");
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
#include "game_share/scenario_entry_points.h"
|
||||
#include "game_share/bg_downloader_msg.h"
|
||||
#include "game_share/constants.h"
|
||||
#include "game_share/visual_slot_manager.h"
|
||||
|
||||
#ifdef LUA_NEVRAX_VERSION
|
||||
#include "lua_ide_dll_nevrax/include/lua_ide_dll/ide_interface.h" // external debugger
|
||||
|
@ -1368,6 +1369,8 @@ void CLuaIHM::registerIHM(CLuaState &ls)
|
|||
ls.registerFunc("isPlayerNewbie", isPlayerNewbie);
|
||||
ls.registerFunc("isInRingMode", isInRingMode);
|
||||
ls.registerFunc("getUserRace", getUserRace);
|
||||
ls.registerFunc("getSheet2idx", getSheet2idx);
|
||||
|
||||
// Through LUABind API
|
||||
lua_State *L= ls.getStatePointer();
|
||||
|
||||
|
@ -4412,3 +4415,25 @@ int CLuaIHM::getUserRace(CLuaState &ls)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
int CLuaIHM::getSheet2idx(CLuaState &ls)
|
||||
{
|
||||
CLuaIHM::checkArgCount(ls, "getSheet2idx", 2);
|
||||
CLuaIHM::checkArgType(ls, "getSheet2idx", 1, LUA_TSTRING);
|
||||
CLuaIHM::checkArgType(ls, "getSheet2idx", 2, LUA_TNUMBER);
|
||||
|
||||
const std::string & sheedtName = ls.toString(1);
|
||||
uint32 slotId = (uint32)ls.toNumber(2);
|
||||
|
||||
NLMISC::CSheetId sheetId;
|
||||
|
||||
if (sheetId.buildSheetId(sheedtName))
|
||||
{
|
||||
uint32 idx = CVisualSlotManager::getInstance()->sheet2Index(sheetId, (SLOTTYPE::EVisualSlot)slotId);
|
||||
ls.push((lua_Number)idx);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -351,6 +351,7 @@ private:
|
|||
static int isPlayerNewbie(CLuaState &ls);
|
||||
static int isInRingMode(CLuaState &ls);
|
||||
static int getUserRace(CLuaState &ls);
|
||||
static int getSheet2idx(CLuaState &ls);
|
||||
|
||||
|
||||
// LUA functions exported for Dev only (debug)
|
||||
|
|
|
@ -999,7 +999,7 @@ class CHandlerChatGroupFilter : public IActionHandler
|
|||
|
||||
|
||||
}
|
||||
rCTF.setTargetGroup(PeopleInterraction.TheUserChat.Filter.getTargetGroup());
|
||||
rCTF.setTargetGroup(PeopleInterraction.TheUserChat.Filter.getTargetGroup(), PeopleInterraction.TheUserChat.Filter.getTargetDynamicChannelDbIndex());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1813,8 +1813,6 @@ void CPeopleInterraction::setupUserChatFromSummary(const CFilteredChatSummary &s
|
|||
//=================================================================================================================
|
||||
void CPeopleInterraction::setupUserDynChatFromSummary(const CFilteredDynChatSummary &summary, CFilteredChat &dest)
|
||||
{
|
||||
// User Dest
|
||||
dest.Filter.setTargetGroup(summary.Target, 0, false);
|
||||
// src
|
||||
for (uint8 i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
||||
{
|
||||
|
@ -2666,12 +2664,12 @@ class CHandlerChatTargetSelected : public IActionHandler
|
|||
// Case of user chat in grouped chat window
|
||||
if (cw == PeopleInterraction.ChatGroup.Window)
|
||||
{
|
||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup());
|
||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
|
||||
CInterfaceManager::getInstance()->runActionHandler("chat_group_filter", NULL, "user");
|
||||
}
|
||||
if (cw == PeopleInterraction.TheUserChat.Window)
|
||||
{
|
||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup());
|
||||
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
|
||||
CInterfaceManager::getInstance()->runActionHandler("user_chat_active", NULL, "");
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ void CPeopleList::setContactId(uint index, uint32 contactId)
|
|||
}
|
||||
|
||||
//==================================================================
|
||||
void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint numBlinks /*=0*/)
|
||||
void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, const ucstring &msg,uint numBlinks /*=0*/)
|
||||
{
|
||||
if (_ContactType == CPeopleListDesc::Ignore)
|
||||
{
|
||||
|
@ -475,7 +475,12 @@ void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint num
|
|||
// 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);
|
||||
gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA()));
|
||||
CInterfaceManager::getInstance()->log(finalMsg);
|
||||
|
||||
// if the group is closed, make it blink
|
||||
if (!gc->isOpen())
|
||||
|
@ -924,7 +929,7 @@ class CHandlerContactEntry : public IActionHandler
|
|||
uint index;
|
||||
if (PeopleInterraction.getPeopleFromContainerID(str, peopleList, index))
|
||||
{
|
||||
peopleList->displayLocalPlayerTell(index, text);
|
||||
peopleList->displayLocalPlayerTell(str2, index, text);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -948,6 +953,11 @@ class CHandlerContactEntry : public IActionHandler
|
|||
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
||||
final += text;
|
||||
pWin->displayTellMessage(final, prop.getRGBA(), pWin->getFreeTellerName(str));
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", pWin->getFreeTellerName(str));
|
||||
strFindReplace(final, CI18N::get("youTell"), s);
|
||||
CInterfaceManager::getInstance()->log(final);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
* If the window is closed, it causes it to blink (and also the parent window)
|
||||
*/
|
||||
void displayMessage(uint index, const ucstring &msg, NLMISC::CRGBA col, uint numBlinks = 0);
|
||||
void displayLocalPlayerTell(uint index, const ucstring &msg, uint numBlinks = 0);
|
||||
void displayLocalPlayerTell(const ucstring &receiver, uint index, const ucstring &msg, uint numBlinks = 0);
|
||||
// Is the given people window visible ?
|
||||
bool isPeopleChatVisible(uint index) const;
|
||||
// reset remove everything from the interface
|
||||
|
|
|
@ -57,6 +57,7 @@ const std::string PhraseMemoryViewNextAction= "ui:interface:gestionsets:shortcu
|
|||
const std::string PhraseMemoryViewCycleAction= "ui:interface:gestionsets:shortcuts:view_cycle_action";
|
||||
const std::string PhraseMemoryViewSlotBase= "ui:interface:gestionsets:shortcuts:s";
|
||||
const std::string PhraseMemoryCtrlBase= "ui:interface:gestionsets:shortcuts:s";
|
||||
const std::string PhraseMemoryAltCtrlBase= "ui:interface:gestionsets2:header_closed:shortcuts:s";
|
||||
|
||||
const std::string PhraseMemoryPhraseMenu= "ui:interface:cm_memory_phrase";
|
||||
const std::string PhraseMemoryPhraseAction= "cast_phrase_or_create_new";
|
||||
|
@ -118,11 +119,16 @@ void CSPhraseManager::initInGame()
|
|||
_BookDbLeaves[i]= node;
|
||||
}
|
||||
_MemoryDbLeaves.resize(PHRASE_MAX_MEMORY_SLOT, NULL);
|
||||
_MemoryAltDbLeaves.resize(PHRASE_MAX_MEMORY_SLOT, NULL);
|
||||
|
||||
for(i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||
{
|
||||
CCDBNodeLeaf *node= pIM->getDbProp(PHRASE_DB_MEMORY + ":" + toString(i) + ":PHRASE");
|
||||
node->setValue32(0);
|
||||
_MemoryDbLeaves[i]= node;
|
||||
CCDBNodeLeaf *node_alt= pIM->getDbProp(PHRASE_DB_MEMORY_ALT + ":" + toString(i) + ":PHRASE");
|
||||
node_alt->setValue32(0);
|
||||
_MemoryAltDbLeaves[i]= node_alt;
|
||||
}
|
||||
|
||||
// Progression Db leaves
|
||||
|
@ -497,6 +503,7 @@ void CSPhraseManager::updateMemoryDBAll()
|
|||
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||
{
|
||||
_MemoryDbLeaves[i]->setValue32(0);
|
||||
_MemoryAltDbLeaves[i]->setValue32(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -508,6 +515,12 @@ void CSPhraseManager::updateMemoryDBAll()
|
|||
_MemoryDbLeaves[i]->setValue32(0);
|
||||
else
|
||||
_MemoryDbLeaves[i]->setValue32(slot.Id);
|
||||
|
||||
CMemorySlot &slotAlt= _Memories[0].Slot[i];
|
||||
if(!slotAlt.isPhrase())
|
||||
_MemoryAltDbLeaves[i]->setValue32(0);
|
||||
else
|
||||
_MemoryAltDbLeaves[i]->setValue32(slotAlt.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -530,6 +543,15 @@ void CSPhraseManager::updateMemoryDBSlot(uint32 memorySlot)
|
|||
else
|
||||
_MemoryDbLeaves[memorySlot]->setValue32(slot.Id);
|
||||
}
|
||||
|
||||
if (_SelectedMemoryDB == 0)
|
||||
{
|
||||
CMemorySlot &slotAlt= _Memories[0].Slot[memorySlot];
|
||||
if(!slotAlt.isPhrase())
|
||||
_MemoryAltDbLeaves[memorySlot]->setValue32(0);
|
||||
else
|
||||
_MemoryAltDbLeaves[memorySlot]->setValue32(slotAlt.Id);
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -873,6 +895,7 @@ void CSPhraseManager::reset()
|
|||
_LastProgressionNumDbFill[i]= 0;
|
||||
}
|
||||
_MemoryDbLeaves.clear();
|
||||
_MemoryAltDbLeaves.clear();
|
||||
_NextExecuteLeaf= NULL;
|
||||
_NextExecuteIsCyclicLeaf= NULL;
|
||||
|
||||
|
@ -2645,7 +2668,13 @@ static sint getRightHandEnchantValue()
|
|||
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot, CDBCtrlSheet *ctrl)
|
||||
{
|
||||
//
|
||||
uint memoryLine= getSelectedMemoryLineDB();
|
||||
sint32 memoryLine;
|
||||
if (ctrl->isShortCut())
|
||||
memoryLine = getSelectedMemoryLineDB();
|
||||
else
|
||||
memoryLine = 0;
|
||||
if (memoryLine < 0)
|
||||
return;
|
||||
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
||||
//
|
||||
if(phraseId)
|
||||
|
@ -2780,8 +2809,12 @@ void CSPhraseManager::updateMemoryCtrlState(uint memorySlot, CDBCtrlSheet *ctrl,
|
|||
CSBrickManager *pBM = CSBrickManager::getInstance();
|
||||
CSkillManager *pSM = CSkillManager::getInstance();
|
||||
|
||||
uint memoryLine;
|
||||
// get the slot info
|
||||
uint memoryLine= getSelectedMemoryLineDB();
|
||||
if (ctrl->isShortCut()) // No memoryLine defined
|
||||
memoryLine= getSelectedMemoryLineDB();
|
||||
else
|
||||
memoryLine= 0;
|
||||
bool newIsMacro= isMemorizedMacro(memoryLine, memorySlot);
|
||||
sint32 macroId= getMemorizedMacro(memoryLine, memorySlot);
|
||||
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
|
||||
|
@ -3004,6 +3037,9 @@ void CSPhraseManager::updateAllMemoryCtrlState()
|
|||
// update the valid state.
|
||||
updateMemoryCtrlState(i, ctrl, itemSkill);
|
||||
}
|
||||
CDBCtrlSheet *ctrlAlt= dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(i)) );
|
||||
if(ctrlAlt)
|
||||
updateMemoryCtrlState(i, ctrlAlt, itemSkill);
|
||||
}
|
||||
TTicks endTime = CTime::getPerformanceTime();
|
||||
//nldebug("***** %d ms for CSPhraseManager::updateAllMemoryCtrlState", (int) (1000 * CTime::ticksToSecond(endTime - startTime)));
|
||||
|
@ -3030,26 +3066,49 @@ CDBCtrlSheet *CSPhraseManager::getMemorySlotCtrl(uint memorySlot)
|
|||
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryCtrlBase + toString(memorySlot)));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
CDBCtrlSheet *CSPhraseManager::getMemoryAltSlotCtrl(uint memorySlot)
|
||||
{
|
||||
if(memorySlot>=PHRASE_MAX_MEMORY_SLOT)
|
||||
return NULL;
|
||||
|
||||
// Get the ctrl
|
||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(memorySlot)));
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CSPhraseManager::updateMemoryCtrlState(uint memorySlot)
|
||||
{
|
||||
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
||||
CDBCtrlSheet *ctrlAlt= getMemoryAltSlotCtrl(memorySlot);
|
||||
if(ctrl)
|
||||
{
|
||||
// update the valid state.
|
||||
updateMemoryCtrlState(memorySlot, ctrl, getRightHandItemSkill());
|
||||
}
|
||||
if(ctrlAlt)
|
||||
{
|
||||
// update the valid state.
|
||||
updateMemoryCtrlState(memorySlot, ctrlAlt, getRightHandItemSkill());
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot)
|
||||
{
|
||||
CDBCtrlSheet *ctrl= getMemorySlotCtrl(memorySlot);
|
||||
CDBCtrlSheet *ctrlAlt= getMemoryAltSlotCtrl(memorySlot);
|
||||
if(ctrl)
|
||||
{
|
||||
// update the valid state.
|
||||
updateMemoryCtrlRegenTickRange(memorySlot, ctrl);
|
||||
}
|
||||
if(ctrlAlt)
|
||||
{
|
||||
// update the valid state.
|
||||
updateMemoryCtrlRegenTickRange(memorySlot, ctrlAlt);
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
const std::string PHRASE_DB_BOOK="UI:PHRASE:BOOK";
|
||||
const std::string PHRASE_DB_PROGRESSION[2]= {"UI:PHRASE:PROGRESS_ACTIONS", "UI:PHRASE:PROGRESS_UPGRADES"};
|
||||
const std::string PHRASE_DB_MEMORY="UI:PHRASE:MEMORY";
|
||||
const std::string PHRASE_DB_MEMORY_ALT="UI:PHRASE:MEMORY_ALT";
|
||||
const std::string PHRASE_DB_EXECUTE_NEXT="UI:PHRASE:EXECUTE_NEXT:PHRASE";
|
||||
const std::string PHRASE_DB_EXECUTE_NEXT_IS_CYCLIC="UI:PHRASE:EXECUTE_NEXT:ISCYCLIC";
|
||||
const std::string PHRASE_DB_BOTCHAT="LOCAL:TRADING";
|
||||
|
@ -458,6 +459,7 @@ private:
|
|||
// Shortcut To Phrases Leaves
|
||||
std::vector<CCDBNodeLeaf*> _BookDbLeaves;
|
||||
std::vector<CCDBNodeLeaf*> _MemoryDbLeaves;
|
||||
std::vector<CCDBNodeLeaf*> _MemoryAltDbLeaves;
|
||||
CCDBNodeLeaf *_NextExecuteLeaf;
|
||||
CCDBNodeLeaf *_NextExecuteIsCyclicLeaf;
|
||||
|
||||
|
@ -698,6 +700,7 @@ private:
|
|||
void updateMemoryCtrlRegenTickRange(uint memorySlot);
|
||||
|
||||
CDBCtrlSheet *getMemorySlotCtrl(uint memorySlot);
|
||||
CDBCtrlSheet *getMemoryAltSlotCtrl(uint memorySlot);
|
||||
|
||||
CTickRange getRegenTickRange(const CSPhraseCom &phrase) const;
|
||||
|
||||
|
|
|
@ -218,6 +218,14 @@ HTAttr p_attr[] =
|
|||
HTML_ATTR(P,QUICK_HELP_CONDITION),
|
||||
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
||||
HTML_ATTR(P,QUICK_HELP_LINK),
|
||||
HTML_ATTR(P,NAME),
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
||||
HTAttr div_attr[] =
|
||||
{
|
||||
HTML_ATTR(DIV,NAME),
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -684,6 +692,8 @@ void initLibWWW()
|
|||
HTML_DTD->tags[HTML_A].number_of_attributes = sizeof(a_attr) / sizeof(HTAttr) - 1;
|
||||
//HTML_DTD->tags[HTML_I].attributes = a_attr;
|
||||
HTML_DTD->tags[HTML_I].number_of_attributes = 0;
|
||||
HTML_DTD->tags[HTML_DIV].attributes = div_attr;
|
||||
HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1;
|
||||
|
||||
// Set a request timeout
|
||||
// HTHost_setEventTimeout (30000);
|
||||
|
|
|
@ -201,8 +201,15 @@ enum
|
|||
HTML_ATTR(P,QUICK_HELP_CONDITION) = 0,
|
||||
HTML_ATTR(P,QUICK_HELP_EVENTS),
|
||||
HTML_ATTR(P,QUICK_HELP_LINK),
|
||||
HTML_ATTR(P,NAME),
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
HTML_ATTR(DIV,NAME) = 0,
|
||||
};
|
||||
|
||||
|
||||
#undef HTML_ATTR
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -619,6 +619,7 @@ void CUserControls::commonMove()
|
|||
// MOUSE WHEEL //
|
||||
CEventsListener::TWheelState wheelState = EventsListener.getWheelState(); // Done all the time, to reset the state
|
||||
View.changeCameraDist((wheelState == CEventsListener::foreward), (wheelState == CEventsListener::backward));
|
||||
View.changeCameraDist(Actions.valide("camera_foreward"), Actions.valide("camera_backward"));
|
||||
// Camera Up/Down.
|
||||
View.changeCameraHeight(Actions.valide("camera_up"), Actions.valide("camera_down"));
|
||||
//////////////////
|
||||
|
|
|
@ -895,6 +895,7 @@ void CInterfaceChatDisplayer::displayTell(/*TDataSetIndex senderIndex, */const u
|
|||
colorizeSender(finalString, senderPart, prop.getRGBA());
|
||||
|
||||
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*senderIndex, */finalString, goodSenderName, prop.getRGBA(), 2, &windowVisible);
|
||||
CInterfaceManager::getInstance()->log(finalString);
|
||||
|
||||
// Open the free teller window
|
||||
CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow();
|
||||
|
@ -3216,9 +3217,13 @@ private:
|
|||
|
||||
// get the content string (should have been received!)
|
||||
ucstring contentStr;
|
||||
ucstring titleStr;
|
||||
if(!pSMC->getDynString(_TextId[ContentType], contentStr))
|
||||
return;
|
||||
|
||||
if(!pSMC->getDynString(_TextId[TitleType], titleStr))
|
||||
return;
|
||||
|
||||
// if the string start with a @{Wxxxx} code, remove it and get the wanted window size
|
||||
sint w = 256; // default size to 256 !!
|
||||
bool is_webig = false;
|
||||
|
@ -3273,23 +3278,36 @@ private:
|
|||
|
||||
if (is_webig)
|
||||
{
|
||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
||||
CGroupHTML *groupHtml;
|
||||
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)
|
||||
{
|
||||
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
||||
group = "webig";
|
||||
}
|
||||
|
||||
if (groupHtml)
|
||||
{
|
||||
|
||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:webig"));
|
||||
|
||||
if (contentStr.empty())
|
||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:"+group));
|
||||
if (pGC)
|
||||
{
|
||||
pGC->setActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGC->setActive(true);
|
||||
string url = contentStr.toString();
|
||||
addWebIGParams(url);
|
||||
groupHtml->browse(url.c_str());
|
||||
pIM->setTopWindow(pGC);
|
||||
if (contentStr.empty())
|
||||
{
|
||||
pGC->setActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (group == "webig")
|
||||
pGC->setActive(true);
|
||||
string url = contentStr.toString();
|
||||
addWebIGParams(url);
|
||||
groupHtml->browse(url.c_str());
|
||||
pIM->setTopWindow(pGC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1641,8 +1641,6 @@ const ucchar *CStringManagerClient::getSquadLocalizedDescription(NLMISC::CSheetI
|
|||
// ***************************************************************************
|
||||
void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring &name, const ucstring &desc, const ucstring &desc2)
|
||||
{
|
||||
nlassert(!_SpecItem_MemoryCompressed);
|
||||
|
||||
std::string label= id.toString();
|
||||
if (label.empty())
|
||||
{
|
||||
|
@ -1654,14 +1652,57 @@ void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstrin
|
|||
lwrLabel= label;
|
||||
strlwr(lwrLabel);
|
||||
|
||||
map<string, CItem>::iterator it(_SpecItem_TempMap.find(lwrLabel));
|
||||
if (it == _SpecItem_TempMap.end())
|
||||
return;
|
||||
if (_SpecItem_MemoryCompressed)
|
||||
{
|
||||
ucchar *strName = (ucchar *)name.c_str();
|
||||
ucchar *strDesc = (ucchar *)desc.c_str();
|
||||
ucchar *strDesc2 = (ucchar *)desc2.c_str();
|
||||
CItemLight tmp;
|
||||
tmp.Label = (char*)lwrLabel.c_str();
|
||||
vector<CItemLight>::iterator it = lower_bound(_SpecItems.begin(), _SpecItems.end(), tmp, CItemLightComp());
|
||||
|
||||
// Then replace
|
||||
it->second.Name= name;
|
||||
it->second.Desc= desc;
|
||||
it->second.Desc2= desc2;
|
||||
if (it != _SpecItems.end())
|
||||
{
|
||||
if (strcmp(it->Label, lwrLabel.c_str()) == 0)
|
||||
{
|
||||
it->Name = strName;
|
||||
it->Desc = strDesc;
|
||||
it->Desc2 = strDesc2;
|
||||
}
|
||||
else
|
||||
{
|
||||
it->Label = tmp.Label;
|
||||
it->Name = strName;
|
||||
it->Desc = strDesc;
|
||||
it->Desc2 = strDesc2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp.Name = strName;
|
||||
tmp.Desc = strDesc;
|
||||
tmp.Desc2 = strDesc2;
|
||||
_SpecItems.push_back(tmp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
map<string, CItem>::iterator it(_SpecItem_TempMap.find(lwrLabel));
|
||||
if (it != _SpecItem_TempMap.end())
|
||||
{
|
||||
it->second.Name= name;
|
||||
it->second.Desc= desc;
|
||||
it->second.Desc2= desc2;
|
||||
}
|
||||
else
|
||||
{
|
||||
CItem newItem;
|
||||
newItem.Name = name;
|
||||
newItem.Desc = desc;
|
||||
newItem.Desc2 = desc2;
|
||||
_SpecItem_TempMap.insert(pair<string,CItem>(lwrLabel,newItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace ACTNATURE
|
|||
NL_STRING_CONVERSION_TABLE_ENTRY(DODGE)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(PARRY)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(SHIELD_USE)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(RECHARGE)
|
||||
NL_END_STRING_CONVERSION_TABLE(TActionNature, ActionNatureConversion, UNKNOWN)
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace ACTNATURE
|
|||
DODGE,
|
||||
PARRY,
|
||||
SHIELD_USE,
|
||||
RECHARGE,
|
||||
|
||||
NEUTRAL, //only for multi effect on spell,progression consider it as OFFENSIVE_MAGIC
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef CHARACTER_SYNC_ITF
|
||||
#define CHARACTER_SYNC_ITF
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -133,6 +133,9 @@ namespace MAGICFX
|
|||
WaterWall = 11,
|
||||
ThornWall = 12,
|
||||
LightningWall = 13,
|
||||
OtherFireWall = 14,
|
||||
TeleportKami = 15, // No effect aura
|
||||
TeleportKara = 16, // No effect aura
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1022,14 +1022,14 @@ struct _CMirrorPropValueListIterator
|
|||
CMirrorPropValueList<T,CPLC> *_ParentList;
|
||||
TSharedListRow _Index;
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
// typedef typename std::forward_iterator_tag iterator_category;
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
// typedef typename std::forward_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1050,15 +1050,14 @@ struct _CCMirrorPropValueListIterator
|
|||
CMirrorPropValueList<T,CPLC> *_ParentList;
|
||||
TSharedListRow _Index;
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
// typedef typename std::forward_iterator_tag iterator_category;
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
// typedef typename std::forward_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1232,7 +1231,7 @@ class CMirrorPropValueList<NLMISC::CEntityId,CPropLocationUnpacked>
|
|||
{
|
||||
public:
|
||||
|
||||
typedef CPropLocationUnpacked CPropLocationClass;
|
||||
typedef CPropLocationUnpacked CPropLocationClass;
|
||||
|
||||
typedef uint32 size_type;
|
||||
typedef _CMirrorPropValueListIterator<NLMISC::CEntityId,CPropLocationClass> iterator;
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef MSG_AIS_EGS_GEN
|
||||
#define MSG_AIS_EGS_GEN
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef R2_MODULES_ITF
|
||||
#define R2_MODULES_ITF
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef R2_SHARE_ITF
|
||||
#define R2_SHARE_ITF
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -2437,7 +2437,7 @@ NLMISC_COMMAND(setGrpTimers,"set the timer values for a given group","<grp id> <
|
|||
void cbTick();
|
||||
extern uint ForceTicks;
|
||||
|
||||
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","")
|
||||
NLMISC_COMMAND(updateAI,"call CAIS::update() (simulate a tick off-line)","[tick]")
|
||||
{
|
||||
if(args.size() >1)
|
||||
return false;
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef GUILD_UNIFIER_ITF
|
||||
#define GUILD_UNIFIER_ITF
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef LOGIN_SERVICE_ITF
|
||||
#define LOGIN_SERVICE_ITF
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef DATABASE_MAPPING
|
||||
#define DATABASE_MAPPING
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef NEL_DATABASE_MAPPING
|
||||
#define NEL_DATABASE_MAPPING
|
||||
#include "nel/misc/types_nl.h"
|
||||
#if defined(NL_COMP_VC8) || defined(NL_COMP_VC9)
|
||||
# include <memory>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/string_conversion.h"
|
||||
#include "nel/net/message.h"
|
||||
|
|
|
@ -3,6 +3,7 @@ ADD_SUBDIRECTORY(prim_export)
|
|||
ADD_SUBDIRECTORY(uni_conv)
|
||||
ADD_SUBDIRECTORY(csv_transform)
|
||||
ADD_SUBDIRECTORY(icon_search)
|
||||
ADD_SUBDIRECTORY(mission_compiler_lib)
|
||||
ADD_SUBDIRECTORY(mp_generator)
|
||||
ADD_SUBDIRECTORY(named_items_2_csv)
|
||||
|
||||
|
@ -11,6 +12,10 @@ IF(WIN32)
|
|||
ADD_SUBDIRECTORY(world_editor)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_MFC)
|
||||
ADD_SUBDIRECTORY(mission_compiler_fe)
|
||||
ENDIF(WITH_MFC)
|
||||
|
||||
IF(WITH_QT)
|
||||
ADD_SUBDIRECTORY(georges_editor_qt)
|
||||
ENDIF(WITH_QT)
|
||||
|
@ -24,8 +29,6 @@ ENDIF(WITH_QT)
|
|||
#icon_search
|
||||
#install
|
||||
#master
|
||||
#mission_compiler_fe
|
||||
#mission_compiler_lib
|
||||
#mission_simulator
|
||||
#
|
||||
#primitive_id_assignator
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_DEFINITIONS(${MFC_DEFINITIONS})
|
||||
SET(CMAKE_MFC_FLAG 2)
|
||||
ADD_EXECUTABLE(ryzom_mission_compiler_fe WIN32 ${SRC} mission_compiler_fe.rc)
|
||||
|
||||
TARGET_LINK_LIBRARIES(ryzom_mission_compiler_fe nelmisc nelligo ryzom_mission_compiler_lib)
|
||||
|
||||
NL_DEFAULT_PROPS(ryzom_mission_compiler_fe "Ryzom, Tools, Misc: Mission Compiler Frontend")
|
||||
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler_fe)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_mission_compiler_fe ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS ryzom_mission_compiler_fe RUNTIME DESTINATION bin COMPONENT tools)
|
|
@ -0,0 +1,27 @@
|
|||
FILE(GLOB LIBSRC mission_compiler.cpp
|
||||
mission_compiler.h
|
||||
step.h
|
||||
step_content.cpp
|
||||
steps.cpp
|
||||
variables.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
NL_TARGET_LIB(ryzom_mission_compiler_lib ${LIBSRC})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ryzom_mission_compiler_lib nelmisc nelligo)
|
||||
NL_DEFAULT_PROPS(ryzom_mission_compiler_lib "Ryzom, Library: Mission Compiler")
|
||||
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler_lib)
|
||||
NL_ADD_LIB_SUFFIX(ryzom_mission_compiler_lib)
|
||||
|
||||
INSTALL(TARGETS ryzom_mission_compiler_lib LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
||||
FILE(GLOB EXESRC main.cpp)
|
||||
|
||||
ADD_EXECUTABLE(ryzom_mission_compiler ${EXESRC})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ryzom_mission_compiler ryzom_mission_compiler_lib)
|
||||
NL_DEFAULT_PROPS(ryzom_mission_compiler "Ryzom, Tools, Misc: Mission Compiler")
|
||||
NL_ADD_RUNTIME_FLAGS(ryzom_mission_compiler)
|
||||
|
||||
INSTALL(TARGETS ryzom_mission_compiler RUNTIME DESTINATION bin COMPONENT tools)
|
Loading…
Reference in a new issue