Quote:
Originally Posted by rbaguasan123
Can anyone help me figure out how to add a prefix or suffix to character name without changing the actual name in database. example the character name in database is "John" and I want to add "[VIP]" to his name when he logged in. So it will look like "[VIP]John". But the database should still remain "John" and accross the server his name should still be equal to "John" only the display name above his character head will have the value "[VIP]". Hope it make sense. Thanks in advance!
|
Hey there! The most common way I've seen this handled is by using two separate table columns in your database: one for the character name and one for the VIP status (could be a level or simple flag). In your server's source code, there's probably a property on the Character / Hero class for the name. There, you can concatenate the saved name supplied by the database with a string based on their VIP status. Be careful to check for name references though, just in case there's some code either already handling that concatenation or that'd be incompatible with it. Good luck!