locking/unlocking spells

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

locking/unlocking spells

Post by Ememjr » Thu Aug 24, 2017 12:25 pm

right now in emu when crafting it unlocks all trasdeskill spells , but it should only unlock the 6 abilities that are used for that recipe (technique)

i wanted to change the type== to technique== and add a technique parameter as i put below
since technique is currently not in spellbookentry class do you have a problem with me adding it or is there an already easier way to get the technique

Code: Select all

void Player::UnlockTSSpells(int32 technique) {
	vector<SpellBookEntry*>::iterator itr;

	MSpellsBook.writelock(__FUNCTION__, __LINE__);
	for (itr = spells.begin(); itr != spells.end(); itr++) {
		if ((*itr)->type == SPELL_BOOK_TYPE_TRADESKILL)
			ModifySpellStatus(*itr, 66);
	}

	MSpellsBook.releasewritelock(__FUNCTION__, __LINE__);
	// Lock all other types
	LockAllSpells();
}
also one other thing to go along with this, is spells/abilities that have a similar spell/ability that you can only use one or the other and it disables the other till they are reusuble in crafting you cannot use ability 1 and 3 together for instance becuase they are the opposite how is that handled currently

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: locking/unlocking spells

Post by Jabantiz » Thu Aug 24, 2017 3:23 pm

It has been a while since I worked with spells but you should be able to get the spell from the book entry struct and then check the technique from that.

There is also a linked timer id, any spell with the same id will share the recast so none can be used. The id can be anything but to keep it simple we had been using the id of the first spell in the spell line.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests