mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Add explanatory message re: PrivacyState workaround.
This commit is contained in:
@@ -69,13 +69,21 @@ public enum PrivacyState {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Horrible workarounds are required here because public chat supports ON, HIDE, FRIENDS, and OFF, but trade and
|
||||
* private only support ON, FRIENDS, and OFF.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Converts this privacy state to an integer.
|
||||
*
|
||||
* @return The numerical value used by the client.
|
||||
*/
|
||||
public int toInteger(boolean chat) {
|
||||
return chat ? value : (value == 0 ? 0 : value - 1);
|
||||
if (chat) {
|
||||
return value;
|
||||
}
|
||||
return value == 0 ? 0 : value - 1;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user