mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Merge
This commit is contained in:
commit
92b51b46ce
98 changed files with 7248 additions and 234 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(LUABIND_FIND_QUIETLY TRUE)
|
||||
SET(Luabind_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR
|
||||
|
@ -22,7 +22,7 @@ FIND_PATH(LUABIND_INCLUDE_DIR
|
|||
)
|
||||
|
||||
SET(LIBRARY_NAME_RELEASE luabind libluabind)
|
||||
SET(LIBRARY_NAME_DEBUG luabind_d libluabind_d libluabindd)
|
||||
SET(LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd)
|
||||
|
||||
IF(WITH_STLPORT)
|
||||
SET(LIBRARY_NAME_RELEASE luabind_stlport ${LIBRARY_NAME_RELEASE})
|
||||
|
@ -62,30 +62,35 @@ FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
|||
FIND_PACKAGE(Boost REQUIRED)
|
||||
|
||||
IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||
IF(LUABIND_LIBRARY_RELEASE)
|
||||
IF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
||||
# Case where both Release and Debug versions are provided
|
||||
SET(LUABIND_FOUND TRUE)
|
||||
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||
IF(LUABIND_LIBRARY_DEBUG)
|
||||
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE};debug;${LUABIND_LIBRARY_DEBUG}")
|
||||
ELSE(LUABIND_LIBRARY_DEBUG)
|
||||
SET(LUABIND_LIBRARIES "${LUABIND_LIBRARY_RELEASE}")
|
||||
ENDIF(LUABIND_LIBRARY_DEBUG)
|
||||
ENDIF(LUABIND_LIBRARY_RELEASE)
|
||||
SET(LUABIND_LIBRARIES optimized ${LUABIND_LIBRARY_RELEASE} debug ${LUABIND_LIBRARY_DEBUG})
|
||||
ELSEIF(LUABIND_LIBRARY_RELEASE)
|
||||
# Normal case
|
||||
SET(LUABIND_FOUND TRUE)
|
||||
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_RELEASE})
|
||||
ELSEIF(LUABIND_LIBRARY_DEBUG)
|
||||
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
||||
SET(LUABIND_FOUND TRUE)
|
||||
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
||||
ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
||||
ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||
|
||||
IF(LUABIND_FOUND)
|
||||
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||
# Check if luabind/version.hpp exists
|
||||
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
||||
IF(LUABIND_VERSION_FILE)
|
||||
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
||||
ENDIF(LUABIND_VERSION_FILE)
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
IF(NOT Luabind_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||
ELSE(LUABIND_FOUND)
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
IF(NOT Luabind_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||
ENDIF(LUABIND_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
||||
|
|
|
@ -71,9 +71,9 @@ IF(STLPORT_INCLUDE_DIR)
|
|||
IF(STLPORT_LIBRARY_RELEASE)
|
||||
SET(STLPORT_FOUND TRUE)
|
||||
|
||||
SET(STLPORT_LIBRARIES "optimized;${STLPORT_LIBRARY_RELEASE}")
|
||||
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
||||
IF(STLPORT_LIBRARY_DEBUG)
|
||||
SET(STLPORT_LIBRARIES "${STLPORT_LIBRARIES};debug;${STLPORT_LIBRARY_DEBUG}")
|
||||
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
||||
ENDIF(STLPORT_LIBRARY_DEBUG)
|
||||
ENDIF(STLPORT_LIBRARY_RELEASE)
|
||||
ENDIF(STLPORT_INCLUDE_DIR)
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
# - Find zlib
|
||||
# Find the native ZLIB includes and library
|
||||
#
|
||||
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES - List of libraries when using zlib.
|
||||
# ZLIB_FOUND - True if zlib found.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF (ZLIB_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
ENDIF (ZLIB_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
|
||||
|
||||
SET(ZLIB_NAMES z zlib zdll)
|
||||
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
|
||||
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
|
||||
|
||||
# Per-recommendation
|
||||
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
|
||||
SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
|
|
@ -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
|
||||
|
@ -287,20 +291,18 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
|
|||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef NL_OS_MAC
|
||||
#define NL_I64 __PRI_64_LENGTH_MODIFIER__
|
||||
#if defined(__PRI_64_LENGTH_MODIFIER__)
|
||||
# define NL_I64 __PRI_64_LENGTH_MODIFIER__
|
||||
#elif defined(__PRI64_PREFIX)
|
||||
# define NL_I64 __PRI64_PREFIX
|
||||
#else
|
||||
#define NL_I64 __PRI64_PREFIX
|
||||
# ifdef _LP64
|
||||
# define NL_I64 "l"
|
||||
# else
|
||||
# define NL_I64 "ll"
|
||||
# endif // _LP64
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef _LP64
|
||||
# define NL_I64 "l"
|
||||
#else
|
||||
# define NL_I64 "ll"
|
||||
#endif // _LP64
|
||||
*/
|
||||
|
||||
#endif // NL_OS_UNIX
|
||||
|
||||
// CHashMap, CHashSet and CHashMultiMap definitions
|
||||
|
@ -364,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
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
# This tells the application(s) where to fidn the installed data.
|
||||
ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_PREFIX}/object_viewer_qt/\\"")
|
||||
|
||||
IF(UNIX AND WITH_STATIC)
|
||||
MESSAGE(FATAL_ERROR "OVQT does not work with static NeL builds on Unix atm.")
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
INSTALL(DIRECTORY data/
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
OVQT Translation Manager plugin
|
||||
--------------------------------
|
||||
http://dev.ryzom.com/wiki/ryzom/OVQTTranslationPluginGSoc2011
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -524,12 +524,12 @@ void CInterfaceManager::initOutGame()
|
|||
ActionsContext.addActionsManager(&Actions, "");
|
||||
ActionsContext.addActionsManager(&EditActions, RZ_CATEGORY_EDIT);
|
||||
|
||||
|
||||
if (ClientCfg.SelectCharacter != -1) return;
|
||||
|
||||
// Init LUA Scripting
|
||||
initLUA();
|
||||
|
||||
if (ClientCfg.SelectCharacter != -1)
|
||||
return;
|
||||
|
||||
{
|
||||
if (SoundMngr != NULL)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -454,8 +454,8 @@ void CFaberPhrase::apply()
|
|||
return;
|
||||
}
|
||||
|
||||
neededMp = _RootFaberPlan->Faber->NeededMps.size();
|
||||
EGSPD::CPeople::TPeople civRestriction = _RootFaberPlan->CivRestriction;
|
||||
neededMp = (uint32)_RootFaberPlan->Faber->NeededMps.size();
|
||||
EGSPD::CPeople::TPeople civRestriction = _RootFaberPlan->CivRestriction;
|
||||
uint32 usedMp=0;
|
||||
vector< const CStaticItem * > usedMps = _Mps;
|
||||
|
||||
|
|
|
@ -52,10 +52,11 @@ struct CCyclicActionInfos
|
|||
TDataSetRow TargetRowId;
|
||||
std::vector<NLMISC::CSheetId> CyclicActionBricks;
|
||||
|
||||
CCyclicActionInfos() { }
|
||||
inline void reset() { CyclicActionBricks.clear(); }
|
||||
};
|
||||
|
||||
static const CCyclicActionInfos NoCyclicInfo;
|
||||
static const CCyclicActionInfos NoCyclicInfo = CCyclicActionInfos();
|
||||
|
||||
class CPhraseManager;
|
||||
|
||||
|
|
|
@ -344,7 +344,6 @@ CCharacter::CCharacter(): CEntityBase(false),
|
|||
_AggroableSave(true),
|
||||
_GodModeSave(false)
|
||||
{
|
||||
|
||||
// todo : uncomment that when sadge item api is plugged
|
||||
_AggroCount = 0;
|
||||
// _Bulk = 0;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <libxml/parser.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -549,13 +549,13 @@ public:
|
|||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, const CMirrorPropValueRO<T>& currentValue, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||
{
|
||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
// return false;
|
||||
|
||||
if (entry.HasValue)
|
||||
{
|
||||
#ifdef NL_DEBUG
|
||||
if ( (propIndex==PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
||||
#endif
|
||||
return (currentValue() != *((T*)&(entry.LastSent)));
|
||||
|
@ -569,7 +569,7 @@ public:
|
|||
{
|
||||
// Not sent yet
|
||||
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
||||
if ( (propIndex==PROPERTY_SHEET) )
|
||||
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) )
|
||||
{
|
||||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
||||
|
@ -614,7 +614,7 @@ public:
|
|||
bool discreetPropertyHasChanged(const CPropertyHistory::CPropertyEntry& entry, TPropIndex propIndex, T* ) const
|
||||
{
|
||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
// return false;
|
||||
|
||||
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
||||
|
@ -625,7 +625,7 @@ public:
|
|||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||
|
||||
#ifdef NL_DEBUG
|
||||
if ( (propIndex==PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (currentValue() != *((T*)&(entry.LastSent))) )
|
||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet changes from %u to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, (uint32)entry.LastSent, asUInt32<T>(currentValue()) );
|
||||
#endif
|
||||
|
||||
|
@ -639,7 +639,7 @@ public:
|
|||
{
|
||||
// Not sent yet
|
||||
//nldebug( "No history yet for C%hu - slot %hu - prop %hu", TVPNodeServer::PrioContext.ClientHost->clientId(), (uint16)TVPNodeServer::PrioContext.Slot, propIndex );
|
||||
if ( (propIndex==PROPERTY_SHEET) )
|
||||
if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) )
|
||||
{
|
||||
CMirrorPropValueRO<T> currentValue( TheDataset, TVPNodeServer::PrioContext.EntityIndex, dsPropertyIndex );
|
||||
LOG_WHAT_IS_SENT( "C%hu S%hu: sheet initializes to %u", TVPNodeServer::PrioContext.ClientId, TVPNodeServer::PrioContext.Slot, asUInt32<T>(currentValue()) );
|
||||
|
@ -681,7 +681,7 @@ public:
|
|||
bool targetListHasChanged(const CPropertyHistory::CPropertyEntry& entry, CLFECOMMON::TPropIndex propIndex, T* ) const
|
||||
{
|
||||
// Although the client should already know the sheet id of the controlled player, let's send it
|
||||
//if ( (propIndex==PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
//if ( (propIndex==CLFECOMMON::PROPERTY_SHEET) && (TVPNodeServer::PrioContext.Slot == 0) )
|
||||
// return false;
|
||||
|
||||
TPropertyIndex dsPropertyIndex = CEntityContainer::propertyIndexInDataSetToVisualPropIndex( propIndex );
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -20,4 +20,8 @@ NL_ADD_RUNTIME_FLAGS(ryzom_gpm_service)
|
|||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_gpm_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS ryzom_gpm_service RUNTIME DESTINATION sbin COMPONENT services)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "cell.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// include files
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// Nel Misc
|
||||
#include "nel/misc/command.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// misc
|
||||
#include "nel/misc/command.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// include files
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "nel/misc/common.h"
|
||||
|
||||
#include "game_share/utils.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "patat_grid.h"
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "patat_subscribe_manager.h"
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// Misc
|
||||
#include "nel/misc/path.h"
|
||||
|
|
17
code/ryzom/server/src/gpm_service/stdpch.cpp
Normal file
17
code/ryzom/server/src/gpm_service/stdpch.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
98
code/ryzom/server/src/gpm_service/stdpch.h
Normal file
98
code/ryzom/server/src/gpm_service/stdpch.h
Normal file
|
@ -0,0 +1,98 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "nel/misc/types_nl.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// NeL georges
|
||||
#include "nel/georges/u_form.h"
|
||||
#include "nel/georges/u_form_elm.h"
|
||||
|
||||
// NeL ligo
|
||||
#include "nel/ligo/ligo_config.h"
|
||||
#include "nel/ligo/primitive.h"
|
||||
|
||||
// NeL misc
|
||||
#include "nel/misc/aabbox.h"
|
||||
#include "nel/misc/block_memory.h"
|
||||
#include "nel/misc/command.h"
|
||||
#include "nel/misc/common.h"
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/entity_id.h"
|
||||
#include "nel/misc/file.h"
|
||||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/i_xml.h"
|
||||
#include "nel/misc/path.h"
|
||||
#include "nel/misc/sheet_id.h"
|
||||
#include "nel/misc/smart_ptr.h"
|
||||
#include "nel/misc/stream.h"
|
||||
#include "nel/misc/time_nl.h"
|
||||
#include "nel/misc/variable.h"
|
||||
#include "nel/misc/vector.h"
|
||||
#include "nel/misc/vector_2d.h"
|
||||
#include "nel/misc/vectord.h"
|
||||
|
||||
// NeL net
|
||||
#include "nel/net/message.h"
|
||||
#include "nel/net/service.h"
|
||||
#include "nel/net/unified_network.h"
|
||||
|
||||
// NeL pacs
|
||||
#include "nel/pacs/u_collision_desc.h"
|
||||
#include "nel/pacs/u_global_position.h"
|
||||
#include "nel/pacs/u_global_retriever.h"
|
||||
#include "nel/pacs/u_move_container.h"
|
||||
#include "nel/pacs/u_move_primitive.h"
|
||||
#include "nel/pacs/u_primitive_block.h"
|
||||
|
||||
// GameShare
|
||||
#include "game_share/mirror_prop_value.h"
|
||||
#include "game_share/player_vision_delta.h"
|
||||
#include "game_share/ryzom_entity_id.h"
|
||||
#include "game_share/ryzom_mirror_properties.h"
|
||||
#include "game_share/synchronised_message.h"
|
||||
#include "game_share/tick_event_handler.h"
|
||||
#include "game_share/utils.h"
|
||||
|
||||
// ServerShare
|
||||
#include "server_share/effect_manager.h"
|
||||
#include "server_share/msg_gpm_service.h"
|
||||
#include "server_share/pet_interface_msg.h"
|
||||
#include "server_share/r2_variables.h"
|
||||
#include "server_share/r2_vision.h"
|
||||
#include "server_share/used_continent.h"
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "variables.h"
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "nel/net/unified_network.h"
|
||||
#include "vision_delta_manager.h"
|
||||
#include "gpm_service.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
#include "world_entity.h"
|
||||
#include "sheets.h"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "stdpch.h"
|
||||
|
||||
// Nel Misc
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/file.h"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <string>
|
||||
#include <time.h>
|
||||
#include <vector>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "nel/georges/load_form.h"
|
||||
#include "nel/georges/u_form.h"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_EXECUTABLE(monitor_service WIN32 ${SRC})
|
||||
ADD_EXECUTABLE(ryzom_monitor_service WIN32 ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${RZ_SERVER_SRC_DIR} ${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(monitor_service
|
||||
TARGET_LINK_LIBRARIES(ryzom_monitor_service
|
||||
ryzom_gameshare
|
||||
${LIBXML2_LIBRARIES}
|
||||
${ZLIB_LIBRARY}
|
||||
|
@ -12,15 +12,15 @@ TARGET_LINK_LIBRARIES(monitor_service
|
|||
nelnet
|
||||
nelgeorges)
|
||||
|
||||
NL_DEFAULT_PROPS(monitor_service "Ryzom, Services: Monitor Service (MOS)")
|
||||
NL_ADD_RUNTIME_FLAGS(monitor_service)
|
||||
NL_DEFAULT_PROPS(ryzom_monitor_service "Ryzom, Services: Monitor Service (MOS)")
|
||||
NL_ADD_RUNTIME_FLAGS(ryzom_monitor_service)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(monitor_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_monitor_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
INSTALL(TARGETS monitor_service RUNTIME DESTINATION sbin COMPONENT services)
|
||||
INSTALL(TARGETS ryzom_monitor_service RUNTIME DESTINATION sbin COMPONENT services)
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <math.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"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <math.h>
|
||||
#include <time.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)
|
6130
code/tool/visual_studio_macros/autoexp_vc10.dat
Normal file
6130
code/tool/visual_studio_macros/autoexp_vc10.dat
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue