Jump to content
×
×
  • Create New...
  • 0

Where do i find Guild Chat in source?


Shahin

Question

4 answers to this question

Recommended Posts

  • 1
  • Moderator

Search for:

		case CHAT_TYPE_GUILD:
			{
				if (!ch->GetGuild())
					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("길드에 가입하지 않았습니다."));
				else
					ch->GetGuild()->Chat(chatbuf);
			}
			break;

Replace with:

Hidden Content

    Give reaction to this post to see the hidden content.

 

 

Edited by VegaS™
  • Love 7
Link to comment
Share on other sites

  • 1

By searching into the source server, i ve found where the chat packet is received from the player, and sent to the guild members.

int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes)

here is where it is adding the name of the player to the chat text before to send it to guild members.
You might not find the chat color system part.
 


	char chatbuf[CHAT_MAX_LEN + 1];
#ifdef ENABLE_CHAT_COLOR_SYSTEM
	// static const char* colorbuf[] = {" |h|r[ãÑÇÞÈ]|cFFffa200|h", " |h|r[ÔíäÓæ]|cFFff0000|h", " |h|r[ÔæäÌæ]|cFFffc700|h", " |h|r[Ìíäæ]|cFF000bff|h"}; // Arab
	static const char* colorbuf[] = {"|cFFffa200|H|h[Staff]|h|r", "|cFFff0000|H|h[Shinsoo]|h|r", "|cFFffc700|H|h[Chunjo]|h|r", "|cFF000bff|H|h[Jinno]|h|r"};
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s", (ch->IsGM()?colorbuf[0]:colorbuf[MINMAX(0, ch->GetEmpire(), 3)]), ch->GetName(), buf);
#else
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
#endif

 

Warning : Here it is adding the name of the character independently on the chat type, so take care of check the type of chat before to add the level of the player (if you really want to add it only on guild chat).

  • Love 1

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

  • 0

Thank you for your feedback, but i have an issue..

 

I have changed only the line below (as you pointed) in input_main.cpp and here is the Outcome:

int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);

b2d875eebc2ec9cdcde69f540b374762.png

 

The guild chat Layout is the same as normal chat layout... The Guild char % is copying the normal chat layout... 

Is there a way to modify only GUILD CHAT ? 

 

I want to see only the guild chat with that layout, normal chat being default as usual..

Link to comment
Share on other sites

  • 0
On 10/27/2020 at 1:11 PM, Ikarus_ said:

Warning : Here it is adding the name of the character independently on the chat type, so take care of check the type of chat before to add the level of the player (if you really want to add it only on guild chat).

As you can see here, i ve explained you right here to warn you about your issue kek

You may just add a if else like this:

 

if (CHAT_TYPE_GUILD == pinfo->type)
{
	// do stuff for guild chat
}

else
{
	// do stuff as default
}

 

 

  • Love 1

My youtube channel  on which you can see my works here

Link to comment
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


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.