ArcEmu: Some Cleanup/reorganizing Queries - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Some Cleanup/reorganizing Queries

#1 User is offline   technique 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 19-June 08
  • Gender:Male
  • Location:Underground
  • Interests:Emulation?
  • Server OS:Other

Posted 21 December 2010 - 07:16 PM

You might have to adjust this a little bit as these are adjusted for my database, but should for most part work fine here too.

Credits: Walla, technique

UPDATE `quests` SET `ReceiveItemId1` = '0', `ReceiveItemCount1` = '0' WHERE `ReceiveItemId1` = `SrcItem`;
UPDATE `quests` SET `ReceiveItemId2` = '0', `ReceiveItemCount2` = '0' WHERE `ReceiveItemId2` = `SrcItem`;
UPDATE `quests` SET `ReceiveItemId3` = '0', `ReceiveItemCount3` = '0' WHERE `ReceiveItemId3` = `SrcItem`;
UPDATE `quests` SET `ReceiveItemId4` = '0', `ReceiveItemCount4` = '0' WHERE `ReceiveItemId4` = `SrcItem`;

UPDATE `creature_waypoints` SET `forwardskinid` = (SELECT `displayid` FROM `creature_spawns` where `id` = `spawnid`);
UPDATE `creature_waypoints` SET `backwardskinid` = (SELECT `displayid` FROM `creature_spawns` where `id` = `spawnid`);
UPDATE `creature_spawns` SET `bytes` = `bytes` - 65536 WHERE `bytes`=`bytes`|65536 AND `entry` IN (SELECT `entry` FROM `creature_proto` WHERE `npcflags` != 0);
UPDATE `creature_spawns` SET `movetype` = '0' WHERE `id` NOT IN (SELECT `spawnid` FROM `creature_waypoints`);

ALTER TABLE `creature_spawns` AUTO_INCREMENT=1, ADD COLUMN `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `id` `id2` INT(11) UNSIGNED NOT NULL AFTER `id`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`id`);
ALTER TABLE `creature_spawns` ADD INDEX `id2` (`id2`);
UPDATE `creature_waypoints`,creature_spawns SET `spawnid` = id where spawnid = id2;
UPDATE `creature_formations`,creature_spawns SET `spawn_id` = id where `spawn_id` = id2;
UPDATE `creature_formations`,creature_spawns SET `target_spawn_id` = id where `target_spawn_id` = id2;
ALTER TABLE `creature_spawns` DROP COLUMN `id2`;

ALTER TABLE `gameobject_spawns` AUTO_INCREMENT=1, ADD COLUMN `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `id` `id2` INT(11) UNSIGNED NOT NULL AFTER `id`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`id`);
ALTER TABLE `gameobject_spawns` ADD INDEX `id2` (`id2`);
ALTER TABLE `gameobject_spawns` DROP COLUMN `id2`;

ALTER TABLE `loot_creatures` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_creatures` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_creatures` DROP COLUMN `index2`;

ALTER TABLE `loot_disenchanting` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_disenchanting` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_disenchanting` DROP COLUMN `index2`;

ALTER TABLE `loot_fishing` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_fishing` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_fishing` DROP COLUMN `index2`;

ALTER TABLE `loot_gameobjects` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_gameobjects` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_gameobjects` DROP COLUMN `index2`;

ALTER TABLE `loot_items` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_items` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_items` DROP COLUMN `index2`;

ALTER TABLE `loot_pickpocketing` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_pickpocketing` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_pickpocketing` DROP COLUMN `index2`;

ALTER TABLE `loot_skinning` AUTO_INCREMENT=1, ADD COLUMN `index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,  CHANGE COLUMN `index` `index2` INT(11) UNSIGNED NOT NULL AFTER `index`,  DROP PRIMARY KEY, ADD PRIMARY KEY (`index`);
ALTER TABLE `loot_skinning` ADD INDEX `index2` (`index2`);
ALTER TABLE `loot_skinning` DROP COLUMN `index2`;

DELETE FROM `ai_agents` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_formations` WHERE `spawn_id` NOT IN (SELECT `id` FROM `creature_spawns`);
DELETE FROM `creature_formations` WHERE `target_spawn_id` NOT IN (SELECT `id` FROM `creature_spawns`);
DELETE FROM `creature_names_localized` WHERE `id` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_proto` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_quest_finisher` WHERE `id` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_quest_finisher` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `creature_quest_starter` WHERE `id` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_quest_starter` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `creature_spawns` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_spawns` WHERE `map` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `creature_staticspawns` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `creature_staticspawns` WHERE `map` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `creature_timed_emotes` WHERE `spawnid` NOT IN (SELECT `id` FROM `creature_spawns`);
DELETE FROM `creature_waypoints` WHERE `spawnid` NOT IN (SELECT `id` FROM `creature_spawns`);
DELETE FROM `gameobject_names_localized` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_quest_finisher` WHERE `id` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_quest_finisher` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `gameobject_quest_item_binding` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_quest_item_binding` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `gameobject_quest_item_binding` WHERE `item` NOT IN (SELECT `entry` FROM `items`);
DELETE FROM `gameobject_quest_pickup_binding` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_quest_pickup_binding` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `gameobject_quest_starter` WHERE `id` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_quest_starter` WHERE `quest` NOT IN (SELECT `quest` FROM `quests`);
DELETE FROM `gameobject_spawns` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_names`);
DELETE FROM `gameobject_spawns` WHERE `map` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `graveyards` WHERE  `mapid` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `itempages_localized` WHERE `entry` NOT IN (SELECT DISTINCT `entry` FROM `itempages`);
DELETE FROM `itempetfood` WHERE `entry` NOT IN (SELECT `entry` FROM `items`);
DELETE FROM `items_localized` WHERE `entry` NOT IN (SELECT DISTINCT `entry` FROM `items`);
DELETE FROM `item_quest_association` WHERE `item` NOT IN (SELECT `entry` FROM `items`);
DELETE FROM `item_quest_association` WHERE `quest` NOT IN (SELECT `entry` FROM `quests`);
DELETE FROM `items_localized` WHERE `entry` NOT IN (SELECT DISTINCT `entry` FROM `items`);
DELETE FROM `loot_creatures` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_fishing` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_gameobjects` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_items` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_pickpocketing` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_skinning` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_disenchanting` WHERE `itemid` NOT IN (SELECT entry from `items`);
DELETE FROM `loot_disenchanting` WHERE `entryid` NOT IN (SELECT `entry` FROM `items`);
DELETE FROM `loot_creatures` WHERE `entryid` NOT IN (SELECT entry from `creature_names`);
DELETE FROM `loot_pickpocketing` WHERE `entryid` NOT IN (SELECT entry from `creature_names`);
DELETE FROM `loot_skinning` WHERE `entryid` NOT IN (SELECT entry from `creature_names`);
DELETE FROM `loot_creatures` WHERE `entryid` NOT IN (SELECT entry from `creature_proto`);
DELETE FROM `loot_pickpocketing` WHERE `entryid` NOT IN (SELECT entry from `creature_proto`);
DELETE FROM `loot_skinning` WHERE `entryid` NOT IN (SELECT entry from `creature_proto`);
DELETE FROM `loot_gameobjects` WHERE `entryid` NOT IN (SELECT entry FROM `gameobject_names`);
DELETE FROM `loot_fishing` WHERE `entryid` NOT IN (SELECT `Zone` FROM `fishing`);
DELETE FROM `loot_gameobjects` WHERE `entryid` NOT IN (SELECT `entry` FROM `gameobject_names` WHERE `type` = 3);
DELETE FROM `loot_pickpocketing` WHERE `entryid` NOT IN (SELECT `entry` FROM `creature_names` WHERE `type` = 7);
DELETE FROM `loot_skinning` WHERE `entryid` IN (SELECT `entry` FROM `creature_names` WHERE `type` = 8);
DELETE FROM `npc_gossip_textid` WHERE `creatureid` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `npc_gossip_textid` WHERE `textid` NOT IN (SELECT `entry` FROM `npc_text`);
DELETE FROM `npc_monstersay` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `npc_text_localized` WHERE `entry` NOT IN (SELECT `entry` FROM `npc_text`);
DELETE FROM `petdefaultspells` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `playercreateinfo_items` WHERE `indexid` NOT IN (SELECT `index` FROM `playercreateinfo`);
DELETE FROM `playercreateinfo_skills` WHERE `indexid` NOT IN (SELECT `index` FROM `playercreateinfo`);
DELETE FROM `playercreateinfo_spells` WHERE `indexid` NOT IN (SELECT `index` FROM `playercreateinfo`);
DELETE FROM `quests_localized` WHERE `entry` NOT IN (SELECT `entry` FROM `quests`);
DELETE FROM `recall` WHERE `MapId` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `reputation_creature_onkill` WHERE `creature_id` NOT IN (SELECT `entry` FROM `creature_proto`);
DELETE FROM `teleport_coords` WHERE `mapId` NOT IN (SELECT `entry` FROM `worldmap_info`);
DELETE FROM `trainer_defs` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `trainer_spells` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `vendors` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `vendors` WHERE `item` NOT IN (SELECT `entry` FROM `items`);
DELETE FROM `zoneguards` WHERE `horde_entry` NOT IN (SELECT `entry` FROM `creature_names`);
DELETE FROM `zoneguards` WHERE `alliance_entry` NOT IN (SELECT `entry` FROM `creature_names`);

ALTER TABLE `ai_agents` ORDER BY `entry` ASC;
ALTER TABLE `ai_threattospellid` ORDER BY `spell` ASC;
ALTER TABLE `areatriggers` ORDER BY `entry` ASC;
ALTER TABLE `auctionhouse` ORDER BY `id` ASC;
ALTER TABLE `clientaddons` ORDER BY `id` ASC;
ALTER TABLE `creature_formations` ORDER BY `spawn_id` ASC;
ALTER TABLE `creature_names` ORDER BY `entry` ASC;
ALTER TABLE `creature_proto` ORDER BY `entry` ASC;
ALTER TABLE `creature_quest_finisher` ORDER BY `id` ASC;
ALTER TABLE `creature_quest_starter` ORDER BY `id` ASC;
ALTER TABLE `creature_spawns` ORDER BY `id` ASC;
ALTER TABLE `creature_waypoints` ORDER BY `spawnid` ASC;
ALTER TABLE `loot_creatures` ORDER BY `index` ASC;
ALTER TABLE `loot_disenchanting` ORDER BY `index` ASC;
ALTER TABLE `fishing` ORDER BY `Zone` ASC;
ALTER TABLE `loot_fishing` ORDER BY `index` ASC;
ALTER TABLE `gameobject_names` ORDER BY `entry` ASC;
ALTER TABLE `gameobject_quest_finisher` ORDER BY `id` ASC;
ALTER TABLE `gameobject_quest_item_binding` ORDER BY `entry` ASC;
ALTER TABLE `gameobject_quest_pickup_binding` ORDER BY `entry` ASC;
ALTER TABLE `gameobject_quest_starter` ORDER BY `id` ASC;
ALTER TABLE `gameobject_spawns` ORDER BY `id` ASC;
ALTER TABLE `graveyards` ORDER BY `id` ASC;
ALTER TABLE `item_quest_association` ORDER BY `item` ASC;
ALTER TABLE `item_randomprop_groups` ORDER BY `entry_id` ASC;
ALTER TABLE `item_randomsuffix_groups` ORDER BY `entry_id` ASC;
ALTER TABLE `loot_items` ORDER BY `index` ASC;
ALTER TABLE `itempages` ORDER BY `entry` ASC;
ALTER TABLE `itempetfood` ORDER BY `entry` ASC;
ALTER TABLE `items` ORDER BY `entry` ASC;
ALTER TABLE `npc_gossip_textid` ORDER BY `creatureid` ASC;
ALTER TABLE `npc_monstersay` ORDER BY `entry` ASC;
ALTER TABLE `npc_text` ORDER BY `entry` ASC;
ALTER TABLE `loot_gameobjects` ORDER BY `index` ASC;
ALTER TABLE `petdefaultspells` ORDER BY `entry` ASC;
ALTER TABLE `pet_information` ORDER BY `name` ASC;
ALTER TABLE `loot_pickpocketing` ORDER BY `index` ASC;
ALTER TABLE `playercreateinfo` ORDER BY `index` ASC;
ALTER TABLE `playercreateinfo_bars` ORDER BY `race` ASC;
ALTER TABLE `playercreateinfo_items` ORDER BY `indexid` ASC;
ALTER TABLE `playercreateinfo_skills` ORDER BY `indexid` ASC;
ALTER TABLE `playercreateinfo_spells` ORDER BY `indexid` ASC;
ALTER TABLE `quests` ORDER BY `entry` ASC;
ALTER TABLE `recall` ORDER BY `name` ASC;
ALTER TABLE `reputation_creature_onkill` ORDER BY `creature_id` ASC;
ALTER TABLE `reputation_faction_onkill` ORDER BY `faction_id` ASC;
ALTER TABLE `reputation_instance_onkill` ORDER BY `mapid` ASC;
ALTER TABLE `loot_skinning` ORDER BY `index` ASC;
ALTER TABLE `spell_coef_override` ORDER BY `id` ASC;
ALTER TABLE `spell_disable` ORDER BY `spellid` ASC;
ALTER TABLE `spell_disable_trainers` ORDER BY `spellid` ASC;
ALTER TABLE `spell_proc` ORDER BY `spellid` ASC;
ALTER TABLE `spellfixes` ORDER BY `spellid` ASC;
ALTER TABLE `spelloverride` ORDER BY `overrideid` ASC;
ALTER TABLE `teleport_coords` ORDER BY `id` ASC;
ALTER TABLE `totemspells` ORDER BY `spell` ASC;
ALTER TABLE `trainer_defs` ORDER BY `entry` ASC;
ALTER TABLE `trainer_spells` ORDER BY `entry` ASC;
ALTER TABLE `transport_data` ORDER BY `entry` ASC;
ALTER TABLE `vendors` ORDER BY `entry` ASC;
ALTER TABLE `version` ORDER BY `revision` ASC;
ALTER TABLE `weather` ORDER BY `zoneId` ASC;
ALTER TABLE `worldmap_info` ORDER BY `entry` ASC;
ALTER TABLE `zoneguards` ORDER BY `zone` ASC;

OPTIMIZE TABLE ai_agents,ai_threattospellid,areatriggers,auctionhouse,banned_phrases,clientaddons,command_overrides,creature_formations,creature_names,creature_names_localized,creature_proto,creature_quest_finisher,creature_quest_starter,creature_spawns,creature_staticspawns,creature_timed_emotes,creature_waypoints,events,event_creatures,event_objects,fishing,gameobject_names,gameobject_names_localized,gameobject_quest_finisher,gameobject_quest_item_binding,gameobject_quest_pickup_binding,gameobject_quest_starter,gameobject_spawns,graveyards,itempages,itempages_localized,itempetfood,items,items_localized,item_quest_association,item_randomprop_groups,item_randomsuffix_groups,loot_creatures,loot_disenchanting,loot_fishing,loot_gameobjects,loot_items,loot_pickpocketing,loot_skinning,map_checkpoint,npc_gossip_textid,npc_monstersay,npc_text,npc_text_localized,petdefaultspells,pet_information,playercreateinfo,playercreateinfo_bars,playercreateinfo_items,playercreateinfo_skills,playercreateinfo_spells,quests,
quests_localized,recall,reputation_creature_onkill,reputation_faction_onkill,reputation_instance_onkill,spellcustoms,spellextra,spellfixes,spelloverride,
spell_coef_override,spell_disable,spell_disable_trainers,spell_effects_override,spell_forced_targets,spell_proc,spell_unique_auras,teleport_coords,totemspells,trainer_defs,trainer_spells,transport_data,vendors,version,weather,wordfilter_character_names,wordfilter_chat,worldmap_info,worldstate_template,zoneguards;

REPAIR TABLE ai_agents,ai_threattospellid,areatriggers,auctionhouse,banned_phrases,clientaddons,command_overrides,creature_formations,creature_names,creature_names_localized,creature_proto,creature_quest_finisher,creature_quest_starter,creature_spawns,creature_staticspawns,creature_timed_emotes,creature_waypoints,events,event_creatures,event_objects,fishing,gameobject_names,gameobject_names_localized,gameobject_quest_finisher,gameobject_quest_item_binding,gameobject_quest_pickup_binding,gameobject_quest_starter,gameobject_spawns,graveyards,itempages,itempages_localized,itempetfood,items,items_localized,item_quest_association,item_randomprop_groups,item_randomsuffix_groups,loot_creatures,loot_disenchanting,loot_fishing,loot_gameobjects,loot_items,loot_pickpocketing,loot_skinning,map_checkpoint,npc_gossip_textid,npc_monstersay,npc_text,npc_text_localized,petdefaultspells,pet_information,playercreateinfo,playercreateinfo_bars,playercreateinfo_items,playercreateinfo_skills,playercreateinfo_spells,quests,
quests_localized,recall,reputation_creature_onkill,reputation_faction_onkill,reputation_instance_onkill,spellcustoms,spellextra,spellfixes,spelloverride,
spell_coef_override,spell_disable,spell_disable_trainers,spell_effects_override,spell_forced_targets,spell_proc,spell_unique_auras,teleport_coords,totemspells,trainer_defs,trainer_spells,transport_data,vendors,version,weather,wordfilter_character_names,wordfilter_chat,worldmap_info,worldstate_template,zoneguards;

ŧechnique,
the one and only
0

#2 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 28 December 2010 - 02:47 PM

UPDATE `creature_spawns` SET `bytes` = `bytes` - 65536 WHERE `bytes`=`bytes`|65536 AND `entry` IN (SELECT `entry` FROM `creature_proto` WHERE `npcflags` != 0);


You should not touch bytes if you don't understand their meaning.
Posted Image
0

#3 User is offline   technique 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 19-June 08
  • Gender:Male
  • Location:Underground
  • Interests:Emulation?
  • Server OS:Other

Posted 30 December 2010 - 04:17 PM

65536 = ALIVE

Then don't touch them, I don't mind :P
ŧechnique,
the one and only
0

#4 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 30 December 2010 - 07:10 PM

65536 = ALIVE, yes this is true for the column called `flags`. There's any column called `bytes` in creature_spawns...
And why creatures with npc_flags != 0 couldn't be alive ?
Sorry for my english, I'm french.
0

#5 User is offline   technique 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 19-June 08
  • Gender:Male
  • Location:Underground
  • Interests:Emulation?
  • Server OS:Other

Posted 31 December 2010 - 10:16 PM

I said this was adjusted to my structure which has bytes instead of bytes1, same thing different names. I was given this by Walla and I use it, however I don't know how exactly he thought about it but avoid using it if it might be so critical. :D
ŧechnique,
the one and only
0

#6 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 01 January 2011 - 10:20 AM

Quote

65536 = ALIVE, yes this is true for the column called `flags`


Quote

my structure which has bytes instead of bytes1


`bytes1` != `flags`, the meaning of 65536 for bytes1 is unknown (at least for me, if you know it, please tell me).
It's nothing against you but your queries are supposed to be "Cleanup/Reorganizing Queries", and this one seem to be wrong.
Sorry for my english, I'm french.
0

#7 User is offline   Marforius 

  • Permanantly on leave
  • PipPipPipPip
  • Group: Members
  • Posts: 597
  • Joined: 07-August 08
  • IRC:Marforius
  • Gender:Male
  • Location:Rome
  • Interests:ArcEmulatorius
  • Server OS:Linux

Posted 01 January 2011 - 04:16 PM

View PostSadikum, on 30 December 2010 - 07:10 PM, said:

65536 = ALIVE, yes this is true for the column called `flags`.


	UNIT_NPC_FLAG_INNKEEPER			//65536		


This sets
UNIT_FIELD_BYTES_0
to
0 0 1 0

Which as far as I can tell is setting the creature to being male if it has no flag, this probably doesn't effect anything at all. He might have used it for development, but since the "bytes" field isnt even present in arcemu's current tables it wont do anything.


Did you guys seriously flame him over this?
0

#8 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 02 January 2011 - 11:39 AM

Column flags and npcflags aren't the same Marforius. And I know how it set UNIT_FIELD_BYTES_0, but the effect of setting 1 to the third byte of it is unknow as far as I can tell.

When I see a query with a unknown meaning and which is probably wrong I say it to the author so he can fix it. It's even more true in a subject like that called "Cleanup queries". We just try to help, stop tell we're flaming ><.
Sorry for my english, I'm french.
0

#9 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 19 January 2011 - 10:47 AM

View PostMarforius, on 01 January 2011 - 04:16 PM, said:

but since the "bytes" field isnt even present in arcemu's current tables it wont do anything.


This column is in creature_spawns (as same as bytes1 and bytes2) and ArcEmu sends it to client. For your sure it can do a lot wrong things in client since client is the only who is using it. First and second part of UNIT_FIELD_BYTES_0 is race and class ( race is unused for creatures, class should be used for calculating creatures' hp and power see this: http://arcemu.org/fo...showtopic=24098 ). Third part is gender and is related to displayid. If you set bad gender, creatures won't let you interact with them so I don't think that "it wont do anything". Fourth part is power type. All of these fields are used by client to display creature in correct form.

View PostMarforius, on 01 January 2011 - 04:16 PM, said:

Did you guys seriously flame him over this?


Flamed? I am just poiting out what is bad on his queries, nothing more. I think this should be called more 'a help' then flaming.
Posted Image
0

#10 User is offline   technique 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 19-June 08
  • Gender:Male
  • Location:Underground
  • Interests:Emulation?
  • Server OS:Other

Posted 27 March 2011 - 02:09 PM

Well thanks for your help. I am not the author of this query like I mentioned earlier it was given to me by Walla which I always trust when it comes to emulation, it was included in a file with a lot of other queries as well so I did not bother asking about it.

Bytes1 = Sit, sleep, stand and all that? Is that unknown?

What I meant with "my structure which has bytes instead of bytes1" is simply that I have renamed bytes1 to bytes, same thing, in case you misunderstood.
ŧechnique,
the one and only
0

#11 User is offline   Marforius 

  • Permanantly on leave
  • PipPipPipPip
  • Group: Members
  • Posts: 597
  • Joined: 07-August 08
  • IRC:Marforius
  • Gender:Male
  • Location:Rome
  • Interests:ArcEmulatorius
  • Server OS:Linux

Posted 28 March 2011 - 12:36 PM

View Posttechnique, on 27 March 2011 - 02:09 PM, said:

Well thanks for your help. I am not the author of this query like I mentioned earlier it was given to me by Walla which I always trust when it comes to emulation, it was included in a file with a lot of other queries as well so I did not bother asking about it.

Bytes1 = Sit, sleep, stand and all that? Is that unknown?

What I meant with "my structure which has bytes instead of bytes1" is simply that I have renamed bytes1 to bytes, same thing, in case you misunderstood.


I haven't taken the time to check all of them.
One controls gender, one controls animation, one controls field_flags. A small list is on the wiki but ill take the time to go through them all soon and see how the client identifys them if it isn't documented somewhere in the core.
0

#12 User is offline   technique 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 19-June 08
  • Gender:Male
  • Location:Underground
  • Interests:Emulation?
  • Server OS:Other

Posted 05 April 2011 - 11:11 AM

Alright brool.
ŧechnique,
the one and only
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users