Passive Spells
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Passive Spells
I have just submitted very basic work for passive spells. It adds 2 functions to player.cpp, AddPassiveSpell(int32 id, int8 tier) and ApplyPassiveSpells(). When ever a new sepll is added to the player AddPassiveSpell gets called if the spell is a passive spell (type/spell_book_type = 4) and will apply the spell right away. ApplyPassiveSpells should only be called after zoning is complete and it will apply all the passive spells at once.
With my limited time I was not able to test this as much as I would have liked so more tests, mainly with multiple passives, need to be done. Also there is no way to remove the effects of a passive spells while in a zone, they will be removed upon zoning if you removed the spell from the player.
With my limited time I was not able to test this as much as I would have liked so more tests, mainly with multiple passives, need to be done. Also there is no way to remove the effects of a passive spells while in a zone, they will be removed upon zoning if you removed the spell from the player.
- alfa
- Team Member
- Posts: 550
- Joined: Fri Jul 27, 2007 6:24 pm
- Location: France
- Contact:
Re: Passive Spells
Spell couldown or count handle atm ?
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Passive Spells
My main concern is that it tries to cast all the passive spells at once, while passive spells are instant I am not sure if all spells will be processed when there is a large amount of them. Only had time to setup and test with 1 spell.
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Passive Spells
Very Nice...At least we have a starting point Jabantiz 
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Passive Spells
Excellent work, Jabantiz. We'll get this tested for you soon as possible. I have some time tonight, trying to finish up my own 1/2 done code like logon_equipment and some work on the Packet Analyzer. Hopefully my phone stops ringing for 2 f'n seconds so I can stay focused.
Crikey, it sucks being so popular
lol 
Crikey, it sucks being so popular
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Passive Spells
I was able to build a couple of test LUA scripts to apply when my Human Guardian logs in, and from what I see, it works... even through zoning.
Slashing and Defense were both 5/5 before the AddSkillBonus was applied via the passive spells. Now I am not too sure of the values, as I passed "5" as data into the LUA, so not really sure why it ended up 15/10, but the data is changing, and they are indeed "passive" so I am happy
Well done, Jabantiz.
Slashing and Defense were both 5/5 before the AddSkillBonus was applied via the passive spells. Now I am not too sure of the values, as I passed "5" as data into the LUA, so not really sure why it ended up 15/10, but the data is changing, and they are indeed "passive" so I am happy
Well done, Jabantiz.
You do not have the required permissions to view the files attached to this post.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Passive Spells
That is interesting results, all I do is call the normal zoneserver->ProcessSpell to apply the spells, so not sure why the values are so off. The passives could be cast multiple times but not sure how that would happen.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Passive Spells
It's likely that I used something unreasonable to test with. I didn't use just "buff str" or something simple. And we have no providers for setting recast of "Call of City" spells faster by 10s etc. There's a ton of C++ that is needed to support all these new Passives, but at least now we can put the traits data on the updater 
- alfa
- Team Member
- Posts: 550
- Joined: Fri Jul 27, 2007 6:24 pm
- Location: France
- Contact:
Re: Passive Spells
Should be 15/15 display in greenJohn Adams wrote:as data into the LUA, so not really sure why it ended up 15/10
Anyway, good work
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Passive Spells
alfa, this player was 5/5 before I applied the trait. That's why I didn't think 15 was correct since I only added 5.
- alfa
- Team Member
- Posts: 550
- Joined: Fri Jul 27, 2007 6:24 pm
- Location: France
- Contact:
Re: Passive Spells
Woups :pJohn Adams wrote:alfa, this player was 5/5 before I applied the trait. That's why I didn't think 15 was correct since I only added 5.
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Passive Spells
Zcoretri was able to verify what I was affraid of, more then 2 passive spells and they all didn't get applied. I was able to fix this issue by bypassing the spell queue so all passives are applied right away. I did quick tests with 4 passive spells and it all seems to work correctly now.
Another bug that John and I found was on revive passive spells were applied a second time (the original cast persists through death), and I just noticed tonight that on ld, if you beat the ld timer back passives were applied 2 more times. I believe I have fixed all these issues but more testing would be appreciated. All fixes are on dev svn.
Another bug that John and I found was on revive passive spells were applied a second time (the original cast persists through death), and I just noticed tonight that on ld, if you beat the ld timer back passives were applied 2 more times. I believe I have fixed all these issues but more testing would be appreciated. All fixes are on dev svn.
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Passive Spells
Thanks Jabantiz. Only test so far that I have done is log in...all passives were applied...nice work once again 
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Passive Spells
Added the ability for passive spell effects to be removed (calls the lua remove function for the spell) without zoning. Just remove the spell from the player like you normally would (RemoveSpellBookEntry()), I also added a RemoveAllPassives() to remove all the passive spells the player currently has.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Passive Spells
Cannot compile on Windows 7 x64 -
Code:
How did "find()" work for you, and not me? I thought it needed an object or something before it ({something}.find, for example)?
Code: Select all
1>..\..\source\WorldServer\Player.cpp(3420): error C3861: 'find': identifier not foundCode: Select all
void Player::RemovePassive(int32 id, int8 tier, bool remove_from_list)
{
Spell* spell = 0;
spell = master_spell_list.GetSpell(id, tier);
if (spell) {
SpellProcess* spellProcess = 0;
spellProcess = GetZone()->GetSpellProcess();
spellProcess->CastPassives(spell, this, true);
if (remove_from_list) {
vector<int32>::iterator remove;
remove = find(passive_spells.begin(), passive_spells.end(), id);
if (remove != passive_spells.end())
passive_spells.erase(remove);
}
}
}Who is online
Users browsing this forum: No registered users and 1 guest