Page 2 of 3
Re: Passive Spells
Posted: Tue Aug 07, 2012 2:54 pm
by Jabantiz
That is
std::find() I didn't add anything extra to my source so no clue why it worked for me and not you...
Only thing I can think of is to add
but I didn't have to add that on my end...
Re: Passive Spells
Posted: Tue Aug 07, 2012 4:15 pm
by John Adams
Let's see if anyone else has issues compiling before we add another include.
Every other example of "find(" I searched for in our code has some object or reference in front of it in which to search through.
Re: Passive Spells
Posted: Tue Aug 07, 2012 4:47 pm
by Jabantiz
This is a diffrent find(), it just saves me the trouble of writing out
Code: Select all
for (iterate through the vector) {
if (this is what i need) {
remove = iterator;
break;
}
}
Re: Passive Spells
Posted: Tue Aug 07, 2012 5:04 pm
by John Adams
Hmm, more curious how we can have the exact same project and files, but yours compiles and mine does not. fwiw, I added the #include <algorithm> and of course, it compiles fine now. Still waiting to see if anyone else can try it, but I guess if that's the fix, that's the fix.
Hope Linux doesn't break, too.
Re: Passive Spells
Posted: Tue Aug 07, 2012 5:41 pm
by Zcoretri
John Adams wrote:Let's see if anyone else has issues compiling before we add another include.
Every other example of "find(" I searched for in our code has some object or reference in front of it in which to search through.
Grabbed code off SVN and had compile error
Code: Select all
error C3861: 'find': identifier not found
Re: Passive Spells
Posted: Tue Aug 07, 2012 5:51 pm
by Jabantiz
I use VS 2012 beta, it must include some of the files on its own, no other idea on why I seem to be the only one that doesn't need to add the include.
Re: Passive Spells
Posted: Tue Aug 07, 2012 5:53 pm
by Zcoretri
I'm using VS 2010, same as John I think.
Is that function in the std namespace?
Re: Passive Spells
Posted: Tue Aug 07, 2012 6:12 pm
by Jabantiz
yes, from the link above
Code: Select all
Requirements
--------------------------------------------------------------------------------
Header: <algorithm>
Namespace: std
so I can add the include, or if we don't want more includes I can rewrite it.
Re: Passive Spells
Posted: Tue Aug 07, 2012 7:51 pm
by Jabantiz
I added the include for now so the source compiles, will remove it and rewrite that code if needed.
I also fixed the blinking and shaded icons when applying passives. Also added a DeleteCharacterSpell() to worlddatabse to remove a spell from character_spells table. I only use this in the passive code, wasn't sure if we should use that in RemoveSpellBookEntry().
All code is on dev svn.
Re: Passive Spells
Posted: Wed Oct 10, 2012 5:34 pm
by John Adams
Last one. Passive Spells (except for the Data?) are 100% coded?
ProjMan: Passive Spells
Thanks.
Re: Passive Spells
Posted: Wed Oct 10, 2012 6:06 pm
by Jabantiz
There is a issue with icon shading that I can't track down, it is cosmetic though and everything still functions properly. Other then that bug I believe everything needed for passives has been coded.
Re: Passive Spells
Posted: Wed Oct 10, 2012 6:22 pm
by John Adams
Cool. When Zcoretri and I get a moment, I'd like to sort out this data (the whole, going into combat on passive apply) and mark this one complete.
You know, closing out tasks really enlightens me to how much stuff is actually getting done here, regardless of what it looks like content-wise, the server is really growing fast again. Me likes.
Re: Passive Spells
Posted: Wed Oct 10, 2012 6:39 pm
by Jabantiz
Going into combat from passives is do to the fact the passive spells are not flagged as friendly in the DB. I thought about hardcoding them to be friendly cause no passives should be hostile but haven't decided if that is a good idea or not yet.
Re: Passive Spells
Posted: Sat Oct 20, 2012 1:06 am
by Jabantiz
The icon shading issue might have been fixed. It was tested on my server as well as Xinux's server. Every time I think I fix this bug it always seems to come back so would like any one else with a server to test it. Code is on Dev SVN.
Re: Passive Spells
Posted: Sat Oct 20, 2012 9:37 am
by John Adams
I'm going to be messing with population today, so I'll keep an eye on this.