Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   Default player.communityname value (https://forums.graalonline.com/forums/showthread.php?t=134258081)

xXziroXx 02-19-2010 04:15 PM

Default player.communityname value
 
When new accounts are made, their communityname variable equals to ""/NULL/0 (etc.) which breaks quite a lot of scripts. Example accounts: Graal750231, Graal750233

My request is that all accounts have their player.account as player.communityname UNTIL they chose a community name of their own. This would stop it from showing as "" >_<

Pre-Graal###### accounts (such as xXziroXx) have their player.account match player.communityname, so that's no a problem.

fowlplay4 02-19-2010 06:31 PM

Indeed, but until then...

Workaround:

PHP Code:

function getName(obj) {
  return (
obj.communityname obj.communityname obj.account);



cbk1994 02-19-2010 11:53 PM

Agreed, I think it's supposed to be like that anyhow. I tend to use this in player classes:

PHP Code:

public function niceName() {
  return ((
this.communityname == null || this.communityname == "guest") ? this.account this.communityname);



WhiteDragon 02-20-2010 12:46 AM

The idea is that community name is actually suppose to be treated as a semi-permanent nickname. In order, it'd be account (permanent), community name (semi-permanent), nickname (mutable).

So, in my opinion (just thinking about this right now really), things should behave something like this:
  • All data should be stored by account name, because you have the guarantee that it will never change.
  • Important references to the player should be by community name (or the hybrids introduced in the last two posts), because you have the guarantee that it is unique at that specific point in time. e.g., "xyz said: whatever", or "xyz joined the CTF game".
  • Any colloquial references to the player can be by nickname. e.g., "Congrats Big Fat Joe you just earned 30g for smashing the pumpkin head!"


Overall, community name was a bit stupid and probably should have not been introduced.


All times are GMT +2. The time now is 06:54 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.