AA Spell Mods
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
AA Spell Mods
This was just an idea I had of how to implement spell mods. I would like to start off by saying this is just an idea, haven't looked to deeply into it and all feedback is welcome, even if it is a completely diffrent way to do it. Also I have no plans to implement this myself any time soon, just brainstorming right now, so any one else can feel free to do it.
The idea is basically to add a map<> to the player class, something like map<int, vector<spellmods>> where int is the spell id to be modified and the vector (probably of a struct) to store the various mods for that spell. When a spell is examined or cast it would then need to check this map for the player casting/examining and make the modifications.
Assuming AA's that modify spells will be treated as passive spells then a lua function will need to be added to insert data into the new map and nothing will need to be stored in the DB.
The idea is basically to add a map<> to the player class, something like map<int, vector<spellmods>> where int is the spell id to be modified and the vector (probably of a struct) to store the various mods for that spell. When a spell is examined or cast it would then need to check this map for the player casting/examining and make the modifications.
Assuming AA's that modify spells will be treated as passive spells then a lua function will need to be added to insert data into the new map and nothing will need to be stored in the DB.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: AA Spell Mods
Thanks, Jabantiz. I'll wait for Scatman to be online tomorrow (Sun) and see what he thinks. I think this (passive spells and AA) might be our starting 0.7.1 list. Woot!
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: AA Spell Mods
It's been a while, but isn't this how we handle spells now? It can probably just be added to the existing logic, just tweaked a bit?
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: AA Spell Mods
I thought it only stored a spell id and tier and then looked it up in the master_spell_list, wich being a global list cant make mods to the spells. Also won't we have to go through the entire player spell list to find the mods every time the player uses a spell or examines it?
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: AA Spell Mods
Well for spell effects I think each player has a map, similar to what you mentioned.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: AA Spell Mods
I found the spell effect stuff you were refering to, it is just an array of SpellEffects, wich that will work but what I noticed is the array size is hardcoded
I am not sure what else uses this array but will 45 be enough? I know AA's, items, and some spells can modify various aspects of a spell, plus whatever else that this array is already used for. Is 45 a client restriction or can we cahnge that to make it work? Also it looks like the function for this array were never finished, like the following
Didn't check the rest of them though.
Code: Select all
SpellEffects spell_effects[45];Code: Select all
bool Player::HasActiveSpellEffect(Spell* spell, Spawn* target){
return false;
}- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: AA Spell Mods
Yeah I think it's a limit on how the character sheet is setup. I believe it always sends an array of 45 spell effects but zeroes out the elements if a spell effect doesn't exist in that slot. So maybe using that wouldn't be the best idea.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: AA Spell Mods
Is "45" the max number of spell effects the client can display? Maybe that's why it is hard-coded.
I'm beginning to suspect we'll be building a whole new structure to hold this data and reference it.
I'm beginning to suspect we'll be building a whole new structure to hold this data and reference it.
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: AA Spell Mods
Yes, 45 is the max number of spell effects that the client can display. 45 for Maintained effects and 30 for detrimental effects.John Adams wrote:Is "45" the max number of spell effects the client can display? Maybe that's why it is hard-coded.
I'm beginning to suspect we'll be building a whole new structure to hold this data and reference it.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: AA Spell Mods
From the character sheet. This is what I meant when I said 45 effects and detrimental effects are always sent:Zcoretri wrote:Yes, 45 is the max number of spell effects that the client can display. 45 for Maintained effects and 30 for detrimental effects.John Adams wrote:Is "45" the max number of spell effects the client can display? Maybe that's why it is hard-coded.
I'm beginning to suspect we'll be building a whole new structure to hold this data and reference it.
Code: Select all
<Data ElementName="detrimental_spell_effects" Substruct="Substruct_SpellEffects" Size="45" />
<Data ElementName="maintained_effects" Substruct="Substruct_MaintainedEffects" Size="45" />Who is online
Users browsing this forum: No registered users and 0 guests