Jump to content

Messenger List via pid instead of name


Recommended Posts

  • Forum Moderator
On 2/29/2020 at 12:56 PM, iFreakTime~.~ said:

And if i change my name directly from navicat? I think is better using pid instead of name

There's no reason to use pids instead of names, for doing that you've to re-code the whole structure of the system.

Ymir did when you change your name to delete all fields from table that match with the old name (account or companion).

So in this case, instead of deleting the whole list you can simply update it.

  • Srcs/Server/game/src/questlua_pc.cpp

 

This is the hidden content, please

Or:

		std::auto_ptr<SQLMsg> pUpdate(DBManager::instance().DirectQuery(
			"UPDATE messenger_list SET "
			"account = CASE WHEN account = '%s' THEN '%s' ELSE account END, "
			"companion = CASE WHEN companion = '%s' THEN '%s' ELSE companion END", 
				ch->GetName(), szName, ch->GetName(), szName);

 

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

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.