Fixed some bugs regarding dojo, updated drop data, minor tweaks on Mystic Doors, added expeditions for Showa Manor, Zakum and Pink Bean, smart search for item slots on quest/npc rewarding system, attempt on boss HPbar to focus on player's current target, quests with selectable rewards now hands the item correctly, after the first PQ instance next ones are loaded more smoothly.
39 lines
1.2 KiB
SQL
39 lines
1.2 KiB
SQL
delimiter //
|
|
|
|
CREATE PROCEDURE countMobCardsBySection()
|
|
BEGIN
|
|
DECLARE x INT DEFAULT 0;
|
|
DECLARE I INT DEFAULT 0;
|
|
WHILE I < 10 DO
|
|
SELECT count(*) INTO x FROM (
|
|
SELECT DISTINCT itemid FROM drop_data WHERE itemid >= (2380000 + I*1000) and itemid < (2380000 + (I+1)*1000)
|
|
) AS anysqltab_;
|
|
|
|
insert into `_mob_card_counter` (`keyid`,`count`) values (2380000 + I*1000 , x);
|
|
SET I = I + 1;
|
|
END WHILE;
|
|
END;
|
|
|
|
//
|
|
|
|
delimiter ;
|
|
|
|
CREATE TABLE `_mob_card_counter` (
|
|
`keyid` INTEGER(10),
|
|
`count` INTEGER(10)
|
|
);
|
|
|
|
CALL countMobCardsBySection();
|
|
|
|
# the query below recovers all MAIN mobs that drops card.
|
|
SELECT cardid, mobid FROM monstercarddata LEFT JOIN drop_data ON monstercarddata.cardid = drop_data.itemid WHERE mobid = dropperid;
|
|
|
|
# the query below recovers MISSING cards from mobs that drops card.
|
|
SELECT cardid, mobid FROM monstercarddata WHERE cardid NOT IN (
|
|
SELECT cardid FROM monstercarddata LEFT JOIN drop_data ON monstercarddata.cardid = drop_data.itemid WHERE mobid = dropperid
|
|
);
|
|
|
|
# LENGTHY query that also recovers MISSING cards from mobs that drops card.
|
|
SELECT id FROM handbook WHERE id NOT IN (
|
|
SELECT DISTINCT itemid FROM drop_data
|
|
) AND id>=2380000 AND id<2390000; |