Spells: Examine / Info

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Spells: Examine / Info

Post by John Adams » Wed Dec 03, 2008 12:24 pm

LE, a while back the DB team decided we were going to use Tier 0 (zero) for those spells/arts that do not have tier progression - at least that's my memory of it. There is currently a problem with this plan in the server code for COMMAND_INFO, the 'else' that handles spell info:

Code: Select all

				else{
					sint32 spell_id = atol(sep->arg[1]);
					EQ2Packet* outapp = master_spell_list.GetSpellPacket(spell_id, 1, client, true);
					if(outapp)
						client->QueuePacket(outapp);
					else
						cout << "Unknown Spell ID: " << spell_id << endl;
				}
The second param hardcoded as a 1 is forcing it to look for Tier 1 of any spell in your Knowledge Book. Aside from this being a problem for those Tier 1 abilities, will this also screw up getting info on say a Tier 9 (Master II) spell?
Right now, I can work with Tier 1 only for testing. But I'd eventually like to support no-tier spells as tier 0, and allow Examine info for spells greater-than tier 1.
Thanks

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Wed Dec 03, 2008 3:16 pm

Yah I really need to fix it. I'll add it to my list. Thanks for the heads up!

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Wed Dec 03, 2008 3:18 pm

Heh, I tried to fix it myself, but I cannot find spell_tier :) So I'll leave it for you, unless you want to tell me how to pull out spell_tier in the Commands.cpp.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Wed Dec 03, 2008 3:31 pm

It isn't that easy. This particular command is from the client asking for the info of a scribed spell. I will need to get the player's spell that they have scribed and send that one instead of a generic one.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spells: Examine / Info

Post by John Adams » Tue Jan 27, 2009 11:15 am

Hmm, I forgot I fiddled with this, and it ended up on SVN (519). LE, could this hack be hurting anything?

Code: Select all

		case COMMAND_USEABILITY:{
			if(sep && sep->arg[0][0] && sep->IsNumber(0)){
				if(client->GetPlayer()->GetHP() == 0){
					client->SimpleMessage(CHANNEL_COLOR_RED,"You cannot do that right now.");
				}
				else{
					int32 spell_id = atoul(sep->arg[0]);
					int8 spell_tier = 0;
					if(sep->arg[1][0] && sep->IsNumber(1))
						spell_tier = atoi(sep->arg[1]);
					else
						spell_tier = client->GetPlayer()->GetSpellTier(spell_id);
					if (!spell_tier) spell_tier = 1;
					spellProcess.ProcessSpell(client->GetCurrentZone(), master_spell_list.GetSpell(spell_id, spell_tier), client->GetPlayer(), client->GetPlayer()->GetTarget());
				}
			}else{
				client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Usage:  /useability {spell_id} [spell_tier]");
			}
			break;
Specifically, "if (!spell_tier) spell_tier = 1;" -- all I did was allow no "tier" param, didn't take anything away. You can still /useability 1000 5 to launch a tier 5 spell.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spells: Examine / Info

Post by LethalEncounter » Tue Jan 27, 2009 5:11 pm

I don't see an issue with it as long as the ground spawns still work properly. That is handled separately and should be fine though.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests