EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Thoughts on Fixing the Prereq AA issue (https://www.eqemulator.org/forums/showthread.php?t=26638)

cavedude 02-11-2009 01:09 AM

Yeah, I've forgotten about this thread as well. Let me give the code a try, and work out a query to migrate the current AAs to the new system. If all goes well, I don't see a reason not to commit it.

AndMetal 02-11-2009 04:10 PM

Quote:

Originally Posted by cavedude (Post 164336)
Let me give the code a try, and work out a query to migrate the current AAs to the new system.

This is the final migration query, which worked for me when I tested it out a while ago:

Quote:

Originally Posted by AndMetal (Post 159228)
Code:

SET @row = 0;
UPDATE altadv_vars a SET prereq_skill = COALESCE((SELECT p.skill_id FROM (SELECT a2.skill_id, @row := @row + 1 AS prereq_index_num FROM altadv_vars a2) AS p WHERE p.prereq_index_num = a.prereq_skill), 0) WHERE prereq_skill < 1000000;


To clarify, it worked great for me when I worked on it a few months ago, but because of the need to make 1 migration going forward (and everything could get VERY confusing if you run it multiple times), I didn't want to force everyone into it right away.

I think the only thing I didn't do was combine the classes & berserker columns in the db, then separate them in the code (easy enough to do).

trevius 02-11-2009 07:43 PM

I don't think we need to combine the classes and berserker columns. They are sent to the client that way, so it doesn't hurt having 1 extra field to fill out. It wouldn't hurt to do it, but there isn't really much point to do so. Even on EQLive, it is still sent that same way for some reason. They are probably to lazy to do it :P

EDIT: Woah, I am developer now, lol! Be afraid!

cavedude 02-12-2009 02:08 PM

Quote:

Originally Posted by trevius (Post 164380)
EDIT: Woah, I am developer now, lol! Be afraid!

Oh crap, I meant to put you in the noob group. My finger musta slipped. Oh well.

cavedude 02-12-2009 03:14 PM

This works perfectly. I don't have a problem with the code and query being committed, unless anybody else has any objections. It even allowed me to correct a couple of Necro AAs that have been nagging at the back of my mind.


All times are GMT -4. The time now is 06:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.