From: <are...@us...> - 2008-08-27 01:20:05
|
Revision: 2121 http://planeshift.svn.sourceforge.net/planeshift/?rev=2121&view=rev Author: aresilek Date: 2008-08-27 01:20:15 +0000 (Wed, 27 Aug 2008) Log Message: ----------- - Added label colour for tester level, patch by Caarrie. - Added 'tester', 'dead' and 'alive' (normal) for /setlabelcolor, patch by Caarrie. - Made group colour override guild colour for labels. Modified Paths: -------------- trunk/data/help.xml trunk/docs/history.txt trunk/src/client/entitylabels.cpp trunk/src/server/adminmanager.cpp Modified: trunk/data/help.xml =================================================================== --- trunk/data/help.xml 2008-08-25 22:49:03 UTC (rev 2120) +++ trunk/data/help.xml 2008-08-27 01:20:15 UTC (rev 2121) @@ -612,7 +612,7 @@ <topic name="/set">/set attribute on|off Set a GM attribute on or off. Available flags are: invincible, invisible, viewall (see invisibles), nevertired, nofalldamage, infiniteinventory, questtester (bypass quest lockouts). Many of these features are enabled by default for GMs. You can also do "/set list" to view your current attributes.</topic> -<topic name="/setlabelcolor">/setlabelcolor [target] [npc|player|gm|gm1|normal] +<topic name="/setlabelcolor">/setlabelcolor [target] [npc|player|tester|gm|gm1|dead|alive|normal] Set the color of the label of target to the given value. The normal setting will again display the targets normal label color.</topic> <topic name="/setitemname">/setitemname [name] [description] Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-08-25 22:49:03 UTC (rev 2120) +++ trunk/docs/history.txt 2008-08-27 01:20:15 UTC (rev 2121) @@ -1,3 +1,9 @@ +*** 2008-08-27 by Steven Patrick +- Added label colour for tester level, patch by Caarrie. +- Added 'tester', 'dead' and 'alive' (normal) for /setlabelcolor, patch by + Caarrie. +- Made group colour override guild colour for labels. + *** 2008-08-25 by Mike Gist - Readded pawseditor, thanks to weltall. Modified: trunk/src/client/entitylabels.cpp =================================================================== --- trunk/src/client/entitylabels.cpp 2008-08-25 22:49:03 UTC (rev 2120) +++ trunk/src/client/entitylabels.cpp 2008-08-27 01:20:15 UTC (rev 2121) @@ -175,9 +175,15 @@ case -1: // NPC colour = 0x00ffff; break; + case -3: // DEAD + colour = 0xff0000; + break; default: - case 21: // GM1 or unknown group + case 10: // Tester or unknown group + colour = 0x338CA7; + break; + case 21: // GM1 colour = 0x008000; break; @@ -198,8 +204,12 @@ GEMClientActor* actor = dynamic_cast<GEMClientActor*>(object); // Grouped with have other color + bool grouped = false; if (actor && actor->IsGroupedWith(celClient->GetMainPlayer())) + { colour = 0x0080ff; + grouped = true; + } // White colour labels for invisible objects should overide all (for living objects) int flags = object->Flags(); @@ -227,8 +237,8 @@ if ( guild.Length() ) { - // If same guild, indicate with color - if (guild == guild2 && !invisible) + // If same guild, indicate with color, unless grouped or invisible + if (guild == guild2 && !invisible && !grouped) colour = 0xf6dfa6; guildRow.text = "<" + guild + ">"; Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2008-08-25 22:49:03 UTC (rev 2120) +++ trunk/src/server/adminmanager.cpp 2008-08-27 01:20:15 UTC (rev 2121) @@ -2079,10 +2079,14 @@ return; } - if (data.setting == "normal") + if (data.setting == "normal" || data.setting == "alive") { mask = subject->GetSecurityLevel(); } + else if (data.setting == "dead") + { + mask = -3; + } else if (data.setting == "npc") { mask = -1; @@ -2091,6 +2095,10 @@ { mask = 0; } + else if (data.setting == "tester") + { + mask = 10; + } else if (data.setting == "gm1") { mask = 21; @@ -2102,7 +2110,7 @@ else { psserver->SendSystemInfo(me->clientnum, - "Correct syntax is: \"/setlabelcolor [target] [npc|player|gm1|gm|normal]\""); + "Correct syntax is: \"/setlabelcolor [target] [npc|player|tester|gm1|gm|dead|alive|normal]\""); return; } subject->SetMasqueradeLevel(mask); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |