
Spell Extensions being added continously
-
link2009
- Retired
- Posts: 390
- Joined: Fri Aug 10, 2007 5:59 pm
- Location: POrTal
- Contact:
Spell Extensions being added continously
I know having a staircase of Sprint.lua is cool, but...



-Vecinu de la Patru
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Code: Select all
LuaSpell* lua_spell = lua_interface->GetSpell((char*)spell->GetSpellData()->lua_script.c_str());
if(!lua_spell){
lua_spell = lua_interface->GetSpell((char*)spell->GetSpellData()->lua_script.append(".lua").c_str());
if(!lua_spell)
return;
}-
link2009
- Retired
- Posts: 390
- Joined: Fri Aug 10, 2007 5:59 pm
- Location: POrTal
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
That's not what he's saying. The code is a catch for someone who, in their DB, simply puts "Sprint" and not "Sprint.lua". If in the first case, the server goes to find a file named "Sprint" and cannot find it, the code appends ".lua" to the end of what is in the database in order to attempt to find the proper file name (which should be "Sprint.lua").
Why you are getting repeated appends is a good question, unless it is somehow "remembering" the previous lua_spell setting and still cannot find "Sprint" thus keeps appending over and over.
Maybe "lua_spell" needs to get cleared before being called again?
Why you are getting repeated appends is a good question, unless it is somehow "remembering" the previous lua_spell setting and still cannot find "Sprint" thus keeps appending over and over.
Maybe "lua_spell" needs to get cleared before being called again?
-
chrrox
- Content Designer
- Posts: 177
- Joined: Wed Oct 17, 2007 8:12 pm
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
-
link2009
- Retired
- Posts: 390
- Joined: Fri Aug 10, 2007 5:59 pm
- Location: POrTal
- Contact:
Who is online
Users browsing this forum: No registered users and 0 guests

