View Single Post
  #1  
Old 05-03-2008, 05:44 AM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default Spell names too long

There are a few spells in spells_us.txt (Titanium) which have a name of more than 31 characters. Sadly the SPDat_Spell_Struct only allocates 32 bytes for the spell name. My guess is that the player_1 field gets overwritten on spells loading (which may have no noticeable effect, I have no idea what this field is for).

I spotted this potential problem while working on the spells file to make a full table out of it. Would a developer have a look at this, and possibly enlarge the name field if it has no other nasty side effect ? I cannot answer for the last question as I lack the experience needed in the Emu server code.

Here are the beginning of the SPDat and the spell entries with names over 31 characters :

Code:
struct SPDat_Spell_Struct
{
/* 000 */	int			id;	// not used
/* 001 */	char		name[32]; // Name of the spell
/* 002 */	char		player_1[32]; // "PLAYER_1"
Code:
mysql> select spellid,name from spells where length(name) > 31;
+---------+--------------------------------------+
| spellid | name                                 |
+---------+--------------------------------------+
|    4264 | Xalirilan's Lesser Discombobulation  |
|    4266 | Xalirilan's Greater Discombobulation |
|    4267 | Wuggan's Lesser Discombobulation     |
|    4269 | Wuggan's Greater Discombobulation    |
|    4336 | Minor Reanimation Efficiency III     |
|    5256 | Unswerving Hammer of Retribution     |
|    5468 | Summon Calliav's Jeweled Bracelet    |
|    5475 | Summon Calliav's Platinum Choker     |
|    6189 | Cursed Touch of the Lightningcaller  |
+---------+--------------------------------------+
9 rows in set (0.02 sec)
Reply With Quote