Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. //W pliku: UserInterface/PythonTextTail.cpp
  2. //Znajdź:
  3. void CPythonTextTail::RenderTextTailName(TTextTail * pTextTail)
  4. //Dodaj pod tą funkcją:
  5. #ifdef ENABLE_SHOW_LEADER_GUILD
  6. std::string CPythonTextTail::IsLeaderOnGuild(std::string * strConvertGuildName)
  7. {
  8. #define LEADER_GUILD_COLOR "|cFFd0ffcc"
  9.  
  10. CPythonGuild::TGuildInfo & rGuildData = CPythonGuild::Instance().GetGuildInfoRef();
  11. CPythonGuild::TGuildMemberData * pInfo;
  12.  
  13. const char* masterName;
  14. const char* mainCharacterName;
  15. std::string masterGuild;
  16.  
  17. if (!CPythonGuild::Instance().GetMemberDataPtrByPID(rGuildData.dwMasterPID, &pInfo))
  18. masterName = "Noname";
  19.  
  20. mainCharacterName = CPythonPlayer::Instance().GetName();
  21. masterName = pInfo->strName.c_str();
  22. masterGuild = *strConvertGuildName;
  23.  
  24. if (!strcmp(mainCharacterName, masterName))
  25. {
  26. masterGuild.insert(0,
  27. #ifdef ENABLE_SHOW_LEADER_GUILD_COLOR
  28. LEADER_GUILD_COLOR
  29. #endif
  30. "[Lider] "
  31. );
  32. }
  33.  
  34. return masterGuild.c_str();
  35. }
  36. #endif
  37.  
  38. //Znajdź:
  39. strGuildName = "Noname";
  40. //Dodaj pod:
  41. #ifdef ENABLE_SHOW_LEADER_GUILD
  42. std::string strConvertGuildName = CPythonTextTail::Instance().IsLeaderOnGuild(&strGuildName);
  43. #endif
  44.  
  45. //Znajdź:
  46. prGuildNameInstance->SetValue(strGuildName.c_str());
  47. //Dodaj pod:
  48. #ifdef ENABLE_SHOW_LEADER_GUILD
  49. prGuildNameInstance->SetValue(strConvertGuildName.c_str());
  50. #else
  51. prGuildNameInstance->SetValue(strGuildName.c_str());
  52. #endif
  53.  
  54. //Znajdź:
  55. #include "PythonGuild.h"
  56. //Dodaj pod:
  57. #ifdef ENABLE_SHOW_LEADER_GUILD
  58. #include "PythonPlayer.h"
  59. #endif
  60.  
  61. //W pliku: UserInterface/PythonTextTail.h
  62. //Znajdź:
  63. void DetachTitle(DWORD dwVID);
  64. //Dodaj pod:
  65. #ifdef ENABLE_SHOW_LEADER_GUILD
  66. std::string IsLeaderOnGuild(std::string * strConvertGuildName);
  67. #endif
  68.  
  69. //W pliku: UserInterface/Locale_inc.h
  70. //Dodaj:
  71. #define ENABLE_SHOW_LEADER_GUILD
  72. #define ENABLE_SHOW_LEADER_GUILD_COLOR //Kolorowy tekst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement