Jump to content

[C++] Isleaderonguild


steffan95
 Share

Recommended Posts

//1.) Search:

void CPythonTextTail::RenderTextTailName(TTextTail * pTextTail)

{

[......]

}

//2.) Add after:

#ifdef ENABLE_SHOW_LEADER_GUILD

std::string CPythonTextTail::IsLeaderOnGuild(std::string * strConvertGuildName)

{

/*************************************

* Date : 08.01.2017

* FileName : PythonTextTail.cpp

* TitleName : IsLeaderOnGuild

* Author : VegaS

* Description :

When you are leader on your guild will appear in front [leader].

You can and enable color on textLine when you are leader with ENABLE_SHOW_LEADER_GUILD_COLOR.

*/

#define LEADER_GUILD_COLOR "|cFFd0ffcc" //Change color from

Hidden Content

    Give reaction to this post to see the hidden content.

 

CPythonGuild::TGuildInfo & rGuildData = CPythonGuild::Instance().GetGuildInfoRef();

CPythonGuild::TGuildMemberData * pInfo;

 

const char* masterName;

const char* mainCharacterName;

std::string masterGuild;

 

if (!CPythonGuild::Instance().GetMemberDataPtrByPID(rGuildData.dwMasterPID, &pInfo))

masterName = "Noname";

 

mainCharacterName = CPythonPlayer::Instance().GetName();

masterName = pInfo->strName.c_str();

masterGuild = *strConvertGuildName;

 

if (!strcmp(mainCharacterName, masterName))

{

masterGuild.insert(0,

#ifdef ENABLE_SHOW_LEADER_GUILD_COLOR

LEADER_GUILD_COLOR

#endif

"[Leader] "

);

}

 

return masterGuild.c_str();

}

#endif

 

//1.) Search for:

strGuildName = "Noname";

//2.) Add after:

#ifdef ENABLE_SHOW_LEADER_GUILD

std::string strConvertGuildName = CPythonTextTail::Instance().IsLeaderOnGuild(&strGuildName);

#endif

 

//1.) Search for:

prGuildNameInstance->SetValue(strGuildName.c_str());

//2.) Add after:

#ifdef ENABLE_SHOW_LEADER_GUILD

prGuildNameInstance->SetValue(strConvertGuildName.c_str());

#else

prGuildNameInstance->SetValue(strGuildName.c_str());

#endif

 

//1.) Search for:

#include "PythonGuild.h"

//2.) Add after:

#ifdef ENABLE_SHOW_LEADER_GUILD

#include "PythonPlayer.h"

#endif

 

<script data-cfhash='f9e31' type="text/javascript">/* */</script>/Client/UserInterface/PythonTextTail.h

//1.) Search:

void DetachTitle(DWORD dwVID);

//2.) Add after:

#ifdef ENABLE_SHOW_LEADER_GUILD

std::string IsLeaderOnGuild(std::string * strConvertGuildName);

#endif

 

/Client/UserInterface/Locale_inc.h

//Add where you want:

#define ENABLE_SHOW_LEADER_GUILD

#define ENABLE_SHOW_LEADER_GUILD_COLOR // Enable color textLine

 

 

Source: Elitepvpers, Just4metin.

 

When you are like member in guild, will be show normally.

When you are lider, look like this:

Hidden Content

    Give reaction to this post to see the hidden content.
http://prnt.sc/du0bf1

 

Good luck

Hidden Content

    Give reaction to this post to see the hidden content.
/emoticons/[email protected] 2x" width="20" height="20" data-src="https://m2dev.net/uploads/emoticons/smile.png">

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...