Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2008, 11:35 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Great work Andmetal! I hope the new rule would ne added to the code =)


BUT I have an idea how to make those spells stand out.

we need to make rule: Special Rez spell Id: (x,x,x)

how about that?

them wihout altering the code the special spells can be listed in rules and code can adress them by whatever ID numbers entered there rather than have spell ID hard coded into the source

I belive that all AA and discplines also have hard coded spell ids?
I think we should make a separate table which would store ID to ABility/AA corespandance so in a custom spell file I coudl set for exmaple soem monk special discipline to point to some other spell wihout touching the code itself

this woudl give me option fo complitly wiping the original spell file and build a new one where say all heals go one by one rather than been scatered all over the file, wihout having to go around hard coded spells cuase I can't touch their ID#

think about this one =)
Reply With Quote
  #2  
Old 09-22-2008, 04:27 PM
spoon
Sarnak
 
Join Date: Aug 2007
Posts: 34
Default

I took a look at this and noticed something. There is a difference between the spells with Resurrection Effects and those that don't. However they are currently in "spacing158" fields.

If you look in spdat.h at the SPDat_Spell_Struct:
Code:
/* 157 */   int			effectdescnum; // eqstr of effect description
/* 158 */ int spacing158[4];
/* 162 */   int			bonushate;
Which probably means we don't know what they are.

In spells_us.txt those fields are:
Code:
ID	Name	Nameeffectdescnum	spacing158_1	spacing158_2	spacing158_3	spacing158_4	bonushate
2169	Reconstitution	0	2169	42	82		
2172	Restoration	0	2172	42	82		
2168	Reanimation	0	2168	42	82		
1733	Convergence	0	1733	42	82		
392	Resurrection	0	392	42	82		
391	Revive	0	391	42	82		
388	Resuscitate	0	388	42	82		
1524	Reviviscence	0	1524	42	82		
2171	Renewal	0	2171	42	82		
994	Customer Service Resurrect	0	994				
2738	Divine Resurrection	0	0
The spells with spacing158_1 set to 42 are:
Code:
8106	Perfected Heal
1523	Word of Redemption
8007	Desperate Renewal
3232	Karana's Renewal
6140	Ancient: Hallowed Light
5265	Pious Light
7206	Shadowmend
5270	Word of Vivification
4880	Holy Light
6141	Ancient: Chlorobon
2179	Tunare's Renewal
5355	Chlorotrope
7413	Heal Wounds XIV
3480	Supernal Light
6142	Ancient: Wilslik's Mending
3471	Word of Replenishment
5395	Yoppa's Mending
4883	Sylvan Infusion
7412	Heal Wounds XIII
4901	Daluda's Mending
7411	Heal Wounds XII
3443	Nature's Infusion
2182	Ethereal Light
5251	Pious Remedy
2435	Kragg's Mending
1521	Word of Restoration
3233	Tnarg`s Mending
6929	Healing Potion X
5282	Touch of Piety
1291	Nature's Touch
7410	Heal Wounds XI
3465	Supernal Remedy
1519	Divine Light
5296	Wave of Piety
6928	Healing Potion IX
1520	Word of Vigor
3429	Touch of Nife
5289	Light of Piety
5304	Sylvan Water
5528	Muada's Mending
4893	Wave of Trushar
4894	Light of Order
1290	Chloroblast
7409	Heal Wounds X
2462	Ethereal Remedy
3427	Wave of Marr
6927	Healing Potion VIII
3430	Light of Nife
6878	Greater Healing Light
4875	Trushar's Mending
4896	Sylvan Light
6919	Elixir of Healing X
136	Word of Healing
2589	Healing Wave of Prexus
7408	Heal Wounds IX
6876	Forest's Renewal
6877	Kragg's Salve
6926	Healing Potion VII
9	Superior Healing
6875	Healing Light
7171	Fungal Refreshment
7407	Heal Wounds VIII
1455	Wave of Healing
135	Word of Health
1518	Remedy
7406	Heal Wounds VII
6873	Nature's Renewal
6874	Spirit Salve
3834	Healing Water
6925	Healing Potion VI
3684	Light of Life
15	Greater Healing
6918	Elixir of Healing IX
1522	Celestial Elixir
2180	Ethereal Elixir
7405	Heal Wounds VI
6924	Healing Potion V
6917	Elixir of Healing VIII
3577	Wave of Life
5573	Corporeal Empathy Recourse
1413	Corporeal Empathy
6916	Elixir of Healing VII
7404	Heal Wounds V
1444	Celestial Healing
1283	Celestial Cleansing
12	Healing
6923	Healing Potion IV
6915	Elixir of Healing VI
7403	Heal Wounds IV
2175	Celestial Health
3683	Ethereal Cleansing
6914	Elixir of Healing V
7402	Heal Wounds III
6922	Healing Potion III
17	Light Healing
2502	Celestial Remedy
6913	Elixir of Healing IV
7401	Heal Wounds II
6912	Elixir of Healing III
6921	Healing Potion II
200	Minor Healing
7400	Heal Wounds I
6911	Elixir of Healing II
3682	Aria of Asceticism
6920	Healing Potion I
5011	Salve
6910	Elixir of Healing I
203	Cure Poison
213	Cure Disease
417	Extinguish Fatigue
97	Abolish Poison
98	Abolish Disease
2742	Purify Soul
222	Invigor
5283	Crusader's Purity
8327	Pure Water IV
3190	Crusader`s Touch
7509	Cure Poison IV
7513	Cure Disease IV
7517	Remove Curse IV
8326	Pure Water III
1525	Antidote
3299	Radiant Cure3
3298	Radiant Cure2
722	Jaxan`s Jig o` Vigor
2526	Disinfecting Aura
2880	Remove Greater Curse
3297	Radiant Cure1
3693	Pure Blood
3842	Blood of Nadox
7508	Cure Poison III
7512	Cure Disease III
7516	Remove Curse III
8325	Pure Water II
95	Counteract Poison
96	Counteract Disease
2946	Remove Curse
4057	Remove Lesser Curse
8324	Pure Water I
7507	Cure Poison II
7511	Cure Disease II
7515	Remove Curse II
3681	Aria of Innocence
4056	Remove Minor Curse
7506	Cure Poison I
7510	Cure Disease I
7514	Remove Curse I
694	Pact of Shadow
1510	Shadow Compact
1514	Rapacious Subvention
1515	Covetous Subversion
1717	Shadowbond
1718	Sedulous Subversion
2168	Reanimation
2520	Nature's Recovery
4704	Blood Scream
212	Cure Blindness
1744	Harvest
5410	Pure Spirit
2169	Reconstitution
2170	Reparation
357	Dark Empathy
391	Revive
2171	Renewal
7199	Soothing Remedy
388	Resuscitate
2172	Restoration
392	Resurrection
1733	Convergence
1524	Reviviscence
3338	Harvest of Druzzil
3694	Stoicism
8329	Fungal Regrowth I
1576	Torpor
3485	Supernal Cleansing
8330	Fungal Regrowth II
3398	Quiescence
8331	Fungal Regrowth III
5293	Pious Cleansing
3475	Supernal Elixir
8009	Skin of the Rep. Trigger
4899	Breath of Trushar
8332	Fungal Regrowth IV
5416	Spiritual Serenity
8333	Fungal Regrowth V
4882	Holy Elixir
1734	Infusion
4997	Arrow of Renewal
5259	Pious Elixir
5060	Discordant Light
13	Complete Healing
7204	Complete Refreshment
But the spells with spacing158_3 set to 82 are:
Code:
ID	Name
2169	Reconstitution
2172	Restoration
2168	Reanimation
1733	Convergence
392	Resurrection
391	Revive
388	Resuscitate
1524	Reviviscence
2171	Renewal
which look to be the ones we want.

My guess is spacing158_3 is a super class of beneficial spells and spacing158_4 is a subclass.

However, the rule you are looking for is:
Code:
if(spacing158[3] == 82) {
    .. Resurrection Effects ..
}
Reply With Quote
  #3  
Old 09-22-2008, 05:31 PM
spoon
Sarnak
 
Join Date: Aug 2007
Posts: 34
Default

The completely untested code

In /zone/spdat.h
~line 388
Code:
+ #define SUBCLASS_REZZ_EFFECTS		82
~ line 453
Code:
- /* 158 */ int spacing158[4];
+ /* 158 */ int spacing158[3];
+ /* 161 */ int	spellSubclass;  //82 = Reserection Effects
and in /zone/net.cpp
~line 984
Code:
-		for(y = 0; y < 3;y++)
-			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+		for(y = 0; y < 3;y++)
+			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+			
+		sp[tempid].spellSubclass=atoi(sep.arg[161]);
and then in /zone/client_process.cpp
~ line 943
Code:
- SpellOnTarget(756,this);
+ if( ra->spellSubclass == SUBCLASS_REZZ_EFFECTS) {
+ 	SpellOnTarget(756,this);
+ }
Reply With Quote
  #4  
Old 09-22-2008, 05:40 PM
spoon
Sarnak
 
Join Date: Aug 2007
Posts: 34
Default

Quote:
Originally Posted by spoon View Post
The completely untested code

and in /zone/net.cpp
~line 984
Code:
-		for(y = 0; y < 3;y++)
-			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+		for(y = 0; y < 3;y++)
+			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+			
+		sp[tempid].spellSubclass=atoi(sep.arg[161]);
There was a typo (although it probably wouldn't have effected anything):

and in /zone/net.cpp
~line 984
Code:
-		for(y = 0; y < 3;y++)
-			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+		for(y = 0; y < 2;y++)
+			sp[tempid].spacing158[y]=atoi(sep.arg[158+y]);
+			
+		sp[tempid].spellSubclass=atoi(sep.arg[161]);
Reply With Quote
  #5  
Old 09-22-2008, 08:30 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I would like to make a somewhat major clarification: those values are actually in fields 156 (typedescnum) & 157 (effectdescnum), not 160 & 161 (still unknown, and all 0's for the resurrection spells).

However, they could definitely be used to separate out normal rez spells from ones that don't have a rez effect, since the ones without rez effects don't use either.

For reference, here are the IDs, from dbstr_us.txt, that correspond to both:
Code:
id 	text
1 	Aegolism
2 	Agility
3 	Alliance
4 	Animal
5 	Antonica
6 	Armor Class
7 	Attack
8 	Bane
9 	Blind
10 	Block
11 	Calm
12 	Charisma
13 	Charm
14 	Cold
15 	Combat Abilities
16 	Combat Innates
17 	Conversions
18 	Create Item
19 	Cure
20 	Damage Over Time
21 	Damage Shield
22 	Defensive
23 	Destroy
24 	Dexterity
25 	Direct Damage
26 	Disarm Traps
27 	Disciplines
28 	Discord
29 	Disease
30 	Disempowering
31 	Dispel
32 	Duration Heals
33 	Duration Tap
34 	Enchant Metal
35 	Enthrall
36 	Faydwer
37 	Fear
38 	Fire
39 	Fizzle Rate
40 	Fumble
41 	Haste
42 	Heals
43 	Health
44 	Health/Mana
45 	HP Buffs
46 	HP type one
47 	HP type two
48 	Illusion: Other
49 	Illusion: Player
50 	Imbue Gem
51 	Invisibility
52 	Invulnerability
53 	Jolt
54 	Kunark
55 	Levitate
56 	Life Flow
57 	Luclin
58 	Magic
59 	Mana
60 	Mana Drain
61 	Mana Flow
62 	Melee Guard
63 	Memory Blur
64 	Misc
65 	Movement
66 	Objects
67 	Odus
68 	Offensive
69 	Pet
70 	Pet Haste
71 	Pet Misc Buffs
72 	Physical
73 	Picklock
74 	Plant
75 	Poison
76 	Power Tap
77 	Quick Heal
78 	Reflection
79 	Regen
80 	Resist Buff
81 	Resist Debuffs
82 	Resurrection
83 	Root
84 	Rune
85 	Sense Trap
86 	Shadowstep
87 	Shielding
88 	Slow
89 	Snare
90 	Special
91 	Spell Focus
92 	Spell Guard
93 	Spellshield
94 	Stamina
95 	Statistic Buffs
96 	Strength
97 	Stun
98 	Sum: Air
99 	Sum: Animation
100 	Sum: Earth
101 	Sum: Familiar
102 	Sum: Fire
103 	Sum: Undead
104 	Sum: Warder
105 	Sum: Water
106 	Summon Armor
107 	Summon Focus
108 	Summon Food/Water
109 	Summon Utility
110 	Summon Weapon
111 	Summoned
112 	Symbol
113 	Taelosia
114 	Taps
115 	Techniques
116 	The Planes
117 	Timer 1
118 	Timer 2
119 	Timer 3
120 	Timer 4
121 	Timer 5
122 	Timer 6
123 	Transport
124 	Undead
125 	Utility Beneficial
126 	Utility Detrimental
127 	Velious
128 	Visages
129 	Vision
130 	Wisdom/Intelligence
131 	Traps
132 	Auras
133 	Endurance
134 	Serpent's Spine
135 	Corruption
136 	Learning
Anyways, as long as you change the code to check if spells.effectdescnum == 82, it should be fine. The only thing I'm not sure about is the best way to pull the spell data using ra->spellid.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 09-23-2008, 09:37 AM
spoon
Sarnak
 
Join Date: Aug 2007
Posts: 34
Default

Thanks AndMetal, good catch. I managed to add some columns in my spreadsheet throwing everything off. And I don't know what I was thinking with the OPRezzAnswer bit. I obviously didn't have enough coffee yesterday. Wish I could go back and edit/delete those old posts.

Quote:
Anyways, as long as you change the code to check if spells.effectdescnum == 82, it should be fine. The only thing I'm not sure about is the best way to pull the spell data using ra->spellid.
You could add to spdat.h something like:
Code:
int GetSpellEffectDescNum(int16 spell_id);
and to spdat.cpp
Code:
int GetSpellEffectDescNum(int16 spell_id)
{
	if( (spell_id > 0) && (spell_id < SPDAT_RECORDS) ){
		return spells[spell_id].effectdescnum;
	} else {
		return -1;
	}
}

and then just use that in the client_process.cpp. However, if I were to rewrite this chunk of code, I would make a SpellFactory, which would have a method "getSpellById( int16 spell_id)" and have that return an instance of a class Spell. The class Spell would have accessor methods for things like GetEffectDescNum(). The laundry list of "IsWhatever(int spell_id)" is getting out of control.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:46 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3