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-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
  #2  
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
  #3  
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
  #4  
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 01:01 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3