Jump to content
Sign in to follow this  
steffan95

[C++] Isleaderonguild

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 Please login or register to see this link.

 

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

 

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link. Please login or register to see this link. Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link.

Please login or register to see this link. Please login or register to see this link. Please login or register to see this image. /emoticons/[email protected] 2x" width="20" height="20" data-src="https://tlthings.net/uploads/emoticons/smile.png">

  • Upvote 2

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
You will be able to see content when you disable your adblocker and enable javascript.