Merge fixes from core

feature/core4-atys
kaetemi 3 years ago
parent 97c7f85aed
commit c12f83d36d
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -26,6 +26,9 @@
namespace CHARACTERISTICS
{
enum TCharacteristics
#ifdef NL_CPP14
: uint8
#endif
{
constitution = 0, //HP max
metabolism, //Hp Regen

@ -25,6 +25,9 @@ namespace ITEMFAMILY
{
// Mode
enum EItemFamily
#ifdef NL_CPP14
: uint8
#endif
{
UNDEFINED = 0,
SERVICE,

@ -26,6 +26,9 @@
namespace ITEM_ORIGIN
{
enum EItemOrigin
#ifdef NL_CPP14
: uint8
#endif
{
COMMON = 0,
FYROS,

@ -26,6 +26,9 @@ namespace ITEM_TYPE
// Mode
// nb : sell filter uses two 64b database values to build a bitfield, so the item type limit is 128 for now
enum TItemType
#ifdef NL_CPP14
: uint8
#endif
{
DAGGER,
SWORD,

@ -2618,7 +2618,7 @@ CNpcSerializer::CNpcSerializer()
static const char* optionalProp[] = { "GabaritHeight", "GabaritTorsoWidth","GabaritArmsWidth", "GabaritLegsWidth", "GabaritBreastSize",
"HairType", "HairColor", "Tattoo", "EyesColor", "MorphTarget1", "MorphTarget2", "MorphTarget3", "MorphTarget4", "MorphTarget5",
"MorphTarget6", "MorphTarget7", "MorphTarget8", "Sex", "JacketModel", "TrouserModel", "FeetModel", "HandsModel", "ArmModel",
"WeaponRightHand", "WeaponLeftHand", "JacketColor", "ArmColor", "HandsColor", "TrouserColor", "FeetColor", "Function","Level",
"WeaponRightHand", "WeaponLeftHand", "JacketColor", "ArmColor", "HandsColor", "TrouserColor", "FeetColor", "Function",
"Profile", "Speed", "Aggro", "PlayerAttackable", "BotAttackable" };
_ClassName = "Npc";
@ -2654,7 +2654,7 @@ CNpcCustomSerializer::CNpcCustomSerializer()
"MorphTarget6", "MorphTarget7", "MorphTarget8", "JacketModel", "TrouserModel", "FeetModel", "HandsModel", "ArmModel",
"JacketColor", "ArmColor", "HandsColor", "TrouserColor", "FeetColor" };
static const char* optionalProp[] = {
"Name", "Profile", "Speed", "Aggro", "PlayerAttackable", "BotAttackable", "Function", "Level", "WeaponRightHand", "WeaponLeftHand", "Sex" };
"Name", "Profile", "Speed", "Aggro", "PlayerAttackable", "BotAttackable", "Function", "WeaponRightHand", "WeaponLeftHand", "Sex" };
_ClassName = "NpcCustom";
_Type = ObjectTableNpcCustom;

@ -41,7 +41,7 @@
#include "nel/net/login_cookie.h"
#include "../../nelns/welcome_service/welcome_service_itf.h"
#include "game_share/welcome_service_itf.h"
#include "game_share/character_sync_itf.h"
@ -2527,7 +2527,7 @@ namespace RSMGR
{
H_AUTO(invokeResult_invokeResult);
#ifdef NL_DEBUG
nldebug("CRingSessionManagerWeb::invokeResult called");
nldebug("CRingSessionManagerWeb::invokeResult called (%s)", resultString.c_str());
#endif
NLNET::CMessage message("RET");
nlWrite(message, serial, userId);

@ -1,10 +1,10 @@
<generator header_tag="RING_SESSION_MANAGER_ITF">
<include file="nel/misc/entity_id.h"/>
<include file="r2_share/r2_basic_types.h"/>
<include file="r2_share/r2_share_itf.h"/>
<include file="game_share/r2_basic_types.h"/>
<include file="game_share/r2_share_itf.h"/>
<include file="nel/net/login_cookie.h"/>
<include file="../../nelns/welcome_service/welcome_service_itf.h"/>
<include file="game_share/welcome_service_itf.h"/>
<include file="game_share/character_sync_itf.h"/>
<include file="game_share/security_check.h"/>
<cpp-include file="stdpch.h"/>

@ -111,7 +111,7 @@ CObject *CScenario::find(const std::string& instanceId, const std::string & attr
CObject *src = _InstanceMap->find(instanceId);
if (!src)
{
nlwarning("Can't find object with id %s", instanceId.c_str());
nlwarning("Can't find object with id '%s' (looking for attribute '%s[%d]' or '...[%s]')", instanceId.c_str(), attrName.c_str(), (int)position, key.c_str());
return NULL;
}
if (!attrName.empty())

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// Copyright (C) 2019-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@ -1811,7 +1811,7 @@ bool CServerAnimationModule::translateActToPrimitive(CInstanceMap& components, C
CObject* tree = act->getAttr("UserTriggers");
if (!tree || !tree->isTable())
{
nlwarning("R2An: Data corrupted");
nlwarning("R2An: Data corrupted: UserTriggers missing");
return false;
}
uint32 lastnode = tree->getSize();
@ -1824,7 +1824,7 @@ bool CServerAnimationModule::translateActToPrimitive(CInstanceMap& components, C
|| !node->isString("Name")
|| !node->isString("Grp") )
{
nlwarning("R2An: Data corrupted");
nlwarning("R2An: Data corrupted: Invalid UserTrigger");
return false;
}
@ -1902,7 +1902,7 @@ bool CServerAnimationModule::doMakeAnimationSession(CAnimationSession* animSessi
CObject* plotItems = rtScenario->getAttr("PlotItems");
if (!plotItems || !plotItems->isTable())
{
nlwarning("R2An: Data corrupted:session '%u'",sessionId.asInt());
nlwarning("R2An: Data corrupted:session '%u': missing PlotItems",sessionId.asInt());
return false;
}
@ -1919,7 +1919,7 @@ bool CServerAnimationModule::doMakeAnimationSession(CAnimationSession* animSessi
|| !plotItem->isString("Comment")
)
{
nlwarning("R2An: Data corrupted:session '%u'",sessionId.asInt());
nlwarning("R2An: Data corrupted:session '%u': Invalid PlotItem",sessionId.asInt());
return false;
}
@ -1960,7 +1960,7 @@ bool CServerAnimationModule::doMakeAnimationSession(CAnimationSession* animSessi
CObject* locations = rtScenario->getAttr("Locations");
if (!locations || !locations->isTable())
{
nlwarning("R2An: Data corrupted");
nlwarning("R2An: Data corrupted: Missing Locations");
return false;
}
uint32 lastLocation = locations->getSize();
@ -1976,7 +1976,7 @@ bool CServerAnimationModule::doMakeAnimationSession(CAnimationSession* animSessi
)
{
nlwarning("R2An: Data corrupted:session '%u'",sessionId.asInt());
nlwarning("R2An: Data corrupted:session '%u': Invalid Location",sessionId.asInt());
return false;
}
@ -2013,7 +2013,7 @@ bool CServerAnimationModule::doMakeAnimationSession(CAnimationSession* animSessi
bool ok = translateActToPrimitive(components, animSession, act, firstAct, primDocs[firstAct] ); //TODO
if (!ok)
{
nlwarning("R2An: Data corrupted:session '%u'",sessionId.asInt());
nlwarning("R2An: Data corrupted:session '%u': Failed Act translation",sessionId.asInt());
return false;
}
}

@ -27,6 +27,9 @@
namespace SKILLS
{
enum ESkills
#ifdef NL_CPP14
: uint8
#endif
{
SC = 0,
SCA,

@ -60,6 +60,17 @@ inline ucstring capitalize(const ucstring & s)
return ucstring::makeFromUtf8(capitalize(s.toUtf8()));
}
inline std::string capitalizeFirst(const std::string &s)
{
if (s.empty())
return s;
std::string res;
res.reserve(4);
ptrdiff_t i = 0;
NLMISC::appendToUpper(res, s, i);
return res + s.substr(i);
}
//-------------------------------------------------------------------------------------------------
// HANDY MACROS - For forcing the pre-preprocessor to evaluate concatenation operations nicely

Loading…
Cancel
Save