22{
25
29 PrepareStatement(
WORLD_SEL_CREATURE_TEXT,
"SELECT CreatureID, GroupID, ID, Text, Type, Language, Probability, Emote, Duration, Sound, BroadcastTextId, TextRange FROM creature_text",
CONNECTION_SYNCH);
30 PrepareStatement(
WORLD_SEL_SMART_SCRIPTS,
"SELECT entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param6, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link",
CONNECTION_SYNCH);
36 PrepareStatement(
WORLD_INS_GAME_TELE,
"INSERT INTO game_tele (id, position_x, position_y, position_z, orientation, map, name) VALUES (?, ?, ?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
38 PrepareStatement(
WORLD_INS_NPC_VENDOR,
"INSERT INTO npc_vendor (entry, item, maxcount, incrtime, extendedcost) VALUES(?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
47 PrepareStatement(
WORLD_INS_CREATURE_FORMATION,
"INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES (?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
48 PrepareStatement(
WORLD_INS_WAYPOINT_DATA,
"INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES (?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
55 PrepareStatement(
WORLD_SEL_WAYPOINT_DATA_BY_ID,
"SELECT point, position_x, position_y, position_z, orientation, move_type, delay, action, action_chance FROM waypoint_data WHERE id = ? ORDER BY point",
CONNECTION_SYNCH);
80 PrepareStatement(
WORLD_SEL_CREATURE_TEMPLATE,
"SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction, npcflag, speed_walk, speed_run, speed_swim, speed_flight, detection_range, scale, `rank`, dmgschool, DamageModifier, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, type, type_flags, lootid, pickpocketloot, skinloot, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, ctm.Chase, ctm.Random, ctm.InteractionPauseTimer, HoverHeight, HealthModifier, ManaModifier, ArmorModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId WHERE entry = ?",
CONNECTION_SYNCH);
81 PrepareStatement(
WORLD_SEL_WAYPOINT_SCRIPT_BY_ID,
"SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?",
CONNECTION_SYNCH);
84 PrepareStatement(
WORLD_SEL_GAMEOBJECT_NEAREST,
"SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_",
CONNECTION_SYNCH);
85 PrepareStatement(
WORLD_SEL_CREATURE_NEAREST,
"SELECT guid, id1, id2, id3, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? AND (phaseMask & ?) <> 0 ORDER BY order_",
CONNECTION_SYNCH);
86 PrepareStatement(
WORLD_INS_CREATURE,
"INSERT INTO creature (guid, id1, id2, id3, map, spawnMask, phaseMask, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, wander_distance, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
89 PrepareStatement(
WORLD_INS_GAMEOBJECT,
"INSERT INTO gameobject (guid, id, map, spawnMask, phaseMask, position_x, position_y, position_z, orientation, rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
CONNECTION_ASYNC);
96
98}
@ CONNECTION_SYNCH
Definition: MySQLConnection.h:38
@ CONNECTION_ASYNC
Definition: MySQLConnection.h:37
@ WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID
Definition: WorldDatabase.h:63
@ WORLD_DEL_EVENT_GAMEOBJECT
Definition: WorldDatabase.h:38
@ WORLD_SEL_WAYPOINT_DATA_BY_WPGUID
Definition: WorldDatabase.h:64
@ WORLD_SEL_WAYPOINT_DATA_ACTION
Definition: WorldDatabase.h:69
@ WORLD_DEL_WAYPOINT_DATA
Definition: WorldDatabase.h:54
@ WORLD_UPD_WAYPOINT_SCRIPT_O
Definition: WorldDatabase.h:81
@ WORLD_INS_WAYPOINT_DATA
Definition: WorldDatabase.h:53
@ WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID
Definition: WorldDatabase.h:62
@ WORLD_INS_CREATURE_ADDON
Definition: WorldDatabase.h:72
@ MAX_WORLDDATABASE_STATEMENTS
Definition: WorldDatabase.h:104
@ WORLD_SEL_CREATURE_ADDON_BY_GUID
Definition: WorldDatabase.h:74
@ WORLD_DEL_GAME_EVENT_MODEL_EQUIP
Definition: WorldDatabase.h:94
@ WORLD_UPD_CREATURE_POSITION
Definition: WorldDatabase.h:49
@ WORLD_SEL_QUEST_POOLS
Definition: WorldDatabase.h:31
@ WORLD_UPD_CREATURE_NPCFLAG
Definition: WorldDatabase.h:48
@ WORLD_SEL_WAYPOINT_DATA_BY_ID
Definition: WorldDatabase.h:60
@ WORLD_DEL_GAME_TELE
Definition: WorldDatabase.h:42
@ WORLD_SEL_REQ_XP
Definition: WorldDatabase.h:101
@ WORLD_INS_GRAVEYARD_ZONE
Definition: WorldDatabase.h:39
@ WORLD_SEL_GAMEOBJECT_NEAREST
Definition: WorldDatabase.h:89
@ WORLD_UPD_WAYPOINT_DATA_POINT
Definition: WorldDatabase.h:55
@ WORLD_UPD_WAYPOINT_SCRIPT_Z
Definition: WorldDatabase.h:80
@ WORLD_SEL_NPC_VENDOR_REF
Definition: WorldDatabase.h:45
@ WORLD_DEL_DISABLES
Definition: WorldDatabase.h:98
@ WORLD_SEL_CREATURE_NEAREST
Definition: WorldDatabase.h:90
@ WORLD_SEL_SMARTAI_WP
Definition: WorldDatabase.h:36
@ WORLD_INS_GAME_TELE
Definition: WorldDatabase.h:41
@ WORLD_UPD_WAYPOINT_DATA_POSITION
Definition: WorldDatabase.h:56
@ WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA
Definition: WorldDatabase.h:100
@ WORLD_REP_CREATURE_LINKED_RESPAWN
Definition: WorldDatabase.h:33
@ WORLD_SEL_COMMANDS
Definition: WorldDatabase.h:84
@ WORLD_INS_CREATURE_FORMATION
Definition: WorldDatabase.h:52
@ WORLD_UPD_CREATURE_MOVEMENT_TYPE
Definition: WorldDatabase.h:46
@ WORLD_UPD_CREATURE_ZONE_AREA_DATA
Definition: WorldDatabase.h:99
@ WORLD_SEL_WAYPOINT_DATA_BY_POS
Definition: WorldDatabase.h:67
@ WORLD_UPD_CREATURE_ADDON_PATH
Definition: WorldDatabase.h:71
@ WORLD_DEL_GAMEOBJECT
Definition: WorldDatabase.h:37
@ WORLD_DEL_CREATURE_ADDON
Definition: WorldDatabase.h:73
@ WORLD_SEL_SMART_SCRIPTS
Definition: WorldDatabase.h:35
@ WORLD_UPD_WAYPOINT_SCRIPT_X
Definition: WorldDatabase.h:78
@ WORLD_INS_WAYPOINT_SCRIPT
Definition: WorldDatabase.h:75
@ WORLD_UPD_CREATURE_SPAWN_TIME_SECS
Definition: WorldDatabase.h:51
@ WORLD_SEL_WAYPOINT_DATA_POS_BY_ID
Definition: WorldDatabase.h:61
@ WORLD_SEL_CREATURE_TEMPLATE
Definition: WorldDatabase.h:85
@ WORLD_SEL_CREATURE_BY_ID
Definition: WorldDatabase.h:88
@ WORLD_DEL_GAME_EVENT_CREATURE
Definition: WorldDatabase.h:93
@ WORLD_DEL_WAYPOINT_SCRIPT
Definition: WorldDatabase.h:76
@ WORLD_INS_GAMEOBJECT
Definition: WorldDatabase.h:95
@ WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID
Definition: WorldDatabase.h:68
@ WORLD_SEL_WAYPOINT_SCRIPTS_MAX_ID
Definition: WorldDatabase.h:70
@ WORLD_SEL_WAYPOINT_DATA_ALL_BY_WPGUID
Definition: WorldDatabase.h:65
@ WORLD_SEL_ITEM_TEMPLATE_BY_NAME
Definition: WorldDatabase.h:87
@ WORLD_UPD_WAYPOINT_DATA_WPGUID
Definition: WorldDatabase.h:57
@ WORLD_DEL_CREATURE
Definition: WorldDatabase.h:83
@ WORLD_INS_DISABLES
Definition: WorldDatabase.h:97
@ WORLD_SEL_CREATURE_TEXT
Definition: WorldDatabase.h:34
@ WORLD_SEL_WAYPOINT_SCRIPT_BY_ID
Definition: WorldDatabase.h:86
@ WORLD_UPD_CREATURE_WANDER_DISTANCE
Definition: WorldDatabase.h:50
@ WORLD_UPD_WAYPOINT_DATA_ALL_WPGUID
Definition: WorldDatabase.h:58
@ WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID
Definition: WorldDatabase.h:82
@ WORLD_SEL_WAYPOINT_DATA_MAX_ID
Definition: WorldDatabase.h:59
@ WORLD_DEL_NPC_VENDOR
Definition: WorldDatabase.h:44
@ WORLD_INS_NPC_VENDOR
Definition: WorldDatabase.h:43
@ WORLD_SEL_WAYPOINT_DATA_MAX_POINT
Definition: WorldDatabase.h:66
@ WORLD_DEL_GRAVEYARD_ZONE
Definition: WorldDatabase.h:40
@ WORLD_SEL_DISABLES
Definition: WorldDatabase.h:96
@ WORLD_INS_GAMEOBJECT_ADDON
Definition: WorldDatabase.h:102
@ WORLD_UPD_WAYPOINT_SCRIPT_Y
Definition: WorldDatabase.h:79
@ WORLD_DEL_CRELINKED_RESPAWN
Definition: WorldDatabase.h:32
@ WORLD_UPD_WAYPOINT_SCRIPT_ID
Definition: WorldDatabase.h:77
@ WORLD_INS_CREATURE
Definition: WorldDatabase.h:92
@ WORLD_UPD_CREATURE_FACTION
Definition: WorldDatabase.h:47
void PrepareStatement(uint32 index, std::string_view sql, ConnectionFlags flags)
Definition: MySQLConnection.cpp:505
PreparedStatementContainer m_stmts
Definition: MySQLConnection.h:105
bool m_reconnecting
PreparedStatements storage.
Definition: MySQLConnection.h:106