Merge branch 'yubo' into ryzom/deepl

ryzom/deepl
Ulukyn 4 years ago
commit c1e8418ed2

@ -565,6 +565,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
LUABIND_FUNC(isDynStringAvailable),
LUABIND_FUNC(isFullyPatched),
LUABIND_FUNC(getSheetType),
LUABIND_FUNC(getSheetShape),
LUABIND_FUNC(getSheetFamily),
LUABIND_FUNC(getSheetName),
LUABIND_FUNC(getFameIndex),
@ -3469,6 +3470,30 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet)
return CEntitySheet::typeToString(sheetPtr->Type);
}
// ***************************************************************************
std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet)
{
//H_AUTO(Lua_CLuaIHM_getSheetType)
const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet));
if (!sheetPtr)
return "";
if (sheetPtr->type() == CEntitySheet::ITEM)
{
CItemSheet *sheet = (CItemSheet*)sheetPtr;
return sheet->getShape();
}
else if (sheetPtr->type() == CEntitySheet::FAUNA)
{
CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr);
return sheet->Body.getItem();
}
return "";
}
// ***************************************************************************
std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)

@ -204,6 +204,7 @@ private:
static bool isDynStringAvailable(sint32 dynStringId);
static bool isFullyPatched();
static std::string getSheetType(const std::string &sheet);
static std::string getSheetShape(const std::string &sheet);
static std::string getSheetFamily(const std::string &sheet);
static std::string getSheetName(uint32 sheetId);
static sint32 getFameIndex(const std::string &factionName);

@ -147,6 +147,7 @@ extern bool CharNameValidArrived;
extern bool CharNameValid;
bool IsInRingSession = false;
TSessionId HighestMainlandSessionId; // highest in the position stack
ucstring lastUniversMessage;
extern const char *CDBBankNames[INVALID_CDB_BANK+1];
@ -770,7 +771,11 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
}
else if (mode == CChatGroup::universe)
{
PeopleInterraction.ChatInput.Universe.displayMessage(finalString, col, 2, &windowVisible);
if (lastUniversMessage != finalString)
{
PeopleInterraction.ChatInput.Universe.displayMessage(finalString, col, 2, &windowVisible);
lastUniversMessage = finalString;
}
}
else if (mode == CChatGroup::dyn_chat)
{

@ -750,7 +750,7 @@ restartLoop:
// if the string contains a special rename of creature, remove it
if (str.size() > 2 && str[0] == '<' && str[1] == '#')
{
str = str.substr(2);
str = toUpper(str[2])+str.substr(3);
}
// append this string

Loading…
Cancel
Save