Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate *getunitname script command #2395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnnieRuru
Copy link
Contributor

After I give it some thought, I think better split the *getunitname deprecation out from #2391


Pull Request Prelude

Issues addressed

we have 2 script command do the same thing, *rid2name and *getunitname

Changes Proposed

deprecate *getunitname because rid2name has been exist since eathena times
also minor fix rid2name to support elementals

Affected Branches

  • Master

Known Issues and TODO List

we have to decide which one to deprecate,
better don't have 2 script commands do exact same thing again, like this #2089

- fix rid2name to support elementals
- use rid2name because this one exist longer ...
@HerculesWSAPI
Copy link
Contributor

This change is Reviewable

@AnnieRuru AnnieRuru added status:inprogress Issue is being worked on / the pull request is still a WIP component:core:scriptengine Affecting the script engine or the script commands labels Feb 27, 2019
@bWolfie
Copy link
Contributor

bWolfie commented Feb 28, 2019

getunit... commands would be more consistent in documentation, as there are many commands of that name and they can be grouped together.

Plus we already set the precedent by deprecating *specialeffect2() which was used in many official scripts. Not exactly the same situation, but similar.

@Emistry Emistry added the component:documentation Affecting the documentation in the doc/ folder label Feb 28, 2019
@Asheraf
Copy link
Contributor

Asheraf commented Mar 2, 2019

I don't feel deprecating getunitname() is a good idea, It's more popular than rid2name() and consistent with the other data retrieval commands.

@AnnieRuru
Copy link
Contributor Author

AnnieRuru commented Mar 2, 2019

..... I was lost in making getmercinfo/getpetinfo/gethominfo/geteleminfo,

actually I want to keep both

getunitname will be real time name, and rid2name will be database name

example 1.
if player having @fakename,
getunitname will display fakename
rid2name will display real character name

example 2
monster("this", -1,-1,"BOSSS",PORING,1)
getunitname will display BOSSS
rid2name will display Poring

I read through the source code and found getunitname call the function status_get_name,
which was use in clif ..... to display in client-side

.... another thing worth mention
DO NOT use getnameditem Knife, getunitname(getcharid(CHAR_ID_ACCOUNT));
because if the player under @fakename,
*getunitname script command will return fakename of the character
has to use rid2name

..... ok go back complete my getpetinfo script command ....
scrap this one, redo the above
https://github.com/AnnieRuru/customs/blob/master/plugin/rid2name.diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core:scriptengine Affecting the script engine or the script commands component:documentation Affecting the documentation in the doc/ folder status:inprogress Issue is being worked on / the pull request is still a WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants