PDA

View Full Version : Focusable Spells


Osiris.Envy
06-09-2018, 09:43 PM
From what I can tell certain spells are 'focusable' and some spells are not. The spells that are NOT 'focusable', are returned with focustype 'focusFcMute' from the following code in spell_effects.cpp:

int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) {

if (spells[spell_id].not_focusable)
return 0;
}


How can I alter spells that are not currently 'focusable' to be focusable? I would like to be able to tag just certain spells, I would not want to make wholesale changes to any spell that is currently tagged with focustype 'focusFcMute' only a selected few spells would be changed.

with my limited knowledge, I looked thru source, db, and other files trying to find how spells are tagged with focustype 'focusFcMute'. The best I can surmise at this point is that the spellID(spell_id) is involved.

thanks,

Uleat
06-10-2018, 12:24 AM
During LoadSpells ..

https://github.com/EQEmu/Server/blob/master/common/shareddb.cpp#L1752

row[197] - remember that rows start with '0' .. so, that would be the 198th table field.


Field 198 in the db table is defined as 'not_extendable.'

Osiris.Envy
06-12-2018, 12:17 AM
thanks for the reply -- this clarifies a couple things, answers a question and opens another question.

I actually came across that line in shareddb.cpp, and while unconfirmed at the time, I considered that not_extendable in the db may have referenced not_focusable in the source (I thought my db was out of date - I also looked at field222). But your post clarifies what that line (row 197) is doing, and what spells are loaded (and when it happens).

This also clarifies that I have more debugging to do, because what I am trying to do is apparently not effected by this code. because the spells I want to change are 'not_extendable = 0', however the spells that 'function in the desired way' are also 'not_extendable = 0'.

Uleat
06-12-2018, 03:27 PM
Just remember to manually run shared_memory.exe before starting your server - if you're not using one of the provided start-up scripts or have something of your own.

Hotfixes allow immediate updates .. but, come with a higher knowledge demand of how to use them correctly. (I've never used them.)


EDIT: I wasn't avoiding your immediate question of 'how to' .. I just don't know that answer.

Osiris.Envy
06-13-2018, 04:28 PM
Actually your replies have helped move my process forward.....I have purposely not came out directly and asked a 'how to' question yet because I wanted to attempt to resolve the issue without having to do that.

I was saving the 'how to' question as a last resort. :grin: