Page 1 of 1

Bald hairstyle name fix during the character creation

Posted: 19 Jan 2013, 23:32
by Reid
The Bald hairstyle is displayed as "Unknown Item" for a long time now, it's now possible to fix this bug with the recent add of the charcreation's manaplus file in the clientdata.
The problem is that there is simply no Bald hairstyle in the items.xml, the actual "Bald hairstyle" is just the use of a missing and wrong ID (i.e.: The client check for ID "0-19", but the 0 is a wrong ID.)

Here a patch for this problem:

Code: Select all

From 16eab811ca0bbac839055dfd061f47d48ce62a3a Mon Sep 17 00:00:00 2001
From: Reid Yaro <reidyaro@gmail.com>
Date: Sat, 19 Jan 2013 21:18:27 +0000
Subject: [PATCH] Correct "Unknown item" for Bald hairstyle.

---
 charcreation.xml |    2 +-
 items.xml        |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/charcreation.xml b/charcreation.xml
index c9b6bd7..13dd555 100644
--- a/charcreation.xml
+++ b/charcreation.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <chars>
     <haircolor min="0" max="11" />
-    <hairstyle min="0" max="19" />
+    <hairstyle min="1" max="20" />
     <stat min="1" max="9" sum="30" />
     <item id="1202"/>
     <item id="881"/>
diff --git a/items.xml b/items.xml
index fb43c6e..189587a 100644
--- a/items.xml
+++ b/items.xml
@@ -69,6 +69,8 @@
     <item id="-19" type="hairsprite" name="Long and Clipped">
         <sprite>hairstyles/hairstyle19.xml</sprite>
     </item>
+    <item id="-20" type="hairsprite" name="Bald">
+    </item>
 
     <!-- Treating the base sprite as equipment too will be useful when we
          implement other playable races -->
-- 
1.7.10.4
I added a new hairstyle ID, which will be used to be a real Bald hairstyle.
I also changed the hairstyle min and max number, to use hairstyle from the ID 1 to 20, it so requier a server limit fix, I don't know how to do it so I let you deal with this.

Re: Bald hairstyle name fix during the character creation

Posted: 20 Jan 2013, 00:02
by o11c
There's nothing wrong on the server side. If the client can't parse a hair ID of 0 due to its negative id scheme, that's its problem.

Any changing of server limits should be deferred until we decide what we actually want to do. I would like to get rid of the hard-coded maxima, but still allow the possibility of hair that can only be released via scripts (such as shock white)

Re: Bald hairstyle name fix during the character creation

Posted: 20 Jan 2013, 23:07
by Reid
o11c wrote:There's nothing wrong on the server side. If the client can't parse a hair ID of 0 due to its negative id scheme, that's its problem.

Any changing of server limits should be deferred until we decide what we actually want to do. I would like to get rid of the hard-coded maxima, but still allow the possibility of hair that can only be released via scripts (such as shock white)
Then you'll probably keep this "Unknown item" name again for a long time. :)