diff --git a/contrib/support_site/static/theme.css b/contrib/support_site/static/theme.css index 2211bec6be..bfaad875c5 100644 --- a/contrib/support_site/static/theme.css +++ b/contrib/support_site/static/theme.css @@ -145,7 +145,7 @@ h2 { font-size: 1rem; font-weight: 600; margin: 0; } .field { display: grid; gap: 6px; margin-bottom: 14px; } .field > span { color: var(--muted); font-size: .82rem; } -input[type=text], input[type=search], select, textarea { +input[type=text], input[type=search], input[type=number], select, textarea { width: 100%; font: inherit; font-size: .93rem; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; } input:focus, select:focus, textarea:focus, .btn:focus-visible, .seg label:focus-visible { outline: 2px solid var(--gold-line); outline-offset: 1px; } textarea { min-height: 140px; resize: vertical; line-height: 1.5; } @@ -351,4 +351,17 @@ details.faq .a { padding: 0 16px 14px; color: var(--muted); } .totp-key { font-size: 1.05rem; letter-spacing: .06em; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; } .steps, .perks { margin: 0 0 14px; padding-left: 20px; } .steps li, .perks li { margin: 4px 0; } -.perks li::marker { color: var(--gold); } \ No newline at end of file +.perks li::marker { color: var(--gold); } +/* ---------- shop ---------- */ +.btn.sm { padding: 4px 10px; font-size: .82rem; } +.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; } +.big-num { font-size: 1.9rem; font-weight: 700; color: var(--gold); line-height: 1.1; } +.calc { padding: 10px 12px; margin: 2px 0 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; } +.calc b { color: var(--gold); } +.inline { display: inline; } +.tbl td .actions { margin: 0; } +.acts { table-layout: fixed; } +.acts th:nth-child(1) { width: 36%; } +.acts select, .acts input[type=number] { width: 100%; min-width: 0; } +.acts .cap { display: block; min-height: 1.1em; margin-bottom: 4px; font-size: .75rem; color: var(--muted); } +.acts td { vertical-align: bottom; } diff --git a/contrib/support_site/support_server.py b/contrib/support_site/support_server.py index 13e589ef73..aecc0872df 100644 --- a/contrib/support_site/support_server.py +++ b/contrib/support_site/support_server.py @@ -11,6 +11,9 @@ Usage: issue a 1 hour test token and print the URL (desktop browser test) Account page (/account): Battle.net account, game accounts, characters on every realm, and the authenticator (TOTP, any authenticator app). bnetserver asks for its code at login; secured accounts get the +4 backpack slots in game. +Shop (/shop): shop points, premium status, selling gold on the Gold Market (premium accounts; ".shop goldlist" through RA). +Shop admin (/staff/shop, staff level >= shop_admin_level): products and tabs of the in-game Store, Gold Market listings, +accounts (points, premium, Gold Market bans), the service fee. Product changes are pushed with ".shop reload" on every realm. Needs: pip install pymysql segno """ @@ -79,8 +82,119 @@ ICONS = { 'undo': '', 'search': '', 'lock': '', + 'coin': '', + 'store': '', } +# ---------------------------------------------------------------- in-game Store (worldserver TokenHandler.cpp, tables world.shop_*, +# auth.account_shop_points / shop_config, characters.shop_gold_listing; ".shop" console commands through RA) + +SHOP_ACTIONS = {1: 'Item', 2: 'Gold', 3: 'Spell / mount', 4: 'Service', 5: 'Profession', 6: 'Level', 7: 'Title', 8: 'Reputation', 9: 'Realm transfer', 10: 'Character boost token'} +SHOP_ACTION_HINTS = { # labels of the two values in the product editor ('' = not used) + 1: ('Item ID', 'Amount'), 2: ('Gold', ''), 3: ('Spell ID (mount, pet, ...)', ''), 4: ('Service', ''), + 5: ('Profession', 'Skill level'), 6: ('Level', ''), 7: ('Title ID', ''), 8: ('Faction ID', 'Standing (42000 = exalted)'), 9: ('', ''), 10: ('Boost type (6 = level 60)', ''), +} +SHOP_SERVICES = {1: 'Name change', 2: 'Appearance change', 3: 'Race change', 4: 'Faction change'} +PROFESSIONS = {171: 'Alchemy', 164: 'Blacksmithing', 333: 'Enchanting', 202: 'Engineering', 182: 'Herbalism', 165: 'Leatherworking', + 186: 'Mining', 393: 'Skinning', 197: 'Tailoring', 185: 'Cooking', 129: 'First Aid', 356: 'Fishing'} +# "new product" presets of the GM shop page: (label, group hint, name, description, icon, [(action, param1, param2)]) +SHOP_PRESETS = { + 'item': ('Item', 'Item', '', 134400, [(1, 0, 1)]), + 'gold': ('Gold', '100 Gold', 'Gold for this character.', 133784, [(2, 1000000, 0)]), + 'rename': ('Name change', 'Name Change', 'Change this character\'s name on the character screen.', 136243, [(4, 1, 0)]), + 'customize': ('Appearance change', 'Appearance Change', 'Change this character\'s appearance on the character screen.', 136243, [(4, 2, 0)]), + 'race': ('Race change', 'Race Change', 'Change this character\'s race on the character screen.', 136243, [(4, 3, 0)]), + 'faction': ('Faction change', 'Faction Change', 'Change this character\'s faction on the character screen.', 136243, [(4, 4, 0)]), + 'level': ('Level boost', 'Level 60', 'Raise this character to level 60. Visit your class trainer for new spells.', 136243, [(6, 60, 0)]), + 'profession': ('Max profession', 'Max Alchemy', 'Alchemy at 300 with every recipe.', 136240, [(5, 171, 300)]), + 'mount': ('Mount / spell', 'Mount', 'A mount for this character.', 132261, [(3, 0, 0)]), + 'title': ('Title', 'Title', 'A title for this character.', 133784, [(7, 0, 0)]), + 'reputation': ('Reputation', 'Exalted', 'Exalted with a faction.', 133784, [(8, 0, 42000)]), + 'boost': ('Character boost', 'Level 60 Boost', 'A level 60 boost for any character, used on the character screen.', 136243, [(10, 6, 0)]), +} +GOLD_MARKET_MAX_GOLD = 200000 +GOLD_MARKET_MIN_PRICE = 2 + + +def shop_account(account_id): + row = query_one(auth_db(), 'SELECT Points, Premium, GoldMarketBanned, GoldMarketBanReason FROM account_shop_points WHERE AccountID = %s', (account_id,)) + return row or {'Points': 0, 'Premium': 0, 'GoldMarketBanned': 0, 'GoldMarketBanReason': ''} + + +def shop_setting(name, default): + row = query_one(auth_db(), 'SELECT Value FROM shop_config WHERE Name = %s', (name,)) + return row['Value'] if row else default + + +def gold_fee_percent(): + try: + return max(0, min(100, int(shop_setting('GoldMarketFee', '10')))) + except ValueError: + return 10 + + +def gold_fee(price, percent): + """Same rule as the worldserver (TokenHandler.cpp): percent of the price, at least 1 point while the percent is not 0.""" + fee = price * percent // 100 + return max(fee, 1) if percent else 0 + + +def realm_online(realm_id): + """realmlist.flag 0x2 = offline (bnetserver keeps it up to date); a refused connection costs 2 s on Windows, so skip those.""" + row = query_one(auth_db(), 'SELECT flag FROM realmlist WHERE id = %s', (realm_id,)) + return bool(row) and not (int(row['flag']) & 2) + + +def shop_reload_all(): + """The worldservers cache the products: ".shop reload" on every running realm, all at once. Returns the realms that failed + (offline realms load the new products when they start).""" + failed = [] + + def reload(realm_id): + try: + if not ra_command(realm_id, 'shop reload').startswith('OK'): + failed.append(realm_name(realm_id)) + except OSError: + failed.append(realm_name(realm_id)) + + threads = [threading.Thread(target=reload, args=(r,)) for r in CFG['realms'] if ra_available(r)] + for t in threads: + t.start() + for t in threads: + t.join() + return failed + + +def shop_action_text(action, p1, p2): + if action == 1: + return 'Item %d x%d' % (p1, p2) + if action == 2: + return '%s gold' % '{:,}'.format(p1 // 10000) + if action == 3: + return 'Spell %d' % p1 + if action == 4: + return SHOP_SERVICES.get(p1, 'Service %d' % p1) + if action == 5: + return 'Max %s (%d)' % (PROFESSIONS.get(p1, 'skill %d' % p1), p2 or 300) + if action == 6: + return 'Level %d' % p1 + if action == 7: + return 'Title %d' % p1 + if action == 8: + return 'Reputation %d: %d' % (p1, p2) + if action == 9: + return 'Realm transfer' + if action == 10: + return 'Boost token (type %d)' % p1 + return 'Action %d' % action + + +def to_int(value, default=0): + try: + return int(str(value).strip()) + except (TypeError, ValueError): + return default + # ---------------------------------------------------------------- authenticator (TOTP, RFC 6238: 6 digits, 30 s, SHA-1, like the # Battle.net and Google authenticator apps); bnetserver checks the same secret with Trinity::Crypto::TOTP @@ -257,10 +371,37 @@ def connect(database): charset='utf8mb4', autocommit=True, cursorclass=pymysql.cursors.DictCursor) +# open connections kept for reuse (a new connection costs ~35 ms on Windows; a page runs dozens of queries) +DB_POOL = {} +DB_POOL_LOCK = threading.Lock() + + +def run_sql(database, sql, args, fetch): + with DB_POOL_LOCK: + conn = DB_POOL.setdefault(database, []).pop() if DB_POOL.get(database) else None + try: + if conn is None: + conn = connect(database) + else: + conn.ping(reconnect=True) + with conn.cursor() as cur: + cur.execute(sql, args) + result = cur.fetchall() if fetch else cur.lastrowid + except Exception: + if conn is not None: + conn.close() + raise + with DB_POOL_LOCK: + pool = DB_POOL.setdefault(database, []) + if len(pool) < 8: + pool.append(conn) + else: + conn.close() + return result + + def query(database, sql, args=()): - with connect(database) as conn, conn.cursor() as cur: - cur.execute(sql, args) - return cur.fetchall() + return run_sql(database, sql, args, True) def query_one(database, sql, args=()): @@ -269,9 +410,7 @@ def query_one(database, sql, args=()): def execute(database, sql, args=()): - with connect(database) as conn, conn.cursor() as cur: - cur.execute(sql, args) - return cur.lastrowid + return run_sql(database, sql, args, False) def auth_db(): @@ -311,7 +450,7 @@ def staff_level(account_id, realm_id): def ra_available(realm_id): ra = CFG.get('ra') or {} rc = realm_cfg(realm_id) or {} - return bool(ra.get('user') and rc.get('ra_port')) + return bool(ra.get('user') and rc.get('ra_port')) and realm_online(realm_id) def ra_command(realm_id, command): @@ -356,6 +495,7 @@ def start_session(token_row): 'expires': token_row['expires'], 'csrf': secrets.token_urlsafe(24), 'staff': staff_level(token_row['accountId'], token_row['realmId']) >= int(CFG.get('staff_min_level', 2)), + 'level': staff_level(token_row['accountId'], token_row['realmId']), } with SESSIONS_LOCK: now = time.time() @@ -438,6 +578,10 @@ def alert(kind, text): return '
%s
%s
' % (kind, icon('check' if kind == 'ok' else 'alert'), text) +def kv_rows(rows): + return ''.join('
%s%s
' % (k, v) for k, v in rows) + + def panel(title, body, sub='', right='', flush=False, cls=''): head = '

%s

%s%s
' % ( title, '%s' % sub if sub else '', '
%s
' % right if right else '') if title else '' @@ -539,12 +683,15 @@ class Handler(BaseHTTPRequestHandler): if s: answered = query_one(auth_db(), "SELECT COUNT(*) AS n FROM support_tickets WHERE battlenetAccountId = %s AND status = 'answered'", (s['bnet'],))['n'] - items = [('/', 'home', 'Home', 0), ('/account', 'user', 'Account', 0), ('/unstuck', 'pin', 'Unstuck', 0), ('/ticket/new?category=bug', 'bug', 'Report a bug', 0), - ('/ticket/new', 'help', 'Get help', 0), ('/tickets', 'tickets', 'My tickets', answered), ('/faq', 'book', 'FAQ', 0)] + items = [('/', 'home', 'Home', 0), ('/account', 'user', 'Account', 0), ('/shop', 'coin', 'Shop', 0), ('/unstuck', 'pin', 'Unstuck', 0), + ('/ticket/new?category=bug', 'bug', 'Report a bug', 0), ('/ticket/new', 'help', 'Get help', 0), ('/tickets', 'tickets', 'My tickets', answered), + ('/faq', 'book', 'FAQ', 0)] if s['staff']: waiting = query_one(auth_db(), "SELECT COUNT(*) AS n FROM support_tickets WHERE status = 'open'")['n'] items.append(None) items.append(('/staff', 'shield', 'Staff', waiting)) + if self.is_shop_admin(): + items.append(('/staff/shop', 'store', 'Shop admin', 0)) items.append(None) char = self.current_character() foot = ('
%s
%s
') % ( @@ -558,7 +705,8 @@ class Handler(BaseHTTPRequestHandler): links.append('
') continue href, ic, label, count = item - active = current == href or (href == '/tickets' and current == '/ticket') or (href == '/armory' and current.startswith('/armory')) + active = current == href or (href == '/tickets' and current == '/ticket') or (href == '/armory' and current.startswith('/armory')) or \ + (href == '/staff/shop' and current.startswith('/staff/shop')) links.append('%s%s%s' % ( esc(href), 'on' if active else '', esc(label), icon(ic), esc(label), '%d' % count if count else '')) nav = '' % ''.join(links) @@ -1240,6 +1388,603 @@ class Handler(BaseHTTPRequestHandler): self.page('Staff', panel('Tickets', self.ticket_rows(tickets, True), right=tabs, flush=True), 'Every ticket from every player. Oldest waiting first, so nobody is forgotten.') + # shop (player): points, premium, selling gold on the Gold Market + + def shop_page(self, note=''): + s = self.session + acc = shop_account(s['account']) + percent = gold_fee_percent() + max_listings = int(CFG.get('gold_market_max_listings', 10)) + cdb = characters_db(s['realm']) + + status = kv_rows([ + ('Shop points', '%s' % '{:,}'.format(acc['Points'])), + ('Premium', 'Premium' if acc['Premium'] else 'Not premium'), + ('Realm', esc(realm_name(s['realm']))), + ]) + status += '

Spend points in the in-game Shop (the Shop button in the main menu or on the character screen). %s

' % ( + CFG.get('shop_points_text') or 'Points come from supporting the server.') + + listings = query(cdb, 'SELECT l.ID, l.Gold, l.Price, UNIX_TIMESTAMP(l.Created) AS created, c.name FROM shop_gold_listing l ' + 'LEFT JOIN characters c ON c.guid = l.SellerGuid WHERE l.SellerAccount = %s ORDER BY l.Gold DESC', (s['account'],)) + if listings: + rows = ''.join( + '%s gold%d%d%s%s' + '
%s' + '
' % ( + '{:,}'.format(l['Gold']), l['Price'], l['Price'] - gold_fee(l['Price'], percent), esc(l['name'] or '?'), esc(fmt_ago(l['created'])), + self.csrf_field(), l['ID']) for l in listings) + mine = ('
' + '%s
GoldPriceYou getCharacterListed
') % rows + else: + mine = '
You have no gold listed.
' + + if acc['GoldMarketBanned']: + sell = alert('bad', 'You may not sell gold on the Gold Market.%s' % ( + ' Reason: %s' % esc(acc['GoldMarketBanReason']) if acc['GoldMarketBanReason'] else '')) + elif not acc['Premium']: + sell = ('

Selling gold is for premium accounts. Your account becomes premium with any point purchase.

' + '

Other players buy your gold in the in-game Shop with their points; you get the points, minus the service fee.

') + elif not ra_available(s['realm']): + sell = alert('info', 'Selling gold is not available on this realm right now.') + elif len(listings) >= max_listings: + sell = alert('info', 'You have %d listings, the most you can have at once. Cancel one or wait until one sells.' % len(listings)) + else: + chars = query(cdb, 'SELECT guid, name, class, money FROM characters WHERE account = %s AND deleteInfos_Account IS NULL ORDER BY name', + (s['account'],)) + options = ''.join('' % ( + c['guid'], ' selected' if c['guid'] == s['char'] else '', esc(c['name']), '{:,}'.format(int(c['money']) // 10000)) for c in chars) + sell = ( + '
%s' + '
Character (the gold is taken from it right away)
' + '
Gold
' + '
Price in points (at least %d)
' + '
You get - when it sells. Service fee: %d%%, at least 1 point.
' + '
' + 'Cancel any time: the gold comes back by mail.
' + '') % ( + self.csrf_field(), options, GOLD_MARKET_MAX_GOLD, GOLD_MARKET_MIN_PRICE, GOLD_MARKET_MIN_PRICE, percent, icon('coin', 'i sm'), + percent, GOLD_MARKET_MIN_PRICE) if chars else '
No characters on this realm.
' + + # realm transfers of this account (bought in the in-game Shop at the character screen) + realm_names = {r['id']: r['name'] for r in query(auth_db(), 'SELECT id, name FROM realmlist')} + transfers = query(auth_db(), 'SELECT Name, SourceRealm, TargetRealm, Status, Message, UNIX_TIMESTAMP(Created) AS created FROM character_transfer ' + 'WHERE AccountID = %s ORDER BY ID DESC LIMIT 20', (s['account'],)) + if transfers: + trs = ''.join('%s%s → %s%s%s' % ( + esc(t['Name']), esc(realm_names.get(t['SourceRealm'], t['SourceRealm'])), esc(realm_names.get(t['TargetRealm'], t['TargetRealm'])), + 'Done' if t['Status'] == 1 else + ('Failed %s - a GM will help' % esc(t['Message']) if t['Status'] == 2 else + 'On its way'), esc(fmt_ago(t['created']))) for t in transfers) + moves = ('
' + '%s
CharacterRealmsStatusWhen
') % trs + else: + moves = '
No realm transfers. Buy one in the Shop on the character screen (Services).
' + + body = note + '
%s%s
%s%s
' % ( + panel('Sell gold', sell, sub='Gold Market'), + panel('My listings', mine, sub='%d of %d' % (len(listings), max_listings), flush=True), + panel('Shop account', status, right='Premium' if acc['Premium'] else ''), + panel('My realm transfers', moves, flush=True)) + self.page('Shop', body, 'Your shop points, and gold you sell to other players for points.') + + def shop_gold_list(self): + s = self.session + acc = shop_account(s['account']) + if not acc['Premium'] or acc['GoldMarketBanned'] or not ra_available(s['realm']): + return self.shop_page(alert('bad', 'Your account can not sell gold.')) + if not rate_ok(self.client_address[0], 'goldlist', 10): + return self.shop_page(alert('bad', 'Too many tries. Wait a minute and try again.')) + guid, gold, price = to_int(self.form.get('guid')), to_int(self.form.get('gold')), to_int(self.form.get('price')) + char = query_one(characters_db(s['realm']), 'SELECT guid, name, money FROM characters WHERE guid = %s AND account = %s AND deleteInfos_Account IS NULL', + (guid, s['account'])) + if not char: + return self.shop_page(alert('bad', 'Please pick one of your characters.')) + if not 1 <= gold <= GOLD_MARKET_MAX_GOLD: + return self.shop_page(alert('bad', 'The gold must be between 1 and %s.' % '{:,}'.format(GOLD_MARKET_MAX_GOLD))) + if price < GOLD_MARKET_MIN_PRICE: + return self.shop_page(alert('bad', 'The price must be at least %d points (the service fee is at least 1 point).' % GOLD_MARKET_MIN_PRICE)) + count = query_one(characters_db(s['realm']), 'SELECT COUNT(*) AS n FROM shop_gold_listing WHERE SellerAccount = %s', (s['account'],))['n'] + if count >= int(CFG.get('gold_market_max_listings', 10)): + return self.shop_page(alert('bad', 'You already have the most listings you can have at once.')) + out = ra_command(s['realm'], 'shop goldlist %s %d %d' % (char['name'], gold, price)) + log('gold market list', char['name'], gold, price, '->', out) + if out.startswith('OK'): + return self.shop_page(alert('ok', '%s gold of %s is on the Gold Market for %d points.' % ('{:,}'.format(gold), esc(char['name']), price))) + self.shop_page(alert('bad', 'That did not work: %s.' % esc(out.replace('ERROR', '').strip() or 'unknown error'))) + + def shop_gold_cancel(self): + s = self.session + listing = query_one(characters_db(s['realm']), 'SELECT ID, Gold FROM shop_gold_listing WHERE ID = %s AND SellerAccount = %s', + (to_int(self.form.get('id')), s['account'])) + if not listing or not ra_available(s['realm']): + return self.shop_page(alert('bad', 'That listing is gone (sold already?).')) + out = ra_command(s['realm'], 'shop goldcancel %d' % listing['ID']) + log('gold market cancel', listing['ID'], '->', out) + if out.startswith('OK'): + return self.shop_page(alert('ok', 'Listing cancelled. %s gold was sent back to the character by mail.' % '{:,}'.format(listing['Gold']))) + self.shop_page(alert('bad', 'That did not work: %s.' % esc(out.replace('ERROR', '').strip() or 'unknown error'))) + + # shop admin (GM): products, tabs, Gold Market, accounts (points, premium, bans), settings + + def is_shop_admin(self): + s = self.session + return bool(s and s['staff'] and s.get('level', 0) >= int(CFG.get('shop_admin_level', 3))) + + def shop_admin_page(self, tab, body, note=''): + tabs = (('products', 'Products'), ('market', 'Gold Market'), ('transfers', 'Transfers'), ('accounts', 'Accounts'), ('settings', 'Settings')) + nav = '
%s
' % ''.join('%s' % (k, 'on' if k == tab else '', l) for k, l in tabs) + self.page('Shop admin', note + '
%s
' % nav + body, + 'Products of the in-game Shop, the Gold Market and shop accounts. Changes to products reach the game at once.') + + def staff_shop(self, note=''): + if not self.is_shop_admin(): + return self.page('Not found', '

That page does not exist.

', status=404) + tab = self.query.get('tab', 'products') + if tab == 'market': + return self.shop_admin_market(note) + if tab == 'accounts': + return self.shop_admin_accounts(note) + if tab == 'settings': + return self.shop_admin_settings(note) + if tab == 'transfers': + return self.shop_admin_transfers(note) + return self.shop_admin_products(note) + + # realm transfers (worldserver TokenHandler.cpp: auth.character_transfer written by the source realm, loaded by the target realm + # within a minute; auth.character_transfer_rule = allowed source -> target pairs) + + def shop_admin_transfers(self, note=''): + realms = query(auth_db(), 'SELECT id, name, flag FROM realmlist ORDER BY id') + names = {r['id']: r['name'] for r in realms} + rules = {(r['SourceRealm'], r['TargetRealm']): r['DeadOnly'] for r in query(auth_db(), 'SELECT * FROM character_transfer_rule')} + + head = ''.join('%s' % esc(r['name']) for r in realms) + rows = '' + for s in realms: + cells = '' + for t in realms: + if s['id'] == t['id']: + cells += '-' + continue + key = '%d_%d' % (s['id'], t['id']) + allowed = (s['id'], t['id']) in rules + cells += ('
' + '') % ( + key, ' checked' if allowed else '', key, ' checked' if rules.get((s['id'], t['id'])) else '') + rows += '%s%s' % (esc(s['name']), cells) + grid = ('
%s
%s' + '%s
From \\ To

Only ticked transfers are possible. "Dead only": the ' + 'character must have died (released ghost, or lying dead) - for Hardcore.

') % (self.csrf_field(), head, rows) + + status = self.query.get('status', '') + where, args = ('WHERE Status = %s', (int(status),)) if status in ('0', '1', '2') else ('', ()) + transfers = query(auth_db(), 'SELECT ID, AccountID, SourceRealm, TargetRealm, Name, Status, Message, UNIX_TIMESTAMP(Created) AS created, ' + 'UNIX_TIMESTAMP(Finished) AS finished FROM character_transfer ' + where + ' ORDER BY ID DESC LIMIT 200', args) + counts = {r['Status']: r['n'] for r in query(auth_db(), 'SELECT Status, COUNT(*) AS n FROM character_transfer GROUP BY Status')} + filters = '
%s
' % ''.join('%s%d' % ( + k, 'on' if k == status else '', l, sum(counts.values()) if k == '' else counts.get(int(k), 0)) + for k, l in (('', 'All'), ('0', 'Waiting'), ('2', 'Failed'), ('1', 'Done'))) + trs = '' + for t in transfers: + if t['Status'] == 1: + state = 'Done' + elif t['Status'] == 2: + state = 'Failed %s' % esc(t['Message']) + else: + state = 'Waiting' + actions = '' + if t['Status'] in (0, 2): + actions = ('
%s' + '%s
') % ( + self.csrf_field(), t['ID'], ' ' if t['Status'] == 2 else '') + trs += '%d%s%s%s → %s' \ + '%s%s%s' % ( + t['ID'], esc(t['Name']), t['AccountID'], esc(self.account_label(t['AccountID'])), esc(names.get(t['SourceRealm'], t['SourceRealm'])), + esc(names.get(t['TargetRealm'], t['TargetRealm'])), state, esc(fmt_ago(t['created'])), actions) + history = ('
' + '%s
#CharacterAccountRealmsStatusWhen
') % trs \ + if transfers else '
No transfers.
' + body = '
%s%s
' % ( + panel('Allowed transfers', grid, flush=True), + panel('Transfers', history, sub='The target realm loads a character within a minute of the purchase (or when it starts).', + right=filters, flush=True)) + self.shop_admin_page('transfers', body, note) + + def staff_shop_transfer_rules(self): + if not self.is_shop_admin(): + return self.redirect('/') + realms = [r['id'] for r in query(auth_db(), 'SELECT id FROM realmlist')] + execute(auth_db(), 'DELETE FROM character_transfer_rule') + saved = 0 + for s in realms: + for t in realms: + if s != t and self.form.get('allow_%d_%d' % (s, t)): + execute(auth_db(), 'INSERT INTO character_transfer_rule (SourceRealm, TargetRealm, DeadOnly) VALUES (%s, %s, %s)', + (s, t, 1 if self.form.get('dead_%d_%d' % (s, t)) else 0)) + saved += 1 + log('shop admin: transfer rules saved,', saved, 'allowed, by account', self.session['account']) + self.query = {'tab': 'transfers'} + self.staff_shop(alert('ok', 'Transfer rules saved: %d allowed.' % saved)) + + def staff_shop_transfer_action(self): + if not self.is_shop_admin(): + return self.redirect('/') + tid, action = to_int(self.form.get('id')), self.form.get('do') + transfer = query_one(auth_db(), 'SELECT ID, Name, SourceRealm, TargetRealm, Status FROM character_transfer WHERE ID = %s', (tid,)) + self.query = {'tab': 'transfers'} + if not transfer or transfer['Status'] == 1: + return self.staff_shop(alert('bad', 'That transfer is finished already.')) + if action == 'retry': + execute(auth_db(), "UPDATE character_transfer SET Status = 0, Message = '', Finished = NULL WHERE ID = %s AND Status = 2", (tid,)) + text = '%s will be loaded on the target realm again (within a minute while it runs).' % esc(transfer['Name']) + else: + # the source realm loads its own dump back like any arriving transfer + execute(auth_db(), "UPDATE character_transfer SET TargetRealm = SourceRealm, Status = 0, Message = 'returned by a GM', Finished = NULL " + "WHERE ID = %s AND Status <> 1", (tid,)) + text = '%s goes back to %s (within a minute while that realm runs).' % (esc(transfer['Name']), esc(realm_name(transfer['SourceRealm']))) + log('shop admin: transfer', tid, action, 'by account', self.session['account']) + self.staff_shop(alert('ok', text)) + + def shop_admin_products(self, note=''): + wdb = world_db() + groups = query(wdb, 'SELECT ID, Name, IconFileDataID, Ordering FROM shop_group ORDER BY Ordering, ID') + products = query(wdb, 'SELECT ID, GroupID, Name, Price, NormalPrice, Enabled FROM shop_product ORDER BY GroupID, Ordering, ID') + actions = {} + for a in query(wdb, 'SELECT ProductID, Action, Param1, Param2 FROM shop_product_action ORDER BY ProductID, `Index`'): + actions.setdefault(a['ProductID'], []).append(shop_action_text(a['Action'], a['Param1'], a['Param2'])) + group_names = {g['ID']: g['Name'] for g in groups} + + rows = ''.join( + '%s%s%d%s%s%s' % ( + esc(group_names.get(p['GroupID'], '?')), p['ID'], esc(p['Name']), p['Price'], + ' %d' % p['NormalPrice'] if p['NormalPrice'] > p['Price'] else '', + esc(', '.join(actions.get(p['ID'], [])) or 'nothing'), + 'On sale' if p['Enabled'] else 'Off') for p in products) + table = ('
' + '%s
TabProductPointsGivesStatus
') % rows if products else '
No products yet.
' + presets = ''.join('' % (k, esc(v[0])) for k, v in SHOP_PRESETS.items()) + new_form = ('
' + '
') % (presets, icon('plus', 'i sm')) + + group_rows = ''.join( + '
%s' + '
Name
' + '
Icon (FileDataID)
' + '
Order
' + '
 
' + 'Delete
' % ( + self.csrf_field(), g['ID'], esc(g['Name']), g['IconFileDataID'], g['Ordering'], g['ID']) for g in groups) + add_group = ('
%s' + '
New tab
' + '
Icon (FileDataID)
' + '
Order
' + '
 
' + '
') % (self.csrf_field(), len(groups) + 1) + groups_table = '
%s%s
' % (group_rows, add_group) + + body = '
%s%s
' % ( + panel('Products', table, sub='%d' % len(products), right=new_form, flush=True), + panel('Tabs', groups_table, sub='The "Gold Market" tab is added by the server when gold is listed.', flush=True)) + self.shop_admin_page('products', body, note) + + def staff_shop_product(self, note='', values=None): + if not self.is_shop_admin(): + return self.page('Not found', '

That page does not exist.

', status=404) + wdb = world_db() + groups = query(wdb, 'SELECT ID, Name FROM shop_group ORDER BY Ordering, ID') + if not groups: + return self.staff_shop(alert('bad', 'Add a tab first.')) + pid = to_int(self.query.get('id')) + if values is None: + product = query_one(wdb, 'SELECT * FROM shop_product WHERE ID = %s', (pid,)) if pid else None + if product: + acts = [(a['Action'], a['Param1'], a['Param2']) for a in + query(wdb, 'SELECT Action, Param1, Param2 FROM shop_product_action WHERE ProductID = %s ORDER BY `Index`', (pid,))] + values = dict(product, actions=acts) + else: + label, name, desc, ic, acts = SHOP_PRESETS.get(self.query.get('preset', 'item'), SHOP_PRESETS['item']) + values = {'ID': 0, 'GroupID': groups[0]['ID'], 'Name': name, 'Description': desc, 'IconFileDataID': ic, 'Price': 10, 'NormalPrice': 0, + 'Ordering': 0, 'Enabled': 1, 'actions': acts} + acts = list(values['actions']) + [(0, 0, 0)] * (6 - len(values['actions'])) + + group_opts = ''.join('' % (g['ID'], ' selected' if g['ID'] == values['GroupID'] else '', esc(g['Name'])) for g in groups) + + def options(items, current): + return ''.join('' % (k, ' selected' if k == current else '', esc(v)) for k, v in items) + + # one row per thing the product gives; the labels and controls follow the type (script below), every control is in the form + act_rows = '' + for i, (a, p1, p2) in enumerate(acts[:max(6, len(acts))]): + label1, label2 = SHOP_ACTION_HINTS.get(a, ('', '')) + act_rows += ( + '' + '%s' + '' + '%s') % ( + i, '' + options(SHOP_ACTIONS.items(), a), esc(label1), i, p1 // 10000 if a == 2 else p1, + i, options(SHOP_SERVICES.items(), p1), i, options(PROFESSIONS.items(), p1), esc(label2), i, p2 or (300 if a == 5 else 0)) + script = ('') % json.dumps( + {str(k): list(v) for k, v in SHOP_ACTION_HINTS.items()}) + hints = ''.join('
  • %s: %s
  • ' % (SHOP_ACTIONS[k], esc(' / '.join(h for h in v if h))) for k, v in SHOP_ACTION_HINTS.items()) + + form = ( + '
    %s' + '
    Name
    ' + '
    Tab
    ' + '
    Description
    ' + '
    Price (points)
    ' + '
    Was (crossed out, 0 = none)
    ' + '
    Icon (FileDataID)
    ' + '
    Order in the tab
    ' + '
    ' + '
    ' + '%s
    GivesValue
    ' + '
    Back%s
    %s') % ( + self.csrf_field(), values['ID'], esc(values['Name']), group_opts, esc(values['Description']), values['Price'], values['NormalPrice'], + values['IconFileDataID'], values['Ordering'], ' checked' if values['Enabled'] else '', act_rows, + 'Delete' % values['ID'] if values['ID'] else '', script) + help_text = ('
      %s

    Anything but items is applied to the character the player is logged in with, ' + 'so those products can only be bought in game. Items are mailed. A profession is only raised when the character already has it.

    ' + '

    Icons are FileDataIDs (wowhead shows them on an icon\'s page).

    ') % hints + self.page('Edit product' if values['ID'] else 'New product', note + '
    %s
    %s
    ' % ( + panel('Product', form), panel('What a product can give', help_text)), section='Support') + + def staff_shop_confirm(self): + """Are you sure? page before deleting a product or a tab (the in-game browser has no confirm dialogs).""" + if not self.is_shop_admin(): + return self.page('Not found', '

    That page does not exist.

    ', status=404) + what, oid = self.query.get('what'), to_int(self.query.get('id')) + table, action, back = {'product': ('shop_product', '/staff/shop/product/delete', '/staff/shop/product?id=%d' % oid), + 'group': ('shop_group', '/staff/shop/group/delete', '/staff/shop')}.get(what, (None, None, None)) + row = query_one(world_db(), 'SELECT Name FROM %s WHERE ID = %%s' % table, (oid,)) if table else None + if not row: + return self.staff_shop(alert('bad', 'That is gone already.')) + body = ('

    Delete the %s %s? This can not be undone.%s

    %s' + '
    Go back
    ') % ( + 'product' if what == 'product' else 'tab', esc(row['Name']), + ' Players who bought it keep what they got.' if what == 'product' else '', action, self.csrf_field(), oid, back) + self.page('Delete', panel('Are you sure?', body)) + + def staff_shop_product_save(self): + if not self.is_shop_admin(): + return self.redirect('/') + f = self.form + values = {'ID': to_int(f.get('id')), 'GroupID': to_int(f.get('group')), 'Name': f.get('name', '').strip()[:255], + 'Description': f.get('description', '').strip()[:8000], 'IconFileDataID': to_int(f.get('icon')), 'Price': max(0, to_int(f.get('price'))), + 'NormalPrice': max(0, to_int(f.get('normal'))), 'Ordering': to_int(f.get('ordering')), 'Enabled': 1 if f.get('enabled') else 0, + 'actions': []} + for i in range(12): + a = to_int(f.get('a%d' % i)) + if a not in SHOP_ACTIONS: + continue + p1, p2 = to_int(f.get('p1_%d' % i)), to_int(f.get('p2_%d' % i)) + if a == 2: + p1 *= 10000 # entered in gold, stored in copper + elif a == 4: + p1 = to_int(f.get('svc_%d' % i)) + elif a == 5: + p1, p2 = to_int(f.get('prof_%d' % i)), p2 or 300 + if not SHOP_ACTION_HINTS[a][1]: + p2 = 0 + if a == 1: + p2 = max(1, p2) + values['actions'].append((a, p1, p2)) + wdb = world_db() + if not values['Name']: + return self.staff_shop_product(alert('bad', 'The product needs a name.'), values) + if not query_one(wdb, 'SELECT ID FROM shop_group WHERE ID = %s', (values['GroupID'],)): + return self.staff_shop_product(alert('bad', 'Pick a tab.'), values) + if not values['actions']: + return self.staff_shop_product(alert('bad', 'The product must give something.'), values) + # actions are checked by the worldserver when it loads them (invalid ones are logged and skipped) + pid = values['ID'] + if not pid: + pid = int(query_one(wdb, 'SELECT COALESCE(MAX(ID), 0) + 1 AS id FROM shop_product')['id']) + execute(wdb, 'REPLACE INTO shop_product (ID, GroupID, Name, Description, IconFileDataID, Price, NormalPrice, Ordering, Enabled) ' + 'VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)', + (pid, values['GroupID'], values['Name'], values['Description'], values['IconFileDataID'], values['Price'], values['NormalPrice'], + values['Ordering'], values['Enabled'])) + execute(wdb, 'DELETE FROM shop_product_action WHERE ProductID = %s', (pid,)) + for i, (a, p1, p2) in enumerate(values['actions']): + execute(wdb, 'INSERT INTO shop_product_action (ProductID, `Index`, Action, Param1, Param2) VALUES (%s, %s, %s, %s, %s)', (pid, i, a, p1, p2)) + log('shop admin: product', pid, values['Name'], 'saved by account', self.session['account']) + self.after_shop_change('Saved "%s".' % esc(values['Name'])) + + def after_shop_change(self, text): + failed = shop_reload_all() + note = alert('ok', text + ' It is in the game now.') if not failed else alert( + 'info', text + ' Not reloaded on: %s (no console access); it shows there after a restart.' % esc(', '.join(failed))) + self.query = {'tab': 'products'} + self.staff_shop(note) + + def staff_shop_product_delete(self): + if not self.is_shop_admin(): + return self.redirect('/') + pid = to_int(self.form.get('id')) + execute(world_db(), 'DELETE FROM shop_product_action WHERE ProductID = %s', (pid,)) + execute(world_db(), 'DELETE FROM shop_product WHERE ID = %s', (pid,)) + log('shop admin: product', pid, 'deleted by account', self.session['account']) + self.after_shop_change('Product deleted.') + + def staff_shop_group_save(self): + if not self.is_shop_admin(): + return self.redirect('/') + gid, name = to_int(self.form.get('id')), self.form.get('name', '').strip()[:255] + if not name: + return self.staff_shop(alert('bad', 'The tab needs a name.')) + if not gid: + gid = int(query_one(world_db(), 'SELECT COALESCE(MAX(ID), 0) + 1 AS id FROM shop_group')['id']) + execute(world_db(), 'REPLACE INTO shop_group (ID, Name, IconFileDataID, Ordering) VALUES (%s, %s, %s, %s)', + (gid, name, to_int(self.form.get('icon')), to_int(self.form.get('ordering')))) + self.after_shop_change('Tab "%s" saved.' % esc(name)) + + def staff_shop_group_delete(self): + if not self.is_shop_admin(): + return self.redirect('/') + gid = to_int(self.form.get('id')) + if query_one(world_db(), 'SELECT COUNT(*) AS n FROM shop_product WHERE GroupID = %s', (gid,))['n']: + return self.staff_shop(alert('bad', 'That tab still has products. Move or delete them first.')) + execute(world_db(), 'DELETE FROM shop_group WHERE ID = %s', (gid,)) + self.after_shop_change('Tab deleted.') + + def account_label(self, account_id): + row = query_one(auth_db(), 'SELECT a.username, b.email FROM account a LEFT JOIN battlenet_accounts b ON b.id = a.battlenet_account WHERE a.id = %s', + (account_id,)) + if not row: + return 'account %d' % account_id + return '%s (#%d)' % (row['email'] or row['username'], account_id) + + def shop_admin_market(self, note=''): + percent = gold_fee_percent() + search = self.query.get('q', '').strip() + rows = [] + for realm_id in CFG['realms']: + try: + for l in query(characters_db(realm_id), 'SELECT l.ID, l.SellerAccount, l.Gold, l.Price, UNIX_TIMESTAMP(l.Created) AS created, c.name ' + 'FROM shop_gold_listing l LEFT JOIN characters c ON c.guid = l.SellerGuid ORDER BY l.Gold DESC'): + l['realm'] = realm_id + rows.append(l) + except pymysql.MySQLError: + continue + labels = {a: self.account_label(a) for a in {r['SellerAccount'] for r in rows} if a} + if search: + rows = [r for r in rows if search.lower() in (r['name'] or '').lower() or search.lower() in labels.get(r['SellerAccount'], '').lower() + or search == str(r['SellerAccount'])] + total_gold = sum(r['Gold'] for r in rows) + trs = ''.join( + '%s%d%s%s%s%s' + '
    %s' + '
    ' % ( + '{:,}'.format(r['Gold']), r['Price'], esc(r['name'] or 'server'), + '%s' % (r['SellerAccount'], esc(labels[r['SellerAccount']])) if r['SellerAccount'] else + 'server', esc(realm_name(r['realm'])), esc(fmt_ago(r['created'])), self.csrf_field(), esc(r['realm']), r['ID']) + for r in rows) + table = ('
    ' + '%s
    GoldPointsCharacterAccountRealmListed
    ') % trs \ + if rows else '
    No gold listed.
    ' + find = ('
    ' + '
    ') % esc(search) + body = panel('Listings', table, sub='%d listings, %s gold, fee %d%%' % (len(rows), '{:,}'.format(total_gold), percent), right=find, flush=True) + self.shop_admin_page('market', body, note) + + def staff_shop_listing_remove(self): + if not self.is_shop_admin(): + return self.redirect('/') + realm_id, lid = self.form.get('realm', ''), to_int(self.form.get('id')) + if not realm_cfg(realm_id) or not ra_available(realm_id): + return self.staff_shop(alert('bad', 'No console access to that realm.')) + out = ra_command(realm_id, 'shop goldcancel %d' % lid) + log('shop admin: listing', realm_id, lid, 'removed by account', self.session['account'], '->', out) + self.query['tab'] = 'market' + self.staff_shop(alert('ok', 'Listing removed, the gold was mailed back to the seller.') if out.startswith('OK') else + alert('bad', 'That did not work: %s.' % esc(out))) + + def shop_admin_accounts(self, note=''): + aid = to_int(self.query.get('id')) + search = self.query.get('q', '').strip() + if aid: + if not query_one(auth_db(), 'SELECT id FROM account WHERE id = %s', (aid,)): + return self.shop_admin_page('accounts', alert('bad', 'No such account.'), note) + acc = shop_account(aid) + listings = 0 + for realm_id in CFG['realms']: + try: + listings += query_one(characters_db(realm_id), 'SELECT COUNT(*) AS n FROM shop_gold_listing WHERE SellerAccount = %s', (aid,))['n'] + except pymysql.MySQLError: + pass + bought = query(auth_db(), 'SELECT ProductID, Price, UNIX_TIMESTAMP(Time) AS t FROM shop_purchase_log WHERE AccountID = %s ORDER BY ID DESC LIMIT 15', (aid,)) + log_rows = ''.join('%d%d%s' % (b['ProductID'], b['Price'], esc(fmt_ago(b['t']))) for b in bought) + history = ('
    %s' + '
    ProductPointsWhen
    ') % log_rows if bought else '
    No purchases.
    ' + form = ( + '
    %s%s' + '
    Add points (negative to take)
    ' + '
    ' + '
    ' + '
    Ban reason (shown to the player)
    ' + '
    ' + '
    Back
    ') % ( + self.csrf_field(), aid, kv_rows([('Points', '%s' % '{:,}'.format(acc['Points'])), + ('Gold listed', '%d listings' % listings)]), + ' checked' if acc['Premium'] else '', ' checked' if acc['GoldMarketBanned'] else '', esc(acc['GoldMarketBanReason'])) + body = '
    %s
    %s
    ' % ( + panel(esc(self.account_label(aid)), form), panel('Recent purchases', history, flush=True)) + return self.shop_admin_page('accounts', body, note) + + if search: + like = '%' + search + '%' + found = query(auth_db(), 'SELECT a.id FROM account a LEFT JOIN battlenet_accounts b ON b.id = a.battlenet_account ' + 'WHERE a.id = %s OR a.username LIKE %s OR b.email LIKE %s ORDER BY a.id LIMIT 50', (to_int(search, -1), like, like)) + title = 'Search: %s' % esc(search) + else: + found = query(auth_db(), 'SELECT AccountID AS id FROM account_shop_points WHERE Premium <> 0 OR GoldMarketBanned <> 0 OR Points <> 0 ' + 'ORDER BY AccountID LIMIT 200') + title = 'Accounts with points, premium or a ban' + trs = '' + for f in found: + acc = shop_account(f['id']) + trs += '%s%s%s%s' % ( + f['id'], esc(self.account_label(f['id'])), '{:,}'.format(acc['Points']), + 'Premium ' if acc['Premium'] else '', 'Banned' if acc['GoldMarketBanned'] else '') + table = ('
    %s' + '
    AccountPointsStatus
    ') % trs if found else '
    Nothing found.
    ' + find = ('
    ' + '
    ') % esc(search) + self.shop_admin_page('accounts', panel(title, table, right=find, flush=True), note) + + def staff_shop_account_save(self): + if not self.is_shop_admin(): + return self.redirect('/') + f = self.form + aid = to_int(f.get('id')) + if not query_one(auth_db(), 'SELECT id FROM account WHERE id = %s', (aid,)): + return self.staff_shop(alert('bad', 'No such account.')) + acc = shop_account(aid) + points = max(0, acc['Points'] + to_int(f.get('delta'))) + execute(auth_db(), 'INSERT INTO account_shop_points (AccountID, Points, Premium, GoldMarketBanned, GoldMarketBanReason) VALUES (%s, %s, %s, %s, %s) ' + 'ON DUPLICATE KEY UPDATE Points = VALUES(Points), Premium = VALUES(Premium), GoldMarketBanned = VALUES(GoldMarketBanned), ' + 'GoldMarketBanReason = VALUES(GoldMarketBanReason)', + (aid, points, 1 if f.get('premium') else 0, 1 if f.get('banned') else 0, f.get('reason', '').strip()[:255])) + removed = 0 + if f.get('remove'): + for realm_id in CFG['realms']: + if not ra_available(realm_id): + continue + for l in query(characters_db(realm_id), 'SELECT ID FROM shop_gold_listing WHERE SellerAccount = %s', (aid,)): + if ra_command(realm_id, 'shop goldcancel %d' % l['ID']).startswith('OK'): + removed += 1 + log('shop admin: account', aid, 'points', points, 'premium', bool(f.get('premium')), 'banned', bool(f.get('banned')), 'removed', removed, + 'by account', self.session['account']) + self.query.update({'tab': 'accounts', 'id': str(aid)}) + self.staff_shop(alert('ok', 'Saved. Points: %s.%s' % ('{:,}'.format(points), ' %d listings removed.' % removed if removed else ''))) + + def shop_admin_settings(self, note=''): + form = ('
    %s
    Gold Market service fee (%%)' + '
    ' + '

    Kept back from the seller when gold sells; at least 1 point while it is not 0. Used from the next sale on.

    ' + '
    ') % (self.csrf_field(), gold_fee_percent()) + self.shop_admin_page('settings', panel('Gold Market', form), note) + + def staff_shop_settings(self): + if not self.is_shop_admin(): + return self.redirect('/') + fee = max(0, min(100, to_int(self.form.get('fee'), 10))) + execute(auth_db(), "REPLACE INTO shop_config (Name, Value) VALUES ('GoldMarketFee', %s)", (str(fee),)) + log('shop admin: fee', fee, 'by account', self.session['account']) + self.query['tab'] = 'settings' + self.staff_shop(alert('ok', 'The service fee is now %d%%.' % fee)) + # URLs the client itself opens (GlobalStrings VISITABLE_URL50/6/7 hotfix) -> page DIRECT_ENTRY = { @@ -1265,6 +2010,21 @@ ROUTES = { ('POST', '/ticket/reply'): Handler.ticket_reply, ('POST', '/ticket/status'): Handler.ticket_status, ('GET', '/staff'): Handler.staff, + ('GET', '/shop'): Handler.shop_page, + ('POST', '/shop/gold/list'): Handler.shop_gold_list, + ('POST', '/shop/gold/cancel'): Handler.shop_gold_cancel, + ('GET', '/staff/shop'): Handler.staff_shop, + ('GET', '/staff/shop/product'): Handler.staff_shop_product, + ('GET', '/staff/shop/confirm'): Handler.staff_shop_confirm, + ('POST', '/staff/shop/product/save'): Handler.staff_shop_product_save, + ('POST', '/staff/shop/product/delete'): Handler.staff_shop_product_delete, + ('POST', '/staff/shop/group/save'): Handler.staff_shop_group_save, + ('POST', '/staff/shop/group/delete'): Handler.staff_shop_group_delete, + ('POST', '/staff/shop/listing/remove'): Handler.staff_shop_listing_remove, + ('POST', '/staff/shop/account/save'): Handler.staff_shop_account_save, + ('POST', '/staff/shop/settings'): Handler.staff_shop_settings, + ('POST', '/staff/shop/transfers/rules'): Handler.staff_shop_transfer_rules, + ('POST', '/staff/shop/transfers/action'): Handler.staff_shop_transfer_action, } diff --git a/contrib/support_site/support_site.example.json b/contrib/support_site/support_site.example.json index b421c46a40..beebb59c72 100644 --- a/contrib/support_site/support_site.example.json +++ b/contrib/support_site/support_site.example.json @@ -56,5 +56,8 @@ ], "icon_cdn": "https://wow.zamimg.com/images/wow/icons", "armory_search_per_minute": 20, - "armory_pages_per_minute": 60 + "armory_pages_per_minute": 60, + "shop_admin_level": 3, + "gold_market_max_listings": 10, + "shop_points_text": "Points come from supporting the server." } \ No newline at end of file diff --git a/sql/custom/auth/2026_10_12_00_auth_shop_points.sql b/sql/custom/auth/2026_10_12_00_auth_shop_points.sql new file mode 100644 index 0000000000..f5a64218d9 --- /dev/null +++ b/sql/custom/auth/2026_10_12_00_auth_shop_points.sql @@ -0,0 +1,18 @@ +-- Classic 1.60 in-game Store: shop points per game account (the web site adds them) and a log of purchases. + +CREATE TABLE IF NOT EXISTS `account_shop_points` ( + `AccountID` int unsigned NOT NULL, + `Points` int unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`AccountID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop points per game account'; + +CREATE TABLE IF NOT EXISTS `shop_purchase_log` ( + `ID` bigint unsigned NOT NULL AUTO_INCREMENT, + `AccountID` int unsigned NOT NULL, + `ProductID` int unsigned NOT NULL, + `Price` int unsigned NOT NULL, + `CharacterGUID` bigint unsigned NOT NULL, + `Time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ID`), + KEY `idx_account` (`AccountID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop purchases'; diff --git a/sql/custom/auth/2026_10_12_01_auth_shop_premium.sql b/sql/custom/auth/2026_10_12_01_auth_shop_premium.sql new file mode 100644 index 0000000000..448a5063bc --- /dev/null +++ b/sql/custom/auth/2026_10_12_01_auth_shop_premium.sql @@ -0,0 +1,26 @@ +-- Classic 1.60 in-game Store: premium accounts (may sell gold on the Gold Market; set by the web shop after a point purchase, or +-- by a GM), Gold Market bans, and shop settings the GM part of the support site changes (read by the worldserver at sale time). +-- (plain statements: the DB updater does not run DELIMITER / stored procedures) account_shop_points is rebuilt, points kept. + +DROP TABLE IF EXISTS `account_shop_points_new`; +CREATE TABLE `account_shop_points_new` ( + `AccountID` int unsigned NOT NULL, + `Points` int unsigned NOT NULL DEFAULT 0, + `Premium` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'may sell gold on the Gold Market', + `GoldMarketBanned` tinyint unsigned NOT NULL DEFAULT 0, + `GoldMarketBanReason` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`AccountID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop points per game account'; + +INSERT INTO `account_shop_points_new` (`AccountID`,`Points`) SELECT `AccountID`,`Points` FROM `account_shop_points`; +DROP TABLE `account_shop_points`; +RENAME TABLE `account_shop_points_new` TO `account_shop_points`; + +CREATE TABLE IF NOT EXISTS `shop_config` ( + `Name` varchar(64) NOT NULL, + `Value` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`Name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop settings (support site GM part)'; + +INSERT IGNORE INTO `shop_config` (`Name`,`Value`) VALUES +('GoldMarketFee','10'); diff --git a/sql/custom/auth/2026_10_12_02_auth_character_transfer.sql b/sql/custom/auth/2026_10_12_02_auth_character_transfer.sql new file mode 100644 index 0000000000..8c1793c0ca --- /dev/null +++ b/sql/custom/auth/2026_10_12_02_auth_character_transfer.sql @@ -0,0 +1,36 @@ +-- Classic 1.60 realm transfers (in-game Store "Realm Transfer"): the source worldserver writes the character dump here and removes +-- the character; the target realm's worldserver loads it (at start and every minute) and marks the row done (1) or failed (2). +-- Rules: which realm may transfer to which, for which price (support site GM part). + +CREATE TABLE IF NOT EXISTS `character_transfer` ( + `ID` int unsigned NOT NULL AUTO_INCREMENT, + `AccountID` int unsigned NOT NULL, + `SourceRealm` int unsigned NOT NULL, + `SourceGuid` bigint unsigned NOT NULL, + `TargetRealm` int unsigned NOT NULL, + `TargetGuid` bigint unsigned NOT NULL DEFAULT 0, + `Name` varchar(12) NOT NULL, + `Dump` longtext NOT NULL, + `Status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0 waiting for the target realm, 1 done, 2 failed', + `Message` varchar(255) NOT NULL DEFAULT '', + `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `Finished` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `idx_target` (`TargetRealm`,`Status`), + KEY `idx_account` (`AccountID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Realm transfers'; + +CREATE TABLE IF NOT EXISTS `character_transfer_rule` ( + `SourceRealm` int unsigned NOT NULL, + `TargetRealm` int unsigned NOT NULL, + `DeadOnly` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'only characters that died (hardcore)', + PRIMARY KEY (`SourceRealm`,`TargetRealm`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Allowed realm transfers'; + +-- default rules for the 4 rulesets (70 Normal, 71 PvP, 72 RP, 73 Hardcore): nobody moves onto Hardcore; Hardcore characters may +-- leave only once dead. Only the transfers listed here are allowed. +INSERT IGNORE INTO `character_transfer_rule` (`SourceRealm`,`TargetRealm`,`DeadOnly`) VALUES +(70,71,0),(70,72,0), +(71,70,0),(71,72,0), +(72,70,0),(72,71,0), +(73,70,1),(73,71,1),(73,72,1); diff --git a/sql/custom/auth/2026_10_12_03_auth_boost_tokens.sql b/sql/custom/auth/2026_10_12_03_auth_boost_tokens.sql new file mode 100644 index 0000000000..2c79bfe7bc --- /dev/null +++ b/sql/custom/auth/2026_10_12_03_auth_boost_tokens.sql @@ -0,0 +1,15 @@ +-- Classic 1.60 character boost tokens (bought in the in-game Store, or given by a GM): each unused one is a boost button on the +-- character screen of every realm; using it on a character raises it to the boost level. + +CREATE TABLE IF NOT EXISTS `account_boost_token` ( + `ID` int unsigned NOT NULL AUTO_INCREMENT, + `AccountID` int unsigned NOT NULL, + `BoostType` int unsigned NOT NULL DEFAULT 6 COMMENT 'CharacterServiceInfo boost type (6 = level 60)', + `Source` varchar(64) NOT NULL DEFAULT '' COMMENT 'shop product / gm', + `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `UsedRealm` int unsigned NOT NULL DEFAULT 0, + `UsedGuid` bigint unsigned NOT NULL DEFAULT 0, + `UsedTime` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `idx_account` (`AccountID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Character boost tokens'; diff --git a/sql/custom/characters/2026_10_12_21_characters_classic_gold_market.sql b/sql/custom/characters/2026_10_12_21_characters_classic_gold_market.sql new file mode 100644 index 0000000000..fbdbcc2c4e --- /dev/null +++ b/sql/custom/characters/2026_10_12_21_characters_classic_gold_market.sql @@ -0,0 +1,14 @@ +-- Classic 1.60 in-game Store, Gold Market tab: gold offered by players for shop points. Buyers see only the amount and price; +-- the seller is kept for GMs (support site). The seller's gold is taken when listing; on sale the seller's account gets the +-- price minus Classic.Shop.GoldMarketFee percent. SellerAccount 0 = listed by the server (tests). + +CREATE TABLE IF NOT EXISTS `shop_gold_listing` ( + `ID` int unsigned NOT NULL AUTO_INCREMENT, + `SellerAccount` int unsigned NOT NULL DEFAULT 0, + `SellerGuid` bigint unsigned NOT NULL DEFAULT 0, + `Gold` int unsigned NOT NULL COMMENT 'gold (not copper)', + `Price` int unsigned NOT NULL COMMENT 'shop points', + `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ID`), + KEY `idx_seller` (`SellerAccount`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Gold Market listings'; diff --git a/sql/custom/hotfixes/2026_10_12_00_hotfixes_classic_boost_any_spec.sql b/sql/custom/hotfixes/2026_10_12_00_hotfixes_classic_boost_any_spec.sql new file mode 100644 index 0000000000..1eb399110d --- /dev/null +++ b/sql/custom/hotfixes/2026_10_12_00_hotfixes_classic_boost_any_spec.sql @@ -0,0 +1,12 @@ +-- Classic 1.60: the character boost (CharacterServiceInfo 120, level 60) lets the player choose any specialization. The client row has +-- Flags 1 = RestrictToRecommendedSpecs, and Classic's one specialization per class is not "recommended", so the boost flow's spec +-- step allowed nothing ("This specialization isn't available for a Boosted character"). Same row with Flags 0. +-- Record: FlowTitle, PopupTitle, PopupDescription (strings), then 10 int32 (Flags is the 5th). + +DELETE FROM `hotfix_blob` WHERE `TableHash` IN (1454018603, 1453101099) AND `RecordId` = 120; -- 1453101099: earlier wrong hash +INSERT INTO `hotfix_blob` (`TableHash`,`RecordId`,`locale`,`Blob`,`VerifiedBuild`) VALUES +(1454018603,120,'enUS',0x4c6576656c20363020426f6f73740046726565204c6576656c20363020426f6f737400000100000006000000654c41003c00000000000000000000003c0000000800000009010000db150000,70338); + +DELETE FROM `hotfix_data` WHERE `Id` IN (2000100, 2000101); -- 2000100 went out with a wrong table hash; clients cached that push id +INSERT INTO `hotfix_data` (`Id`,`UniqueId`,`TableHash`,`RecordId`,`Status`,`VerifiedBuild`) VALUES +(2000101,2000101,1454018603,120,1,70338); diff --git a/sql/custom/world/2026_10_12_41_world_classic_shop.sql b/sql/custom/world/2026_10_12_41_world_classic_shop.sql new file mode 100644 index 0000000000..a5daec1f0f --- /dev/null +++ b/sql/custom/world/2026_10_12_41_world_classic_shop.sql @@ -0,0 +1,42 @@ +-- Classic 1.60 in-game Store (Shop window): tabs, products and what each product gives. +-- Prices are in shop points (auth.account_shop_points); the client shows them with its currency format ("$100" = 100 points). + +DROP TABLE IF EXISTS `shop_group`; +CREATE TABLE `shop_group` ( + `ID` int unsigned NOT NULL, + `Name` varchar(255) NOT NULL DEFAULT '', + `IconFileDataID` int NOT NULL DEFAULT 0 COMMENT 'tab icon (FileDataID)', + `Ordering` int NOT NULL DEFAULT 0, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop tabs'; + +DROP TABLE IF EXISTS `shop_product`; +CREATE TABLE `shop_product` ( + `ID` int unsigned NOT NULL, + `GroupID` int unsigned NOT NULL, + `Name` varchar(255) NOT NULL DEFAULT '', + `Description` text NOT NULL, + `IconFileDataID` int NOT NULL DEFAULT 0 COMMENT 'card icon (FileDataID)', + `Price` int unsigned NOT NULL DEFAULT 0 COMMENT 'shop points', + `NormalPrice` int unsigned NOT NULL DEFAULT 0 COMMENT 'crossed-out price for a sale, 0 = no sale', + `Ordering` int NOT NULL DEFAULT 0, + `Enabled` tinyint unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Shop products'; + +DROP TABLE IF EXISTS `shop_product_item`; +CREATE TABLE `shop_product_item` ( + `ProductID` int unsigned NOT NULL, + `ItemID` int unsigned NOT NULL, + `Count` int unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`ProductID`,`ItemID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Items a shop product mails to the character'; + +INSERT INTO `shop_group` (`ID`,`Name`,`IconFileDataID`,`Ordering`) VALUES +(1,'General',134414,1); + +INSERT INTO `shop_product` (`ID`,`GroupID`,`Name`,`Description`,`IconFileDataID`,`Price`,`NormalPrice`,`Ordering`,`Enabled`) VALUES +(1,1,'Hearthstone','A spare Hearthstone, sent by mail.',134414,1,0,1,1); + +INSERT INTO `shop_product_item` (`ProductID`,`ItemID`,`Count`) VALUES +(1,6948,1); diff --git a/sql/custom/world/2026_10_12_42_world_classic_shop_actions.sql b/sql/custom/world/2026_10_12_42_world_classic_shop_actions.sql new file mode 100644 index 0000000000..0a3a5e7780 --- /dev/null +++ b/sql/custom/world/2026_10_12_42_world_classic_shop_actions.sql @@ -0,0 +1,52 @@ +-- Classic 1.60 in-game Store: what a product does, as a list of actions (replaces shop_product_item). +-- Action Param1 Param2 +-- 1 Item item entry count (mailed) +-- 2 Gold copper - +-- 3 Spell spell id (mount, ...) - +-- 4 Service 1 rename, 2 customize, - (the character gets the flag, applied on the character screen) +-- 3 race change, 4 faction change +-- 5 Profession skill line id skill value (0 = 300); learns every recipe of the profession +-- 6 Level level - +-- 7 Title CharTitles id - +-- 8 Reputation faction id standing value (e.g. 42000 = exalted) +-- Products with any action other than Item act on the character in game, so they can only be bought in game. + +DROP TABLE IF EXISTS `shop_product_action`; +CREATE TABLE `shop_product_action` ( + `ProductID` int unsigned NOT NULL, + `Index` tinyint unsigned NOT NULL DEFAULT 0, + `Action` tinyint unsigned NOT NULL, + `Param1` int NOT NULL DEFAULT 0, + `Param2` int NOT NULL DEFAULT 0, + PRIMARY KEY (`ProductID`,`Index`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='What a shop product does'; + +DROP TABLE IF EXISTS `shop_product_item`; + +DELETE FROM `shop_group` WHERE `ID` IN (1,2,3); +INSERT INTO `shop_group` (`ID`,`Name`,`IconFileDataID`,`Ordering`) VALUES +(1,'General',134414,1), +(2,'Services',136243,2), +(3,'Professions',136240,3); + +DELETE FROM `shop_product` WHERE `ID` BETWEEN 1 AND 20; +INSERT INTO `shop_product` (`ID`,`GroupID`,`Name`,`Description`,`IconFileDataID`,`Price`,`NormalPrice`,`Ordering`,`Enabled`) VALUES +(1,1,'Hearthstone','A spare Hearthstone, sent by mail.',134414,1,0,1,1), +(2,1,'100 Gold','100 gold for this character.',133784,10,0,2,1), +(10,2,'Name Change','Change this character''s name on the character screen.',136243,10,0,1,1), +(11,2,'Appearance Change','Change this character''s appearance on the character screen.',136243,10,0,2,1), +(12,2,'Race Change','Change this character''s race on the character screen.',136243,20,0,3,1), +(13,2,'Faction Change','Change this character''s faction on the character screen.',136243,30,0,4,1), +(14,2,'Level 60','Raise this character to level 60. Visit your class trainer for new spells.',136243,50,0,5,1), +(20,3,'Max Alchemy','Alchemy at 300 with every recipe.',136240,25,0,1,1); + +DELETE FROM `shop_product_action` WHERE `ProductID` BETWEEN 1 AND 20; +INSERT INTO `shop_product_action` (`ProductID`,`Index`,`Action`,`Param1`,`Param2`) VALUES +(1,0,1,6948,1), +(2,0,2,1000000,0), +(10,0,4,1,0), +(11,0,4,2,0), +(12,0,4,3,0), +(13,0,4,4,0), +(14,0,6,60,0), +(20,0,5,171,300); diff --git a/sql/custom/world/2026_10_12_43_world_classic_shop_boost_items.sql b/sql/custom/world/2026_10_12_43_world_classic_shop_boost_items.sql new file mode 100644 index 0000000000..abd994de7b --- /dev/null +++ b/sql/custom/world/2026_10_12_43_world_classic_shop_boost_items.sql @@ -0,0 +1,10 @@ +-- Classic 1.60 character boost (character screen boost button, auth.account_boost_token): items mailed to the boosted character. +-- ClassID 0 = every class. Empty by default: fill it with the starter gear sets you want. + +CREATE TABLE IF NOT EXISTS `shop_boost_item` ( + `BoostType` int unsigned NOT NULL DEFAULT 6 COMMENT '6 = level 60', + `ClassID` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0 = all classes', + `ItemID` int unsigned NOT NULL, + `Count` int unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`BoostType`,`ClassID`,`ItemID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Items mailed with a character boost'; diff --git a/sql/custom/world/2026_10_12_44_world_classic_boost_gear.sql b/sql/custom/world/2026_10_12_44_world_classic_boost_gear.sql new file mode 100644 index 0000000000..467a37e30e --- /dev/null +++ b/sql/custom/world/2026_10_12_44_world_classic_boost_gear.sql @@ -0,0 +1,311 @@ +-- Classic 1.60 level-60 character boost (BoostType 6): a green starter set per class, mailed by +-- WorldSession::HandleBattlePayDistributionAssignToTarget (TokenHandler.cpp). +-- RandomPropertyID = the ItemBonusList ID of the random suffix ("... of the Tiger"): in this core the vanilla random +-- properties are bonus lists (ItemBonus.db2 type 2 = stat + allocation, type 5 = suffix name), picked from +-- item_random_bonus_list_template via item_template_addon.RandomBonusListTemplateId. 0 = roll from the item's pool (or none). +-- Suffix bonus lists used: 12718 Eagle (Int/Sta), 12721 Monkey (Agi/Sta), 12722 Bear (Str/Sta), 12724 Falcon (Agi/Int), +-- 12727 Tiger (Str/Agi), 12756 Arcane Wrath, 12758 Frozen Wrath, 12761 Shadow Wrath (spell damage of one school). +-- Stat amounts below are for the item's level (RandPropPoints, uncommon) as the client and server compute them. + +DROP TABLE IF EXISTS `shop_boost_item`; +CREATE TABLE `shop_boost_item` ( + `BoostType` int unsigned NOT NULL DEFAULT 6 COMMENT '6 = level 60', + `ClassID` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0 = all classes', + `ItemID` int unsigned NOT NULL, + `Count` int unsigned NOT NULL DEFAULT 1, + `RandomPropertyID` int unsigned NOT NULL DEFAULT 0 COMMENT 'ItemBonusList ID of the random suffix, 0 = none / random', + PRIMARY KEY (`BoostType`,`ClassID`,`ItemID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Items mailed with a character boost'; + +-- Warrior (ClassID 1) +-- Head 10379 Commander's Helm of the Tiger, ilvl 61 req 56: +18 Agility, +18 Strength +-- Shoulders 10383 Commander's Pauldrons of the Tiger, ilvl 61 req 56: +13 Agility, +13 Strength +-- Chest 10378 Commander's Armor of the Tiger, ilvl 63 req 58: +19 Agility, +19 Strength +-- Wrists 10377 Commander's Vambraces of the Tiger, ilvl 59 req 54: +9 Agility, +9 Strength +-- Hands 10380 Commander's Gauntlets of the Tiger, ilvl 60 req 55: +13 Agility, +13 Strength +-- Waist 10381 Commander's Girdle of the Tiger, ilvl 59 req 54: +13 Agility, +13 Strength +-- Legs 10382 Commander's Leggings of the Tiger, ilvl 62 req 57: +18 Agility, +18 Strength +-- Feet 10376 Commander's Boots of the Tiger, ilvl 60 req 55: +13 Agility, +13 Strength +-- Back 10258 Adventurer's Cape of the Tiger, ilvl 60 req 55: +10 Agility, +10 Strength +-- Neck 12036 Granite Necklace of the Tiger, ilvl 62 req 57: +10 Agility, +10 Strength +-- Finger 12016 Jungle Ring of the Tiger, ilvl 61 req 56: +10 Agility, +10 Strength +-- Finger 12015 Swamp Ring of the Tiger, ilvl 57 req 52: +9 Agility, +9 Strength +-- Two-Hand 15273 Death Striker of the Tiger, ilvl 63 req 58: +19 Agility, +19 Strength +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,1,10379,1,12727), +(6,1,10383,1,12727), +(6,1,10378,1,12727), +(6,1,10377,1,12727), +(6,1,10380,1,12727), +(6,1,10381,1,12727), +(6,1,10382,1,12727), +(6,1,10376,1,12727), +(6,1,10258,1,12727), +(6,1,12036,1,12727), +(6,1,12016,1,12727), +(6,1,12015,1,12727), +(6,1,15273,1,12727), +(6,1,4500,4,0); + +-- Paladin (ClassID 2) +-- Head 10379 Commander's Helm of the Bear, ilvl 61 req 56: +18 Stamina, +18 Strength +-- Shoulders 10383 Commander's Pauldrons of the Bear, ilvl 61 req 56: +13 Stamina, +13 Strength +-- Chest 10378 Commander's Armor of the Bear, ilvl 63 req 58: +19 Stamina, +19 Strength +-- Wrists 10377 Commander's Vambraces of the Bear, ilvl 59 req 54: +9 Stamina, +9 Strength +-- Hands 10380 Commander's Gauntlets of the Bear, ilvl 60 req 55: +13 Stamina, +13 Strength +-- Waist 10381 Commander's Girdle of the Bear, ilvl 59 req 54: +13 Stamina, +13 Strength +-- Legs 10382 Commander's Leggings of the Bear, ilvl 62 req 57: +18 Stamina, +18 Strength +-- Feet 10376 Commander's Boots of the Bear, ilvl 60 req 55: +13 Stamina, +13 Strength +-- Back 15437 Supreme Cape of the Bear, ilvl 61 req 56: +10 Stamina, +10 Strength +-- Neck 12027 Vermilion Necklace of the Bear, ilvl 63 req 58: +10 Stamina, +10 Strength +-- Finger 12005 Granite Ring of the Bear, ilvl 62 req 57: +10 Stamina, +10 Strength +-- Finger 12016 Jungle Ring of the Bear, ilvl 61 req 56: +10 Stamina, +10 Strength +-- Two-Hand 15267 Brutehammer of the Bear, ilvl 63 req 58: +19 Stamina, +19 Strength +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,2,10379,1,12722), +(6,2,10383,1,12722), +(6,2,10378,1,12722), +(6,2,10377,1,12722), +(6,2,10380,1,12722), +(6,2,10381,1,12722), +(6,2,10382,1,12722), +(6,2,10376,1,12722), +(6,2,15437,1,12722), +(6,2,12027,1,12722), +(6,2,12005,1,12722), +(6,2,12016,1,12722), +(6,2,15267,1,12722), +(6,2,4500,4,0); + +-- Hunter (ClassID 3) +-- Head 15670 Magnificent Helmet of the Falcon, ilvl 61 req 56: +18 Agility, +18 Intellect +-- Shoulders 15677 Magnificent Shoulders of the Falcon, ilvl 61 req 56: +13 Agility, +13 Intellect +-- Chest 15669 Magnificent Breastplate of the Falcon, ilvl 62 req 57: +18 Agility, +18 Intellect +-- Wrists 15668 Magnificent Bracers of the Falcon, ilvl 58 req 53: +9 Agility, +9 Intellect +-- Hands 15672 Magnificent Gauntlets of the Falcon, ilvl 60 req 55: +13 Agility, +13 Intellect +-- Waist 15673 Magnificent Belt of the Falcon, ilvl 58 req 53: +13 Agility, +13 Intellect +-- Legs 15676 Magnificent Leggings of the Falcon, ilvl 61 req 56: +18 Agility, +18 Intellect +-- Feet 15674 Magnificent Greaves of the Falcon, ilvl 60 req 55: +13 Agility, +13 Intellect +-- Back 10267 Masterwork Cape of the Falcon, ilvl 61 req 56: +10 Agility, +10 Intellect +-- Neck 12027 Vermilion Necklace of the Falcon, ilvl 63 req 58: +10 Agility, +10 Intellect +-- Finger 11992 Vermilion Band of the Falcon, ilvl 63 req 58: +10 Agility, +10 Intellect +-- Finger 12005 Granite Ring of the Falcon, ilvl 62 req 57: +10 Agility, +10 Intellect +-- Ranged 15296 Hawkeye Bow of the Falcon, ilvl 63 req 58: +19 Agility, +19 Intellect +-- Two-Hand 15273 Death Striker of the Monkey, ilvl 63 req 58: +19 Agility, +19 Stamina +-- Bag 4500 Traveler's Backpack x3, ilvl 55 req 0: 16 slots +-- Bag 8217 Quickdraw Quiver, ilvl 45 req 40: 16 slots +-- Ammo 11285 Jagged Arrow x1000, ilvl 45 req 40 +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,3,15670,1,12724), +(6,3,15677,1,12724), +(6,3,15669,1,12724), +(6,3,15668,1,12724), +(6,3,15672,1,12724), +(6,3,15673,1,12724), +(6,3,15676,1,12724), +(6,3,15674,1,12724), +(6,3,10267,1,12724), +(6,3,12027,1,12724), +(6,3,11992,1,12724), +(6,3,12005,1,12724), +(6,3,15296,1,12724), +(6,3,15273,1,12721), +(6,3,4500,3,0), +(6,3,8217,1,0), +(6,3,11285,1000,0); + +-- Rogue (ClassID 4) +-- Head 10226 Nightshade Helmet of the Monkey, ilvl 61 req 56: +18 Agility, +18 Stamina +-- Shoulders 10228 Nightshade Spaulders of the Monkey, ilvl 60 req 55: +13 Agility, +13 Stamina +-- Chest 10220 Nightshade Tunic of the Monkey, ilvl 63 req 58: +19 Agility, +19 Stamina +-- Wrists 10223 Nightshade Armguards of the Monkey, ilvl 58 req 53: +9 Agility, +9 Stamina +-- Hands 10225 Nightshade Gloves of the Monkey, ilvl 59 req 54: +13 Agility, +13 Stamina +-- Waist 10221 Nightshade Girdle of the Monkey, ilvl 58 req 53: +13 Agility, +13 Stamina +-- Legs 10227 Nightshade Leggings of the Monkey, ilvl 62 req 57: +18 Agility, +18 Stamina +-- Feet 10222 Nightshade Boots of the Monkey, ilvl 59 req 54: +13 Agility, +13 Stamina +-- Back 10224 Nightshade Cloak of the Monkey, ilvl 57 req 52: +9 Agility, +9 Stamina +-- Neck 12036 Granite Necklace of the Monkey, ilvl 62 req 57: +10 Agility, +10 Stamina +-- Finger 11992 Vermilion Band of the Monkey, ilvl 63 req 58: +10 Agility, +10 Stamina +-- Finger 12005 Granite Ring of the Monkey, ilvl 62 req 57: +10 Agility, +10 Stamina +-- Main Hand 15220 Battlefell Sabre of the Monkey, ilvl 62 req 57: +7 Agility, +7 Stamina +-- One-Hand 15246 Demon Blade of the Monkey, ilvl 62 req 57: +7 Agility, +7 Stamina +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,4,10226,1,12721), +(6,4,10228,1,12721), +(6,4,10220,1,12721), +(6,4,10223,1,12721), +(6,4,10225,1,12721), +(6,4,10221,1,12721), +(6,4,10227,1,12721), +(6,4,10222,1,12721), +(6,4,10224,1,12721), +(6,4,12036,1,12721), +(6,4,11992,1,12721), +(6,4,12005,1,12721), +(6,4,15220,1,12721), +(6,4,15246,1,12721), +(6,4,4500,4,0); + +-- Priest (ClassID 5) +-- Head 14312 Celestial Crown of the Eagle, ilvl 61 req 56: +18 Intellect, +18 Stamina +-- Shoulders 14316 Celestial Pauldrons of the Eagle, ilvl 59 req 54: +13 Intellect, +13 Stamina +-- Chest 14317 Celestial Silk Robes of the Eagle, ilvl 61 req 56: +18 Intellect, +18 Stamina +-- Wrists 14311 Celestial Bindings of the Eagle, ilvl 55 req 50: +9 Intellect, +9 Stamina +-- Hands 14314 Celestial Handwraps of the Eagle, ilvl 58 req 53: +13 Intellect, +13 Stamina +-- Waist 14309 Celestial Belt of the Eagle, ilvl 56 req 51: +12 Intellect, +12 Stamina +-- Legs 14315 Celestial Kilt of the Eagle, ilvl 59 req 54: +17 Intellect, +17 Stamina +-- Feet 14310 Celestial Slippers of the Eagle, ilvl 58 req 53: +13 Intellect, +13 Stamina +-- Back 14313 Celestial Cape of the Eagle, ilvl 54 req 49: +9 Intellect, +9 Stamina +-- Neck 12027 Vermilion Necklace of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 11992 Vermilion Band of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 12005 Granite Ring of the Eagle, ilvl 62 req 57: +10 Intellect, +10 Stamina +-- Two-Hand 15278 Solstice Staff of Shadow Wrath, ilvl 60 req 55: +37 Shadow Damage +-- Ranged 15282 Dragon Finger of the Eagle, ilvl 60 req 55: +7 Intellect, +7 Stamina +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,5,14312,1,12718), +(6,5,14316,1,12718), +(6,5,14317,1,12718), +(6,5,14311,1,12718), +(6,5,14314,1,12718), +(6,5,14309,1,12718), +(6,5,14315,1,12718), +(6,5,14310,1,12718), +(6,5,14313,1,12718), +(6,5,12027,1,12718), +(6,5,11992,1,12718), +(6,5,12005,1,12718), +(6,5,15278,1,12761), +(6,5,15282,1,12718), +(6,5,4500,4,0); + +-- Shaman (ClassID 7) +-- Head 15670 Magnificent Helmet of the Tiger, ilvl 61 req 56: +18 Agility, +18 Strength +-- Shoulders 15677 Magnificent Shoulders of the Tiger, ilvl 61 req 56: +13 Agility, +13 Strength +-- Chest 15669 Magnificent Breastplate of the Tiger, ilvl 62 req 57: +18 Agility, +18 Strength (suffix not in the item's own random pool) +-- Wrists 15668 Magnificent Bracers of the Tiger, ilvl 58 req 53: +9 Agility, +9 Strength +-- Hands 15672 Magnificent Gauntlets of the Tiger, ilvl 60 req 55: +13 Agility, +13 Strength +-- Waist 15673 Magnificent Belt of the Tiger, ilvl 58 req 53: +13 Agility, +13 Strength +-- Legs 15676 Magnificent Leggings of the Tiger, ilvl 61 req 56: +18 Agility, +18 Strength (suffix not in the item's own random pool) +-- Feet 15674 Magnificent Greaves of the Tiger, ilvl 60 req 55: +13 Agility, +13 Strength (suffix not in the item's own random pool) +-- Back 10258 Adventurer's Cape of the Tiger, ilvl 60 req 55: +10 Agility, +10 Strength +-- Neck 12036 Granite Necklace of the Tiger, ilvl 62 req 57: +10 Agility, +10 Strength +-- Finger 12016 Jungle Ring of the Tiger, ilvl 61 req 56: +10 Agility, +10 Strength +-- Finger 12015 Swamp Ring of the Tiger, ilvl 57 req 52: +9 Agility, +9 Strength +-- Two-Hand 15278 Solstice Staff of the Tiger, ilvl 60 req 55: +17 Agility, +17 Strength (suffix not in the item's own random pool) +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,7,15670,1,12727), +(6,7,15677,1,12727), +(6,7,15669,1,12727), +(6,7,15668,1,12727), +(6,7,15672,1,12727), +(6,7,15673,1,12727), +(6,7,15676,1,12727), +(6,7,15674,1,12727), +(6,7,10258,1,12727), +(6,7,12036,1,12727), +(6,7,12016,1,12727), +(6,7,12015,1,12727), +(6,7,15278,1,12727), +(6,7,4500,4,0); + +-- Mage (ClassID 8) +-- Head 10219 Elegant Circlet of the Eagle, ilvl 60 req 55: +17 Intellect, +17 Stamina +-- Shoulders 10210 Elegant Mantle of the Eagle, ilvl 60 req 55: +13 Intellect, +13 Stamina +-- Chest 10215 Elegant Robes of the Eagle, ilvl 62 req 57: +18 Intellect, +18 Stamina +-- Wrists 10213 Elegant Bracers of the Eagle, ilvl 58 req 53: +9 Intellect, +9 Stamina +-- Hands 10214 Elegant Gloves of the Eagle, ilvl 59 req 54: +13 Intellect, +13 Stamina +-- Waist 10216 Elegant Belt of the Eagle, ilvl 58 req 53: +13 Intellect, +13 Stamina +-- Legs 10217 Elegant Leggings of the Eagle, ilvl 61 req 56: +18 Intellect, +18 Stamina +-- Feet 10211 Elegant Boots of the Eagle, ilvl 59 req 54: +13 Intellect, +13 Stamina +-- Back 10212 Elegant Cloak of the Eagle, ilvl 57 req 52: +9 Intellect, +9 Stamina +-- Neck 12027 Vermilion Necklace of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 11992 Vermilion Band of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 12005 Granite Ring of the Eagle, ilvl 62 req 57: +10 Intellect, +10 Stamina +-- Two-Hand 15278 Solstice Staff of Frozen Wrath, ilvl 60 req 55: +37 Frost Damage +-- Ranged 15282 Dragon Finger of the Eagle, ilvl 60 req 55: +7 Intellect, +7 Stamina +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,8,10219,1,12718), +(6,8,10210,1,12718), +(6,8,10215,1,12718), +(6,8,10213,1,12718), +(6,8,10214,1,12718), +(6,8,10216,1,12718), +(6,8,10217,1,12718), +(6,8,10211,1,12718), +(6,8,10212,1,12718), +(6,8,12027,1,12718), +(6,8,11992,1,12718), +(6,8,12005,1,12718), +(6,8,15278,1,12758), +(6,8,15282,1,12718), +(6,8,4500,4,0); + +-- Warlock (ClassID 9) +-- Head 14322 Resplendent Circlet of the Eagle, ilvl 62 req 57: +18 Intellect, +18 Stamina +-- Shoulders 14325 Resplendent Epaulets of the Eagle, ilvl 61 req 56: +13 Intellect, +13 Stamina +-- Chest 14326 Resplendent Robes of the Eagle, ilvl 63 req 58: +19 Intellect, +19 Stamina +-- Wrists 14320 Resplendent Bracelets of the Eagle, ilvl 57 req 52: +9 Intellect, +9 Stamina +-- Hands 14323 Resplendent Gauntlets of the Eagle, ilvl 60 req 55: +13 Intellect, +13 Stamina +-- Waist 14327 Resplendent Belt of the Eagle, ilvl 58 req 53: +13 Intellect, +13 Stamina +-- Legs 14324 Resplendent Sarong of the Eagle, ilvl 60 req 55: +17 Intellect, +17 Stamina +-- Feet 14319 Resplendent Boots of the Eagle, ilvl 59 req 54: +13 Intellect, +13 Stamina +-- Back 14321 Resplendent Cloak of the Eagle, ilvl 55 req 50: +9 Intellect, +9 Stamina +-- Neck 12027 Vermilion Necklace of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 11992 Vermilion Band of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 12005 Granite Ring of the Eagle, ilvl 62 req 57: +10 Intellect, +10 Stamina +-- Two-Hand 15278 Solstice Staff of Shadow Wrath, ilvl 60 req 55: +37 Shadow Damage +-- Ranged 15282 Dragon Finger of the Eagle, ilvl 60 req 55: +7 Intellect, +7 Stamina +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,9,14322,1,12718), +(6,9,14325,1,12718), +(6,9,14326,1,12718), +(6,9,14320,1,12718), +(6,9,14323,1,12718), +(6,9,14327,1,12718), +(6,9,14324,1,12718), +(6,9,14319,1,12718), +(6,9,14321,1,12718), +(6,9,12027,1,12718), +(6,9,11992,1,12718), +(6,9,12005,1,12718), +(6,9,15278,1,12761), +(6,9,15282,1,12718), +(6,9,4500,4,0); + +-- Druid (ClassID 11) +-- Head 15193 Grand Crown of the Eagle, ilvl 62 req 57: +18 Intellect, +18 Stamina +-- Shoulders 15693 Grand Shoulders of the Eagle, ilvl 59 req 54: +13 Intellect, +13 Stamina +-- Chest 15195 Grand Breastplate of the Eagle, ilvl 62 req 57: +18 Intellect, +18 Stamina +-- Wrists 15188 Grand Armguards of the Eagle, ilvl 57 req 52: +9 Intellect, +9 Stamina +-- Hands 15192 Grand Gauntlets of the Eagle, ilvl 60 req 55: +13 Intellect, +13 Stamina +-- Waist 15191 Grand Belt of the Eagle, ilvl 57 req 52: +12 Intellect, +12 Stamina +-- Legs 15194 Grand Legguards of the Eagle, ilvl 61 req 56: +18 Intellect, +18 Stamina +-- Feet 15189 Grand Boots of the Eagle, ilvl 60 req 55: +13 Intellect, +13 Stamina +-- Back 15190 Grand Cloak of the Eagle, ilvl 55 req 50: +9 Intellect, +9 Stamina +-- Neck 12027 Vermilion Necklace of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 11992 Vermilion Band of the Eagle, ilvl 63 req 58: +10 Intellect, +10 Stamina +-- Finger 12005 Granite Ring of the Eagle, ilvl 62 req 57: +10 Intellect, +10 Stamina +-- Two-Hand 15278 Solstice Staff of Arcane Wrath, ilvl 60 req 55: +37 Arcane Damage +-- Bag 4500 Traveler's Backpack x4, ilvl 55 req 0: 16 slots +INSERT INTO `shop_boost_item` (`BoostType`,`ClassID`,`ItemID`,`Count`,`RandomPropertyID`) VALUES +(6,11,15193,1,12718), +(6,11,15693,1,12718), +(6,11,15195,1,12718), +(6,11,15188,1,12718), +(6,11,15192,1,12718), +(6,11,15191,1,12718), +(6,11,15194,1,12718), +(6,11,15189,1,12718), +(6,11,15190,1,12718), +(6,11,12027,1,12718), +(6,11,11992,1,12718), +(6,11,12005,1,12718), +(6,11,15278,1,12756), +(6,11,4500,4,0); diff --git a/sql/custom/world/2026_10_13_00_world_classic_hall_of_thanes_instance.sql b/sql/custom/world/2026_10_13_00_world_classic_hall_of_thanes_instance.sql new file mode 100644 index 0000000000..5f7990634d --- /dev/null +++ b/sql/custom/world/2026_10_13_00_world_classic_hall_of_thanes_instance.sql @@ -0,0 +1,35 @@ +-- Classic 1.60: The Hall of Thanes dungeon, map 3065 (zone 16919), from the official sniff of 2026-10-12 (gen_hall_of_thanes.py). +-- Entrance: the Instance Portal (620182) at the bottom of Old Ironforge, (-4822.49, -931.43, 398.98) on map 0. The client sends nothing when it +-- walks in (server side trigger, 2.5 yd: ported 0.6 yd from the portal, not at 2.8 yd); it lands at (-95.62, -0.16, 510.94) inside. +-- Way out: the Instance Portal inside at (-108.53, -0.03, 511.48) puts the player back at (-4821.00, -937.63, 399.05) on map 0, 6.7 yd from the +-- entrance portal. Ghosts release to the Gates of Ironforge graveyard (852, the cemetery list sent inside). Safe to run again. +DELETE FROM `instance_template` WHERE `map` = 3065; +INSERT INTO `instance_template` (`map`,`parent`,`script`) VALUES +(3065,0,'classic_instance_hall_of_thanes'); + +DELETE FROM `world_safe_locs` WHERE `ID` IN (1104102,1104103); +INSERT INTO `world_safe_locs` (`ID`,`MapID`,`LocX`,`LocY`,`LocZ`,`Facing`,`Comment`) VALUES +(1104102,3065,-95.62,-0.16,510.94,0.000,'The Hall of Thanes (dungeon) - entrance inside'), +(1104103,0,-4821.00,-937.63,399.05,5.075,'The Hall of Thanes (dungeon) - exit outside, Old Ironforge'); + +-- custom area triggers: sphere, radius 2.5, at the two portals +DELETE FROM `areatrigger_template` WHERE `IsCustom` = 1 AND `Id` IN (302,303); +INSERT INTO `areatrigger_template` (`Id`,`IsCustom`,`Flags`,`ActionSetId`,`ActionSetFlags`,`VerifiedBuild`) VALUES +(302,1,0,0,0,0), +(303,1,0,0,0,0); +DELETE FROM `areatrigger_template_actions` WHERE `IsCustom` = 1 AND `AreaTriggerId` IN (302,303); +INSERT INTO `areatrigger_template_actions` (`AreaTriggerId`,`IsCustom`,`ActionType`,`ActionParam`,`TargetType`) VALUES +(302,1,2,1104102,5), +(303,1,2,1104103,5); +DELETE FROM `areatrigger_create_properties` WHERE `IsCustom` = 1 AND `Id` IN (302,303); +INSERT INTO `areatrigger_create_properties` (`Id`,`IsCustom`,`AreaTriggerId`,`IsAreatriggerCustom`,`Flags`,`MoveCurveId`,`ScaleCurveId`,`MorphCurveId`,`FacingCurveId`,`AnimId`,`AnimKitId`,`DecalPropertiesId`,`SpellForVisuals`,`PositionalSoundKitId`,`TimeToTargetScale`,`Speed`,`SpeedIsTime`,`Shape`,`ShapeData0`,`ShapeData1`,`ShapeData2`,`ShapeData3`,`ShapeData4`,`ShapeData5`,`ShapeData6`,`ShapeData7`,`Roll`,`Pitch`,`Yaw`,`TargetRoll`,`TargetPitch`,`TargetYaw`,`ScriptName`,`VerifiedBuild`) VALUES +(302,1,302,1,0,0,0,0,0,-1,0,0,NULL,0,0,0,0,0,2.5,2.5,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL,'',0), +(303,1,303,1,0,0,0,0,0,-1,0,0,NULL,0,0,0,0,0,2.5,2.5,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL,'',0); +DELETE FROM `areatrigger` WHERE `SpawnId` IN (7,8); +INSERT INTO `areatrigger` (`SpawnId`,`AreaTriggerCreatePropertiesId`,`IsCustom`,`MapId`,`SpawnDifficulties`,`PosX`,`PosY`,`PosZ`,`Orientation`,`PhaseUseFlags`,`PhaseId`,`PhaseGroup`,`ScriptName`,`Comment`,`VerifiedBuild`) VALUES +(7,302,1,0,'0',-4822.49,-931.43,398.98,0,1,0,0,'','The Hall of Thanes - dungeon entrance (Instance Portal, Old Ironforge)',0), +(8,303,1,3065,'1',-108.53,-0.03,511.48,0,1,0,0,'','The Hall of Thanes (dungeon) - exit (Instance Portal)',0); + +DELETE FROM `graveyard_zone` WHERE `GhostZone` = 16919; +INSERT INTO `graveyard_zone` (`ID`,`GhostZone`,`Comment`) VALUES +(852,16919,'The Hall of Thanes (dungeon) - Dun Morogh, Gates of Ironforge'); diff --git a/sql/custom/world/2026_10_13_01_world_classic_hall_of_thanes_spawns.sql b/sql/custom/world/2026_10_13_01_world_classic_hall_of_thanes_spawns.sql new file mode 100644 index 0000000000..17d24c9d80 --- /dev/null +++ b/sql/custom/world/2026_10_13_01_world_classic_hall_of_thanes_spawns.sql @@ -0,0 +1,444 @@ +-- Classic 1.60 (WoW Forever): spawns of the dungeon Hall of Thanes (map 3065) from ymir sniffs of the official beta +-- (classic_re/sniff/sniff_import_instance.py): every placed creature and gameobject, merged over the instances seen; event +-- spawns (only seen being created in view) and summons are left to the scripts. Safe to run again. +DELETE FROM `creature` WHERE `map` = 3065 OR `guid` BETWEEN 21400000 AND 21499999; +DELETE FROM `gameobject` WHERE `map` = 3065 OR `guid` BETWEEN 21400000 AND 21499999; +INSERT INTO `creature` (`guid`,`id`,`map`,`zoneId`,`areaId`,`spawnDifficulties`,`phaseUseFlags`,`PhaseId`,`PhaseGroup`,`terrainSwapMap`,`position_x`,`position_y`,`position_z`,`orientation`,`modelid`,`equipment_id`,`spawntimesecs`,`wander_distance`,`currentwaypoint`,`curHealthPct`,`MovementType`,`npcflag`,`unit_flags`,`unit_flags2`,`unit_flags3`,`ScriptName`,`VerifiedBuild`) VALUES +(21400000,4075,3065,0,0,'1',0,0,0,-1,-87.0783,16.0543,500.1968,2.576567,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400001,4075,3065,0,0,'1',0,0,0,-1,0.0,-12.5024,500.1969,5.763481,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400002,4075,3065,0,0,'1',0,0,0,-1,-62.1779,-11.1744,500.1969,2.146203,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400003,4075,3065,0,0,'1',0,0,0,-1,-7.0471,-72.7667,489.5743,0.106807,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400004,4075,3065,0,0,'1',0,0,0,-1,26.6743,37.2039,500.1875,1.76488,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400005,4075,3065,0,0,'1',0,0,0,-1,36.1354,-30.2546,500.1969,1.39865,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400006,4075,3065,0,0,'1',0,0,0,-1,65.4323,-78.2362,489.5875,5.598817,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400007,4075,3065,0,0,'1',0,0,0,-1,56.1901,112.2858,487.3906,0.205484,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400008,4075,3065,0,0,'1',0,0,0,-1,83.9001,68.0578,489.5938,0.717466,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400009,4075,3065,0,0,'1',0,0,0,-1,67.4551,-116.3377,487.4,2.005536,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400010,4075,3065,0,0,'1',0,0,0,-1,110.0882,-29.2106,500.1969,5.183248,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400011,4075,3065,0,0,'1',0,0,0,-1,41.3149,-191.6559,487.4,1.452724,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400012,4075,3065,0,0,'1',0,0,0,-1,156.7462,32.6683,500.1476,2.73125,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400013,14881,3065,0,0,'1',0,0,0,-1,-11.5139,53.5827,489.5875,2.989783,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400014,14881,3065,0,0,'1',0,0,0,-1,68.9836,33.3068,500.1875,4.629958,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400015,14881,3065,0,0,'1',0,0,0,-1,104.0917,35.1992,500.1874,1.008983,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400016,14881,3065,0,0,'1',0,0,0,-1,71.191,-185.4142,487.4,2.585796,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400017,14881,3065,0,0,'1',0,0,0,-1,139.5504,-102.5139,487.9478,6.073232,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400018,14881,3065,0,0,'1',0,0,0,-1,160.2852,-98.4422,488.297,2.242054,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400019,14881,3065,0,0,'1',0,0,0,-1,178.6435,35.4942,500.1875,1.213872,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400020,14881,3065,0,0,'1',0,0,0,-1,196.8631,-169.857,486.5628,0.1093,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400021,14881,3065,0,0,'1',0,0,0,-1,272.575,5.0842,500.1875,5.233073,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400022,14881,3065,0,0,'1',0,0,0,-1,366.5673,-19.2183,500.1969,3.097557,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400023,261306,3065,0,0,'1',0,0,0,-1,61.084,8.1539,501.5938,5.539779,0,1,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400024,261311,3065,0,0,'1',0,0,0,-1,129.9133,0.0066,500.1963,3.131592,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400025,261316,3065,0,0,'1',0,0,0,-1,164.2326,-195.5399,486.291,2.083611,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400026,261319,3065,0,0,'1',0,0,0,-1,351.5764,-9.7726,500.7906,3.611081,0,1,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400027,263389,3065,0,0,'1',0,0,0,-1,-7.6305,0.6778,500.1969,4.049997,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400028,263389,3065,0,0,'1',0,0,0,-1,-15.1082,-6.8847,500.1969,3.195877,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400029,263389,3065,0,0,'1',0,0,0,-1,-57.3224,-1.0903,500.1968,1.242563,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400030,263389,3065,0,0,'1',0,0,0,-1,-10.4183,70.4866,489.4806,4.151968,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400031,263389,3065,0,0,'1',0,0,0,-1,26.8286,-24.5583,500.1969,5.829062,0,1,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400032,263389,3065,0,0,'1',0,0,0,-1,33.6339,22.489,500.1353,4.395373,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400033,263389,3065,0,0,'1',0,0,0,-1,26.0042,70.1151,489.5938,0.25877,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400034,263389,3065,0,0,'1',0,0,0,-1,47.3591,-19.3627,500.1969,1.394323,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400035,263389,3065,0,0,'1',0,0,0,-1,67.4554,21.8508,500.1875,1.423193,0,1,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400036,263389,3065,0,0,'1',0,0,0,-1,54.6769,-28.239,500.1969,2.686073,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400037,263389,3065,0,0,'1',0,0,0,-1,70.3957,-26.2452,500.1969,3.910965,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400038,263389,3065,0,0,'1',0,0,0,-1,57.0335,73.8633,489.5937,0.049756,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400039,263389,3065,0,0,'1',0,0,0,-1,81.4848,11.7569,500.1875,5.404365,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400040,263389,3065,0,0,'1',0,0,0,-1,82.3338,-21.9759,500.1969,2.702053,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400041,263389,3065,0,0,'1',0,0,0,-1,81.689,69.8886,489.5938,5.332231,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400042,263390,3065,0,0,'1',0,0,0,-1,-45.2001,-13.0712,500.1969,0.857106,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400043,263390,3065,0,0,'1',0,0,0,-1,-14.9334,7.5195,500.1969,3.9148,0,1,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400044,263390,3065,0,0,'1',0,0,0,-1,-49.0478,14.8651,500.1969,2.324738,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400045,263390,3065,0,0,'1',0,0,0,-1,-14.2897,64.2118,489.4781,4.531537,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400046,263390,3065,0,0,'1',0,0,0,-1,22.0804,25.3982,500.1658,2.634415,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400047,263390,3065,0,0,'1',0,0,0,-1,28.7868,-17.9036,500.1969,3.299309,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400048,263390,3065,0,0,'1',0,0,0,-1,34.4875,6.9884,500.0,5.560362,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400049,263390,3065,0,0,'1',0,0,0,-1,55.6118,28.0482,500.1875,1.880638,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400050,263390,3065,0,0,'1',0,0,0,-1,47.7469,74.8067,489.5938,3.274,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400051,263390,3065,0,0,'1',0,0,0,-1,38.2273,73.9383,489.5938,5.967035,0,1,86400,6,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400052,263390,3065,0,0,'1',0,0,0,-1,74.1757,-10.1656,500.1968,0.861084,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400053,263390,3065,0,0,'1',0,0,0,-1,77.7457,7.5454,500.1875,4.664221,0,1,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400054,263390,3065,0,0,'1',0,0,0,-1,83.9508,-28.4556,500.1969,0.764856,0,1,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400055,263390,3065,0,0,'1',0,0,0,-1,87.557,75.2292,489.5938,3.094723,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400056,263396,3065,0,0,'1',0,0,0,-1,21.2431,-79.4392,489.4948,4.115381,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400057,263396,3065,0,0,'1',0,0,0,-1,51.6076,-66.9201,489.4948,1.061695,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400058,263396,3065,0,0,'1',0,0,0,-1,59.8681,-66.7361,489.4948,2.31188,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400059,263396,3065,0,0,'1',0,0,0,-1,79.3773,-71.6716,489.5875,5.878643,0,1,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400060,263396,3065,0,0,'1',0,0,0,-1,31.6788,-145.4219,488.8551,2.736924,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400061,263396,3065,0,0,'1',0,0,0,-1,36.1632,-141.2448,487.3165,3.243812,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400062,263396,3065,0,0,'1',0,0,0,-1,51.9635,-128.9184,487.3165,0.551891,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400063,263396,3065,0,0,'1',0,0,0,-1,56.6736,-128.3403,487.3165,2.87464,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400064,263396,3065,0,0,'1',0,0,0,-1,105.3559,2.2517,500.0833,4.668032,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400065,263396,3065,0,0,'1',0,0,0,-1,108.9653,1.7135,500.0955,3.691157,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400066,263396,3065,0,0,'1',0,0,0,-1,76.0312,-118.1997,488.8559,0.188143,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400067,263396,3065,0,0,'1',0,0,0,-1,76.9375,-138.4913,488.8539,5.566832,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400068,263396,3065,0,0,'1',0,0,0,-1,77.8299,-144.6962,488.852,0.851291,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400069,263396,3065,0,0,'1',0,0,0,-1,59.4392,-164.9601,487.3165,4.74699,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400070,263396,3065,0,0,'1',0,0,0,-1,140.9948,29.7969,500.0833,1.385652,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400071,263396,3065,0,0,'1',0,0,0,-1,142.3281,38.3715,506.3106,1.344045,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400072,263396,3065,0,0,'1',0,0,0,-1,141.3073,-43.0469,497.9277,0.851291,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400073,263396,3065,0,0,'1',0,0,0,-1,144.533,32.1354,501.4763,1.825092,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400074,263396,3065,0,0,'1',0,0,0,-1,148.4028,-44.6406,497.8716,0.851291,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400075,263396,3065,0,0,'1',0,0,0,-1,155.013,-82.5623,488.8176,4.764212,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400076,263396,3065,0,0,'1',0,0,0,-1,123.1858,-158.7726,486.7462,3.820441,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400077,263396,3065,0,0,'1',0,0,0,-1,151.3629,-50.6215,496.3063,0.851291,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400078,263396,3065,0,0,'1',0,0,0,-1,141.5938,-80.0903,489.6041,2.305917,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400079,263396,3065,0,0,'1',0,0,0,-1,172.8681,-23.1701,500.0833,2.948382,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400080,263396,3065,0,0,'1',0,0,0,-1,171.691,-38.842,506.645,2.948382,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400081,263396,3065,0,0,'1',0,0,0,-1,161.5399,-108.0208,488.4458,3.605643,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400082,263396,3065,0,0,'1',0,0,0,-1,162.8507,-111.3229,488.5402,2.948382,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400083,263396,3065,0,0,'1',0,0,0,-1,158.033,-164.908,486.2473,3.726908,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400084,263396,3065,0,0,'1',0,0,0,-1,300.1424,3.1493,500.1213,3.139442,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400085,263396,3065,0,0,'1',0,0,0,-1,342.3195,31.3264,500.0837,1.704651,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400086,263396,3065,0,0,'1',0,0,0,-1,373.3576,-23.1198,500.0836,5.561367,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400087,263396,3065,0,0,'1',0,0,0,-1,381.4115,8.5885,500.0837,0.204929,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400088,263397,3065,0,0,'1',0,0,0,-1,107.8837,-2.3351,500.0859,2.006782,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400089,263397,3065,0,0,'1',0,0,0,-1,74.2535,-161.8854,488.7925,4.320869,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400090,263397,3065,0,0,'1',0,0,0,-1,139.9931,-49.625,496.3398,5.127068,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400091,263397,3065,0,0,'1',0,0,0,-1,148.5833,-77.1406,490.0902,3.601725,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400092,263397,3065,0,0,'1',0,0,0,-1,163.6493,-101.1979,488.9368,0.06807,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400093,263397,3065,0,0,'1',0,0,0,-1,157.0729,-167.658,486.2838,2.006782,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400094,263397,3065,0,0,'1',0,0,0,-1,141.0799,-197.4444,486.7083,1.231935,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400095,263397,3065,0,0,'1',0,0,0,-1,190.0955,-199.6406,486.6511,5.127068,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400096,263397,3065,0,0,'1',0,0,0,-1,186.7986,-204.6458,486.4666,5.814109,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400097,263397,3065,0,0,'1',0,0,0,-1,171.3802,-219.658,486.2569,5.225098,0,1,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400098,263438,3065,0,0,'1',0,0,0,-1,60.6997,-162.1649,487.4,4.252206,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400099,263438,3065,0,0,'1',0,0,0,-1,151.0129,-82.7676,488.5231,4.766796,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400100,263438,3065,0,0,'1',0,0,0,-1,122.8542,-162.0417,486.1728,2.831505,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400101,263438,3065,0,0,'1',0,0,0,-1,136.0084,-161.7935,485.9385,4.117065,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400102,263438,3065,0,0,'1',0,0,0,-1,168.2662,-139.7987,485.9644,2.389553,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400103,263438,3065,0,0,'1',0,0,0,-1,184.8715,-155.3438,486.353,3.447804,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400104,263438,3065,0,0,'1',0,0,0,-1,165.8733,-192.092,486.2856,2.402557,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400105,263438,3065,0,0,'1',0,0,0,-1,299.7951,-3.1823,500.1244,3.146224,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400106,263466,3065,0,0,'1',0,0,0,-1,135.0119,25.3188,500.08,0.000524,0,0,86400,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400107,263466,3065,0,0,'1',0,0,0,-1,202.5069,-0.0174,500.1969,3.138024,0,0,86400,10,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400108,263466,3065,0,0,'1',0,0,0,-1,242.4913,2.8941,500.0833,3.141537,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400109,263466,3065,0,0,'1',0,0,0,-1,242.9705,-3.2674,500.0847,3.141537,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400110,263466,3065,0,0,'1',0,0,0,-1,301.1823,0.1215,500.1121,3.141537,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400111,263466,3065,0,0,'1',0,0,0,-1,355.7917,3.8247,500.689,2.556529,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400112,263466,3065,0,0,'1',0,0,0,-1,355.6198,-4.1024,500.689,4.057823,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400113,263470,3065,0,0,'1',0,0,0,-1,18.4153,-69.2636,489.6408,1.755558,0,0,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400114,263470,3065,0,0,'1',0,0,0,-1,24.0351,-76.5704,489.6005,6.06056,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400115,263470,3065,0,0,'1',0,0,0,-1,28.066,-71.5366,489.5875,5.286764,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400116,263470,3065,0,0,'1',0,0,0,-1,57.6184,-71.5318,489.5875,4.002746,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400117,263470,3065,0,0,'1',0,0,0,-1,50.909,-71.4888,489.5875,4.755101,0,0,86400,10,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400118,263470,3065,0,0,'1',0,0,0,-1,76.3741,-70.0428,489.5875,0.820366,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400119,263470,3065,0,0,'1',0,0,0,-1,79.166,-71.9592,489.5875,6.095889,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400120,263470,3065,0,0,'1',0,0,0,-1,49.0285,-126.5001,487.4,2.708203,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400121,263470,3065,0,0,'1',0,0,0,-1,37.2143,-146.4065,487.4,5.924995,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400122,263470,3065,0,0,'1',0,0,0,-1,73.897,-122.7803,488.717,2.875846,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400123,263470,3065,0,0,'1',0,0,0,-1,62.2939,-184.6243,487.4,2.350817,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400124,263470,3065,0,0,'1',0,0,0,-1,67.6683,-183.6114,487.4,5.21963,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400125,263470,3065,0,0,'1',0,0,0,-1,171.3226,-19.5559,500.1969,3.899857,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400126,263470,3065,0,0,'1',0,0,0,-1,65.4803,-190.2462,487.4,0.844828,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400127,263470,3065,0,0,'1',0,0,0,-1,166.0885,-24.2369,500.1969,0.823251,0,0,86400,3,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400128,263470,3065,0,0,'1',0,0,0,-1,157.8431,-162.6438,486.2302,4.427617,0,0,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400129,263470,3065,0,0,'1',0,0,0,-1,154.554,-171.4839,486.3473,2.995955,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400130,263470,3065,0,0,'1',0,0,0,-1,191.4525,-177.4931,486.2567,2.106592,0,0,86400,4,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400131,263470,3065,0,0,'1',0,0,0,-1,202.9595,-182.3562,486.4776,1.632594,0,0,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400132,263470,3065,0,0,'1',0,0,0,-1,195.7094,-174.6033,486.5772,5.541883,0,0,86400,10,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400133,263980,3065,0,0,'1',0,0,0,-1,105.316,-0.6649,500.0833,0.0,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400134,263980,3065,0,0,'1',0,0,0,-1,135.9861,-39.8993,502.7861,0.46933,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400135,263980,3065,0,0,'1',0,0,0,-1,73.7899,-163.2812,488.7018,3.260753,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400136,263980,3065,0,0,'1',0,0,0,-1,156.9583,-48.9757,499.283,4.016357,0,0,86400,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338), +(21400137,264943,0,0,0,'0',0,0,0,-1,-4819.7129,-978.2905,464.7567,4.184972,0,1,120,0,0,NULL,2,NULL,NULL,NULL,NULL,'',70338), +(21400138,265002,3065,0,0,'1',0,0,0,-1,74.4499,74.1928,489.5938,3.262278,0,0,86400,5,0,NULL,1,NULL,NULL,NULL,NULL,'',70338), +(21400139,265003,0,0,0,'0',0,0,0,-1,-4803.7153,-968.1927,399.1082,2.443461,0,1,120,0,0,NULL,0,NULL,NULL,NULL,NULL,'',70338); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`zoneId`,`areaId`,`spawnDifficulties`,`phaseUseFlags`,`PhaseId`,`PhaseGroup`,`terrainSwapMap`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`,`ScriptName`,`VerifiedBuild`) VALUES +(21400140,457387,3065,0,0,'1',0,0,0,-1,17.3646,-82.4861,490.6032,2.927089,-0.441109,-0.570382,-0.478436,0.501185,86400,255,1,'',70338), +(21400141,457387,3065,0,0,'1',0,0,0,-1,17.9809,81.8715,490.5753,0.579423,0.343096,-0.587873,0.347064,0.645165,86400,255,1,'',70338), +(21400142,457387,3065,0,0,'1',0,0,0,-1,50.6094,-64.8646,490.6297,5.370552,0.385117,-0.609589,0.307324,0.620998,86400,255,1,'',70338), +(21400143,457387,3065,0,0,'1',0,0,0,-1,35.3142,-83.4358,490.6183,3.06672,-0.400246,-0.599763,-0.442307,0.53334,86400,255,1,'',70338), +(21400144,457387,3065,0,0,'1',0,0,0,-1,34.6094,82.3142,490.6177,5.370552,0.385117,-0.609589,0.307324,0.620998,86400,255,1,'',70338), +(21400145,457387,3065,0,0,'1',0,0,0,-1,53.8524,-64.9462,490.522,4.01426,0.0,0.0,-0.906307,0.422619,86400,255,1,'',70338), +(21400146,457387,3065,0,0,'1',0,0,0,-1,89.2205,40.6597,502.5842,4.834563,0.0,0.0,-0.66262,0.748956,86400,255,1,'',70338), +(21400147,457387,3065,0,0,'1',0,0,0,-1,77.0191,-81.5226,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400148,457387,3065,0,0,'1',0,0,0,-1,145.2951,40.9792,506.6689,4.834563,0.0,0.0,-0.66262,0.748956,86400,255,1,'',70338), +(21400149,457387,3065,0,0,'1',0,0,0,-1,174.3524,-39.8351,506.9801,1.151916,0.0,0.0,0.544639,0.838671,86400,255,1,'',70338), +(21400150,457387,3065,0,0,'1',0,0,0,-1,321.4583,27.7656,499.9998,4.031712,0.0,0.0,-0.902585,0.430512,86400,255,1,'',70338), +(21400151,457387,3065,0,0,'1',0,0,0,-1,321.0955,-30.1354,500.0001,4.031712,0.0,0.0,-0.902585,0.430512,86400,255,1,'',70338), +(21400152,457387,3065,0,0,'1',0,0,0,-1,341.6441,40.9983,499.9999,4.031712,0.0,0.0,-0.902585,0.430512,86400,255,1,'',70338), +(21400153,457387,3065,0,0,'1',0,0,0,-1,339.7691,-41.3802,500.0001,4.031712,0.0,0.0,-0.902585,0.430512,86400,255,1,'',70338), +(21400154,457387,3065,0,0,'1',0,0,0,-1,379.5417,28.9462,500.0,4.293513,0.0,0.0,-0.83867,0.54464,86400,255,1,'',70338), +(21400155,457387,3065,0,0,'1',0,0,0,-1,363.2795,-40.4045,499.9999,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400156,457387,3065,0,0,'1',0,0,0,-1,391.4271,-11.5521,500.0001,4.293513,0.0,0.0,-0.83867,0.54464,86400,255,1,'',70338), +(21400157,457387,3065,0,0,'1',0,0,0,-1,392.0781,10.2847,500.0,5.358162,0.0,0.0,-0.446198,0.894935,86400,255,1,'',70338), +(21400158,620182,0,0,0,'0',0,0,0,-1,-4822.4863,-931.4323,398.9777,5.036011,0.0,0.0,-0.583951,0.811789,120,255,1,'',70338), +(21400159,620182,3065,0,0,'1',0,0,0,-1,-108.5312,-0.026,511.4785,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400160,642023,3065,0,0,'1',0,0,0,-1,54.1431,-88.0292,489.2688,3.141593,0.0,0.0,-1.0,0.0,86400,255,0,'',70338), +(21400161,642024,3065,0,0,'1',0,0,0,-1,26.4951,-58.706,488.9708,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400162,642025,3065,0,0,'1',0,0,0,-1,81.745,-58.7228,488.9708,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400163,642026,3065,0,0,'1',0,0,0,-1,81.7925,58.5944,489.141,3.141593,0.0,0.0,-1.0,0.0,86400,255,0,'',70338), +(21400164,642027,3065,0,0,'1',0,0,0,-1,26.4198,58.5944,489.1066,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400165,642857,3065,0,0,'1',0,0,0,-1,54.0792,88.1801,489.1242,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400166,642858,3065,0,0,'1',0,0,0,-1,-12.0352,18.1308,499.5187,3.141593,0.0,0.0,-1.0,0.0,86400,255,0,'',70338), +(21400167,642859,3065,0,0,'1',0,0,0,-1,-11.9955,-18.1284,499.5187,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400168,645389,3065,0,0,'1',0,0,0,-1,186.7178,-0.3218,500.0,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400169,645390,3065,0,0,'1',0,0,0,-1,252.1026,-0.3274,500.0,0.0,0.0,0.0,0.0,1.0,86400,255,0,'',70338), +(21400170,645391,3065,0,0,'1',0,0,0,-1,98.0442,-0.3246,500.0,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400171,645392,3065,0,0,'1',0,0,0,-1,9.2675,-0.3428,500.0,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400172,645393,3065,0,0,'1',0,0,0,-1,313.3068,-0.3278,500.0,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400173,648667,3065,0,0,'1',0,0,0,-1,12.4128,-73.3949,488.9708,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400174,648668,3065,0,0,'1',0,0,0,-1,11.937,73.2534,488.9398,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,0,'',70338), +(21400175,648669,3065,0,0,'1',0,0,0,-1,388.8495,9.9239,500.0,3.403396,0.0,0.0,-0.991445,0.130528,86400,255,1,'',70338), +(21400176,648670,3065,0,0,'1',0,0,0,-1,388.7627,-10.2011,500.0,2.879789,0.0,0.0,0.991445,0.130528,86400,255,1,'',70338), +(21400177,648671,3065,0,0,'1',0,0,0,-1,378.6328,-27.597,500.0,2.35619,0.0,0.0,0.923879,0.382686,86400,255,1,'',70338), +(21400178,648672,3065,0,0,'1',0,0,0,-1,361.1161,-37.6203,500.0,1.832595,0.0,0.0,0.793353,0.608762,86400,255,1,'',70338), +(21400179,648673,3065,0,0,'1',0,0,0,-1,340.9872,-37.5394,500.0,1.308995,0.0,0.0,0.608761,0.793354,86400,255,1,'',70338), +(21400180,648674,3065,0,0,'1',0,0,0,-1,323.5678,-27.3926,500.0,0.785397,0.0,0.0,0.382683,0.92388,86400,255,1,'',70338), +(21400181,648675,3065,0,0,'1',0,0,0,-1,323.7942,27.6656,500.0,5.497789,0.0,0.0,-0.382683,0.92388,86400,255,1,'',70338), +(21400182,648676,3065,0,0,'1',0,0,0,-1,341.2829,37.6651,500.0,4.97419,0.0,0.0,-0.608761,0.793354,86400,255,1,'',70338), +(21400183,648677,3065,0,0,'1',0,0,0,-1,361.4459,37.5785,500.0,4.450591,0.0,0.0,-0.793353,0.608762,86400,255,1,'',70338), +(21400184,648678,3065,0,0,'1',0,0,0,-1,378.841,27.4283,500.0,3.926991,0.0,0.0,-0.92388,0.382683,86400,255,1,'',70338), +(21400185,650183,3065,0,0,'1',0,0,0,-1,49.0955,0.024,501.5728,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400186,650720,0,0,0,'0',0,0,0,-1,-4816.1914,-934.4205,399.0424,1.160644,0.0,0.0,0.548293,0.836286,120,255,1,'',70338), +(21400187,652080,3065,0,0,'1',0,0,0,-1,77.8048,-187.2533,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400188,652081,3065,0,0,'1',0,0,0,-1,77.8048,-141.4207,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400189,652082,3065,0,0,'1',0,0,0,-1,77.8048,-118.271,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400190,652083,3065,0,0,'1',0,0,0,-1,30.1733,-187.2533,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400191,652084,3065,0,0,'1',0,0,0,-1,30.1733,-141.4207,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400192,652085,3065,0,0,'1',0,0,0,-1,30.1733,-118.271,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400193,652086,3065,0,0,'1',0,0,0,-1,30.1733,-164.7324,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400194,652087,3065,0,0,'1',0,0,0,-1,77.8048,118.5206,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400195,652088,3065,0,0,'1',0,0,0,-1,77.8048,164.3533,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400196,652089,3065,0,0,'1',0,0,0,-1,77.8048,187.5029,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400197,652090,3065,0,0,'1',0,0,0,-1,30.1733,187.5029,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400198,652091,3065,0,0,'1',0,0,0,-1,30.1733,141.0415,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400199,652092,3065,0,0,'1',0,0,0,-1,77.8048,141.3064,488.773,-0.0,-0.707107,0.0,-0.707107,0.000735,86400,255,1,'',70338), +(21400200,652093,3065,0,0,'1',0,0,0,-1,30.1733,118.6157,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400201,652094,3065,0,0,'1',0,0,0,-1,30.1733,164.4483,488.773,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400202,652095,3065,0,0,'1',0,0,0,-1,66.2072,-165.8613,487.2331,0.0,0.0,-0.707107,0.0,0.707107,86400,255,1,'',70338), +(21400203,652227,3065,0,0,'1',0,0,0,-1,49.0729,-7.5312,501.5728,3.42085,0.0,0.0,-0.990268,0.139175,86400,255,1,'',70338), +(21400204,652227,3065,0,0,'1',0,0,0,-1,45.0642,-62.8906,490.522,3.001947,0.0,0.0,0.997563,0.069766,86400,255,1,'',70338), +(21400205,652227,3065,0,0,'1',0,0,0,-1,29.4757,-81.7674,490.522,3.001947,0.0,0.0,0.997563,0.069766,86400,255,1,'',70338), +(21400206,652227,3065,0,0,'1',0,0,0,-1,50.2674,64.9236,490.522,3.42085,0.0,0.0,-0.990268,0.139175,86400,255,1,'',70338), +(21400207,652227,3065,0,0,'1',0,0,0,-1,21.4427,81.7014,490.522,4.71239,0.0,0.0,-0.707107,0.707107,86400,255,1,'',70338), +(21400208,652227,3065,0,0,'1',0,0,0,-1,29.5417,-120.2691,488.7671,0.296705,0.0,0.0,0.147809,0.989016,86400,255,1,'',70338), +(21400209,652227,3065,0,0,'1',0,0,0,-1,86.2431,-81.7274,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400210,652227,3065,0,0,'1',0,0,0,-1,29.4931,-166.809,488.767,0.296705,0.0,0.0,0.147809,0.989016,86400,255,1,'',70338), +(21400211,652227,3065,0,0,'1',0,0,0,-1,124.0295,39.125,500.0,5.026549,0.0,0.0,-0.587785,0.809017,86400,255,1,'',70338), +(21400212,652227,3065,0,0,'1',0,0,0,-1,168.5677,40.4531,506.6689,5.026549,0.0,0.0,-0.587785,0.809017,86400,255,1,'',70338), +(21400213,652227,3065,0,0,'1',0,0,0,-1,166.3767,-40.2604,506.9801,1.169371,0.0,0.0,0.551937,0.833886,86400,255,1,'',70338), +(21400214,652227,3065,0,0,'1',0,0,0,-1,146.7135,40.4514,506.9801,4.572764,0.0,0.0,-0.754709,0.656059,86400,255,1,'',70338), +(21400215,652227,3065,0,0,'1',0,0,0,-1,322.1754,28.9983,500.0001,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400216,652227,3065,0,0,'1',0,0,0,-1,321.8125,-28.9028,500.0,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400217,652227,3065,0,0,'1',0,0,0,-1,342.3611,42.2326,499.9997,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400218,652227,3065,0,0,'1',0,0,0,-1,340.4861,-40.1476,500.0001,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400219,652227,3065,0,0,'1',0,0,0,-1,361.8681,-40.6406,500.0001,1.06465,0.0,0.0,0.507538,0.861629,86400,255,1,'',70338), +(21400220,652227,3065,0,0,'1',0,0,0,-1,379.9132,30.3247,499.9999,5.358162,0.0,0.0,-0.446198,0.894935,86400,255,1,'',70338), +(21400221,652227,3065,0,0,'1',0,0,0,-1,391.7986,-10.1736,499.9999,5.358162,0.0,0.0,-0.446198,0.894935,86400,255,1,'',70338), +(21400222,652227,3065,0,0,'1',0,0,0,-1,391.0451,11.2778,500.0,0.139624,0.0,0.0,0.069756,0.997564,86400,255,1,'',70338), +(21400223,652228,3065,0,0,'1',0,0,0,-1,48.9757,0.1979,502.1283,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400224,652228,3065,0,0,'1',0,0,0,-1,35.3333,-81.7483,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400225,652228,3065,0,0,'1',0,0,0,-1,45.1059,63.1597,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400226,652228,3065,0,0,'1',0,0,0,-1,35.125,83.5816,490.7751,3.297898,-0.078064,0.996939,-0.001952,0.003927,86400,255,1,'',70338), +(21400227,652228,3065,0,0,'1',0,0,0,-1,72.9375,-83.5694,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400228,652228,3065,0,0,'1',0,0,0,-1,90.5295,83.6719,490.522,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400229,652228,3065,0,0,'1',0,0,0,-1,29.7986,-163.0868,488.7676,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400230,652228,3065,0,0,'1',0,0,0,-1,113.4062,-39.3681,506.6689,1.06465,0.0,0.0,0.507538,0.861629,86400,255,1,'',70338), +(21400231,652228,3065,0,0,'1',0,0,0,-1,118.3455,39.7188,506.9801,4.276057,0.0,0.0,-0.843391,0.5373,86400,255,1,'',70338), +(21400232,652228,3065,0,0,'1',0,0,0,-1,64.8646,-164.1719,487.2331,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400233,652228,3065,0,0,'1',0,0,0,-1,55.7413,-174.6215,487.2331,1.762782,0.0,0.0,0.771625,0.636078,86400,255,1,'',70338), +(21400234,652228,3065,0,0,'1',0,0,0,-1,139.7361,40.0365,506.9801,1.06465,0.0,0.0,0.507538,0.861629,86400,255,1,'',70338), +(21400235,652228,3065,0,0,'1',0,0,0,-1,158.1806,-35.9792,500.2316,1.06465,0.0,0.0,0.507538,0.861629,86400,255,1,'',70338), +(21400236,652228,3065,0,0,'1',0,0,0,-1,173.7413,40.2448,506.9801,4.276057,0.0,0.0,-0.843391,0.5373,86400,255,1,'',70338), +(21400237,652228,3065,0,0,'1',0,0,0,-1,320.684,-29.0208,499.9999,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400238,652228,3065,0,0,'1',0,0,0,-1,321.0469,28.8802,499.9999,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400239,652228,3065,0,0,'1',0,0,0,-1,341.2326,42.1128,499.9999,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400240,652228,3065,0,0,'1',0,0,0,-1,339.3576,-40.2656,499.9999,5.096362,0.0,0.0,-0.559193,0.829038,86400,255,1,'',70338), +(21400241,652228,3065,0,0,'1',0,0,0,-1,378.8507,29.9149,499.9998,5.358162,0.0,0.0,-0.446198,0.894935,86400,255,1,'',70338), +(21400242,652228,3065,0,0,'1',0,0,0,-1,362.6788,-41.4358,500.0,1.06465,0.0,0.0,0.507538,0.861629,86400,255,1,'',70338), +(21400243,652228,3065,0,0,'1',0,0,0,-1,390.7361,-10.5833,500.0,5.358162,0.0,0.0,-0.446198,0.894935,86400,255,1,'',70338), +(21400244,652228,3065,0,0,'1',0,0,0,-1,390.8906,10.1493,500.0,0.139624,0.0,0.0,0.069756,0.997564,86400,255,1,'',70338), +(21400245,673473,3065,0,0,'1',0,0,0,-1,390.7426,13.21,501.9388,1.369035,0.548982,-0.404546,0.57315,0.45438,86400,255,1,'',70338), +(21400246,673474,3065,0,0,'1',0,0,0,-1,341.3822,-42.4084,499.9999,4.293512,0.190824,0.123922,-0.816672,0.530354,86400,255,1,'',70338), +(21400247,703593,3065,0,0,'1',0,0,0,-1,39.8283,129.7314,487.2269,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400248,703594,3065,0,0,'1',0,0,0,-1,68.3967,129.9207,487.2479,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400249,703595,3065,0,0,'1',0,0,0,-1,39.8283,153.086,487.2269,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400250,703596,3065,0,0,'1',0,0,0,-1,39.8283,176.3141,487.2269,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400251,703597,3065,0,0,'1',0,0,0,-1,68.3967,176.42,487.2479,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400252,703598,3065,0,0,'1',0,0,0,-1,177.0649,-5.8206,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400253,703599,3065,0,0,'1',0,0,0,-1,177.0649,6.1323,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400254,703600,3065,0,0,'1',0,0,0,-1,88.4149,-5.8206,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400255,703601,3065,0,0,'1',0,0,0,-1,108.5808,-6.02,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400256,703602,3065,0,0,'1',0,0,0,-1,19.8494,5.933,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400257,703603,3065,0,0,'1',0,0,0,-1,60.842,103.5127,488.8605,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400258,703604,3065,0,0,'1',0,0,0,-1,77.6395,-36.0063,500.0001,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400259,703605,3065,0,0,'1',0,0,0,-1,85.6784,-36.0063,500.0001,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400260,703606,3065,0,0,'1',0,0,0,-1,22.3762,-36.0063,500.0001,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400261,703607,3065,0,0,'1',0,0,0,-1,30.415,-36.0063,500.0001,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400262,703608,3065,0,0,'1',0,0,0,-1,-0.806,6.1323,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400263,703609,3065,0,0,'1',0,0,0,-1,-7.9347,14.3847,500.0001,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400264,703610,3065,0,0,'1',0,0,0,-1,-15.9735,14.3847,500.0001,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400265,703611,3065,0,0,'1',0,0,0,-1,-15.0064,76.0829,489.3956,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400266,703612,3065,0,0,'1',0,0,0,-1,68.2864,-129.8587,487.2269,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400267,703613,3065,0,0,'1',0,0,0,-1,39.7181,-153.3311,487.2479,0.0,0.0,0.0,0.0,1.0,86400,255,1,'',70338), +(21400268,703614,3065,0,0,'1',0,0,0,-1,-15.1908,-76.3749,489.3956,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400269,703615,3065,0,0,'1',0,0,0,-1,-94.5761,8.8613,510.9444,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400270,703616,3065,0,0,'1',0,0,0,-1,-64.5389,5.0913,502.1162,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400271,703617,3065,0,0,'1',0,0,0,-1,-64.5389,-4.9974,502.1162,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400272,703618,3065,0,0,'1',0,0,0,-1,109.445,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400273,703619,3065,0,0,'1',0,0,0,-1,121.0251,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400274,703620,3065,0,0,'1',0,0,0,-1,137.1354,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400275,703621,3065,0,0,'1',0,0,0,-1,148.3147,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400276,703622,3065,0,0,'1',0,0,0,-1,165.3047,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400277,703623,3065,0,0,'1',0,0,0,-1,175.8727,40.1532,506.9801,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400278,703624,3065,0,0,'1',0,0,0,-1,197.4767,5.8864,500.0,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400279,703625,3065,0,0,'1',0,0,0,-1,242.2281,-5.8494,500.0,4.71239,0.0,0.0,-0.707107,0.707107,86400,255,1,'',70338), +(21400280,703626,3065,0,0,'1',0,0,0,-1,242.2281,6.1036,500.0001,4.71239,0.0,0.0,-0.707107,0.707107,86400,255,1,'',70338), +(21400281,703627,3065,0,0,'1',0,0,0,-1,214.2179,107.9115,518.39,1.125001,0.0,0.0,0.533303,0.845924,86400,255,1,'',70338), +(21400282,703628,3065,0,0,'1',0,0,0,-1,208.8276,97.3608,518.4031,1.125001,0.0,0.0,0.533303,0.845924,86400,255,1,'',70338), +(21400283,703629,3065,0,0,'1',0,0,0,-1,248.4679,76.789,518.3965,4.266597,0.0,0.0,-0.845923,0.533304,86400,255,1,'',70338), +(21400284,703630,3065,0,0,'1',0,0,0,-1,254.0652,87.5768,518.39,4.266597,0.0,0.0,-0.845923,0.533304,86400,255,1,'',70338), +(21400285,703631,3065,0,0,'1',0,0,0,-1,296.0365,-119.6707,529.4055,5.503679,0.0,0.0,-0.37996,0.925003,86400,255,1,'',70338), +(21400286,703632,3065,0,0,'1',0,0,0,-1,287.6244,-111.1029,529.3986,5.503679,0.0,0.0,-0.37996,0.925003,86400,255,1,'',70338), +(21400287,703633,3065,0,0,'1',0,0,0,-1,242.6761,-156.7286,529.3986,2.36831,0.0,0.0,0.926181,0.37708,86400,255,1,'',70338), +(21400288,703634,3065,0,0,'1',0,0,0,-1,251.1424,-165.2479,529.4047,2.36831,0.0,0.0,0.926181,0.37708,86400,255,1,'',70338), +(21400289,703635,3065,0,0,'1',0,0,0,-1,303.4204,-5.8206,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400290,703636,3065,0,0,'1',0,0,0,-1,303.4204,6.1323,500.0001,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400291,703637,3065,0,0,'1',0,0,0,-1,262.6647,5.933,500.0096,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400292,703638,3065,0,0,'1',0,0,0,-1,262.6653,-6.02,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400293,703639,3065,0,0,'1',0,0,0,-1,323.7874,5.822,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400294,703640,3065,0,0,'1',0,0,0,-1,323.7874,-6.1309,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400295,703641,3065,0,0,'1',0,0,0,-1,336.5906,25.2798,500.0001,1.570796,0.0,0.0,0.707107,0.707107,86400,255,1,'',70338), +(21400296,703642,3065,0,0,'1',0,0,0,-1,365.7434,25.3501,500.0001,0.523598,0.0,0.0,0.258819,0.965926,86400,255,1,'',70338), +(21400297,703643,3065,0,0,'1',0,0,0,-1,380.3808,0.1382,500.0001,5.759588,0.0,0.0,-0.258819,0.965926,86400,255,1,'',70338), +(21400298,703644,3065,0,0,'1',0,0,0,-1,365.8653,-25.1441,500.0001,4.71239,0.0,0.0,-0.707107,0.707107,86400,255,1,'',70338), +(21400299,703645,3065,0,0,'1',0,0,0,-1,336.7124,-25.2144,500.0001,3.665196,0.0,0.0,-0.965925,0.258821,86400,255,1,'',70338), +(21400300,703646,3065,0,0,'1',0,0,0,-1,-8.776,53.3292,489.3681,4.712392,0.0,0.0,-0.707106,0.707108,86400,255,1,'',70338), +(21400301,703647,3065,0,0,'1',0,0,0,-1,47.455,-103.8192,488.8434,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338), +(21400302,703648,3065,0,0,'1',0,0,0,-1,60.8408,-103.8151,488.8224,3.141593,0.0,0.0,-1.0,0.0,86400,255,1,'',70338); +DELETE FROM `creature_addon` WHERE `guid` BETWEEN 21400000 AND 21499999; +DELETE FROM `waypoint_path_node` WHERE `PathId` BETWEEN 214000000 AND 214999999; +DELETE FROM `waypoint_path` WHERE `PathId` BETWEEN 214000000 AND 214999999; +-- patrols (walking routes the creature repeated in the sniff) +INSERT INTO `waypoint_path` (`PathId`,`MoveType`,`Flags`,`Velocity`,`Comment`) VALUES +(214000230,0,0,NULL,'creature 261306 (sniff)'), +(214000240,0,0,NULL,'creature 261311 (sniff)'), +(214000260,0,0,NULL,'creature 261319 (sniff)'), +(214000980,0,0,NULL,'creature 263438 (sniff)'), +(214000990,0,0,NULL,'creature 263438 (sniff)'), +(214001010,0,0,NULL,'creature 263438 (sniff)'), +(214001020,0,0,NULL,'creature 263438 (sniff)'), +(214001060,0,0,NULL,'creature 263466 (sniff)'), +(214001370,0,0,NULL,'creature 264943 (sniff)'); +INSERT INTO `waypoint_path_node` (`PathId`,`NodeId`,`PositionX`,`PositionY`,`PositionZ`,`Orientation`,`Delay`) VALUES +(214000230,0,60.1545,-9.941,501.5875,NULL,0), +(214000230,1,48.6354,-10.0625,501.5875,NULL,0), +(214000230,2,45.5885,-7.6667,501.5875,NULL,0), +(214000230,3,45.6944,6.7118,501.5937,NULL,0), +(214000230,4,48.3663,9.7622,501.5937,NULL,0), +(214000230,5,59.3819,9.7188,501.5938,NULL,0), +(214000230,6,62.3958,6.9479,501.5938,NULL,0), +(214000230,7,62.3681,-7.6858,501.5875,NULL,0), +(214000240,0,141.5122,-0.1094,500.1969,NULL,0), +(214000240,1,174.4931,0.1476,500.1875,NULL,0), +(214000240,2,141.5122,-0.1094,500.1969,NULL,0), +(214000240,3,111.1337,0.1944,500.1875,NULL,0), +(214000260,0,357.8594,-6.5851,500.7906,NULL,0), +(214000260,1,360.8112,-0.36,500.7906,NULL,0), +(214000260,2,357.783,6.4462,500.7969,NULL,0), +(214000260,3,351.559,9.6215,500.7969,NULL,0), +(214000260,4,357.783,6.4462,500.7969,NULL,0), +(214000260,5,360.8246,-0.3316,500.7906,NULL,0), +(214000260,6,357.8594,-6.5851,500.7906,NULL,0), +(214000260,7,351.5764,-9.7726,500.7906,NULL,0), +(214000980,0,37.9253,-142.5087,487.4,NULL,0), +(214000980,1,71.2517,-140.8767,487.8086,NULL,0), +(214000980,2,60.6997,-162.1649,487.4,NULL,0), +(214000990,0,151.2823,-87.8573,488.0938,NULL,0), +(214000990,1,151.4388,-90.8753,487.8829,NULL,0), +(214000990,2,151.5976,-93.9371,487.7664,NULL,0), +(214000990,3,151.754,-96.9515,487.6802,NULL,0), +(214000990,4,151.9123,-100.0044,487.6441,NULL,0), +(214000990,5,152.07,-103.0444,487.6082,NULL,0), +(214000990,6,152.2274,-106.0801,487.6356,NULL,0), +(214000990,7,152.3578,-109.0793,487.1714,NULL,0), +(214000990,8,152.4564,-112.1232,486.6008,NULL,0), +(214000990,9,152.5412,-114.7421,486.2516,NULL,0), +(214000990,10,152.6389,-117.7546,485.7414,NULL,0), +(214000990,11,152.7376,-120.8013,485.2517,NULL,0), +(214000990,12,152.8383,-123.9108,485.1702,NULL,0), +(214000990,13,152.8875,-125.4299,485.1542,NULL,0), +(214000990,14,152.7463,-121.071,485.2396,NULL,0), +(214000990,15,152.6635,-118.5165,485.5528,NULL,0), +(214000990,16,152.562,-115.3813,486.1939,NULL,0), +(214000990,17,152.4731,-112.6371,486.5259,NULL,0), +(214000990,18,152.3706,-109.4746,487.0889,NULL,0), +(214000990,19,152.2551,-106.6133,487.6118,NULL,0), +(214000990,20,152.0982,-103.5881,487.6018,NULL,0), +(214000990,21,151.9409,-100.5564,487.6376,NULL,0), +(214000990,22,151.7829,-97.5098,487.6736,NULL,0), +(214000990,23,151.6248,-94.4611,487.7334,NULL,0), +(214000990,24,151.4664,-91.4082,487.8818,NULL,0), +(214000990,25,151.3087,-88.3667,488.0583,NULL,0), +(214000990,26,151.1517,-85.3409,488.2697,NULL,0), +(214000990,27,150.9953,-82.3253,488.6124,NULL,0), +(214000990,28,150.8394,-79.3193,489.1561,NULL,0), +(214000990,29,150.685,-76.3422,489.7608,NULL,0), +(214000990,30,150.4035,-74.4543,490.3097,NULL,0), +(214000990,31,149.4234,-71.7914,490.9955,NULL,0), +(214000990,32,148.3332,-68.8365,491.6565,NULL,0), +(214000990,33,147.2296,-65.8454,492.4181,NULL,0), +(214000990,34,146.1237,-62.8479,493.0753,NULL,0), +(214000990,35,145.0206,-59.8577,493.5661,NULL,0), +(214000990,36,143.9525,-56.9627,494.0414,NULL,0), +(214000990,37,144.8802,-59.4773,493.6286,NULL,0), +(214000990,38,145.9917,-62.49,493.134,NULL,0), +(214000990,39,147.1032,-65.5027,492.514,NULL,0), +(214000990,40,148.2122,-68.5087,491.7299,NULL,0), +(214000990,41,149.3149,-71.4974,491.0612,NULL,0), +(214000990,42,150.3008,-74.1697,490.3546,NULL,0), +(214000990,43,150.6637,-75.9315,489.8748,NULL,0), +(214000990,44,150.8179,-78.905,489.2402,NULL,0), +(214000990,45,150.9741,-81.9156,488.6764,NULL,0), +(214000990,46,151.1304,-84.9286,488.2986,NULL,0), +(214001010,0,140.1163,-187.0399,486.2947,NULL,0), +(214001010,1,150.6493,-195.8038,486.3505,NULL,0), +(214001010,2,132.8594,-173.691,486.4606,NULL,0), +(214001010,3,135.6181,-162.3698,485.9478,NULL,0), +(214001010,4,145.9479,-147.1181,486.4198,NULL,0), +(214001010,5,154.4741,-135.3716,485.8805,NULL,0), +(214001010,6,145.9479,-147.1181,486.4198,NULL,0), +(214001010,7,135.6181,-162.3698,485.9478,NULL,0), +(214001010,8,132.8594,-173.691,486.4606,NULL,0), +(214001020,0,172.4809,-143.7101,485.5875,NULL,0), +(214001020,1,178.691,-160.0347,486.5255,NULL,0), +(214001020,2,179.4931,-179.4479,486.2628,NULL,0), +(214001020,3,174.0347,-196.4045,486.1969,NULL,0), +(214001020,4,179.4931,-179.4479,486.2628,NULL,0), +(214001020,5,178.691,-160.0347,486.5255,NULL,0), +(214001020,6,172.4993,-143.7585,485.5895,NULL,0), +(214001020,7,163.3403,-135.191,485.9008,NULL,0), +(214001060,0,172.0868,25.2326,500.1546,NULL,0), +(214001060,1,142.9167,25.3229,500.0,NULL,0), +(214001060,2,113.1128,25.3073,500.1442,NULL,0), +(214001060,3,142.9167,25.3229,500.0,NULL,0), +(214001370,0,-4820.0103,-980.0712,464.7466,NULL,0), +(214001370,1,-4822.9272,-976.2656,464.7875,NULL,0), +(214001370,2,-4824.9048,-971.9965,464.8263,NULL,0), +(214001370,3,-4825.6113,-970.2691,465.0395,NULL,0), +(214001370,4,-4820.4775,-969.809,464.8014,NULL,0), +(214001370,5,-4819.356,-975.3212,464.7743,NULL,0), +(214001370,6,-4817.2744,-975.2309,464.7635,NULL,0), +(214001370,7,-4820.019,-978.816,464.7549,NULL,0); +INSERT INTO `creature_addon` (`guid`,`PathId`) VALUES +(21400023,214000230), +(21400024,214000240), +(21400026,214000260), +(21400098,214000980), +(21400099,214000990), +(21400101,214001010), +(21400102,214001020), +(21400106,214001060), +(21400137,214001370); +DELETE FROM `creature_formations` WHERE `leaderGUID` BETWEEN 21400000 AND 21499999 OR `memberGUID` BETWEEN 21400000 AND 21499999; +-- formations (a mob walking whenever a patrolling mob next to it walks follows it; with --assist: guards fighting with their boss) +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`,`point_1`,`point_2`) VALUES +(21400099,21400099,0,0,515,0,0), +(21400099,21400075,4.01,269.8,515,0,0), +(21400026,21400026,0,0,3,0,0), +(21400026,21400111,0,0,3,0,0), +(21400026,21400112,0,0,3,0,0), +(21400025,21400025,0,0,3,0,0), +(21400025,21400104,0,0,3,0,0); diff --git a/sql/custom/world/2026_10_13_02_world_classic_hall_of_thanes_data.sql b/sql/custom/world/2026_10_13_02_world_classic_hall_of_thanes_data.sql new file mode 100644 index 0000000000..7256cb6219 --- /dev/null +++ b/sql/custom/world/2026_10_13_02_world_classic_hall_of_thanes_data.sql @@ -0,0 +1,363 @@ +-- Classic 1.60 (WoW Forever): templates, quests and NPC data of the dungeon Hall of Thanes (map 3065) from ymir sniffs of the official beta +-- (classic_re/sniff/sniff_import_dungeon.py): what the database lacked before (snapshot ids_pre_hall_of_thanes), the Forever creatures data +-- replaced. Spawns: sniff_import_instance.py; scripts: the dungeon generator. Safe to run again. + +-- creatures +DELETE FROM `creature_template` WHERE `entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263467,263470,263980,264943,265002,265003); +INSERT INTO `creature_template` (`entry`,`KillCredit1`,`KillCredit2`,`name`,`femaleName`,`subname`,`TitleAlt`,`IconName`,`RequiredExpansion`,`VignetteID`,`faction`,`npcflag`,`speed_walk`,`speed_run`,`scale`,`Classification`,`dmgschool`,`BaseAttackTime`,`RangeAttackTime`,`BaseVariance`,`RangeVariance`,`unit_class`,`unit_flags`,`unit_flags2`,`unit_flags3`,`family`,`trainer_class`,`type`,`VehicleId`,`AIName`,`MovementType`,`ExperienceModifier`,`RacialLeader`,`movementId`,`WidgetSetID`,`WidgetSetUnitConditionID`,`RegenHealth`,`CreatureImmunitiesId`,`flags_extra`,`ScriptName`,`VerifiedBuild`) VALUES +(261306,0,0,'Faldrim Anvilmar',NULL,NULL,NULL,NULL,0,0,16,0,1.0,1.142857,1.0,1,0,2000,2000,1,1,2,0,2048,0,0,0,6,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(261311,0,0,'Plunder',NULL,NULL,NULL,NULL,0,0,16,0,1.0,1.142857,1.0,1,0,2000,2000,1,1,1,0,2048,0,0,0,4,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(261316,0,0,'Magmatus',NULL,NULL,NULL,NULL,0,0,16,0,1.0,1.142857,1.0,1,0,2000,2000,1,1,1,0,2048,0,0,0,4,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(261319,0,0,'Durgen Dirgehammer',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.0,1,0,2000,2000,1,1,1,0,2048,0,0,0,7,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263389,0,0,'Enraged Apparition',NULL,NULL,NULL,NULL,0,0,16,0,1.0,1.142857,1.02,1,0,2000,2000,1,1,1,0,2048,0,0,0,6,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263390,0,0,'Tormented Soul',NULL,NULL,NULL,NULL,0,0,16,0,1.0,1.142857,1.05,1,0,2000,2000,1,1,8,0,2048,0,0,0,6,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263396,0,0,'Dark Iron Looter',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,0.93,1,0,2000,2000,1,1,4,0,2048,0,0,0,7,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263397,0,0,'Dark Iron Engineer',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.08,1,0,2000,2000,1,1,1,0,2048,0,0,0,7,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263438,0,0,'Dark Iron Summoner',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.05,1,0,2000,2000,1,1,8,0,2048,0,0,0,7,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263466,0,0,'Lesser Stone Golem',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.0,1,0,2000,2000,1,1,1,0,2048,0,0,0,4,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263467,0,0,'Fiery Assistant',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.0,0,0,2000,2000,1,1,1,0,2048,0,0,0,4,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263470,0,0,'Bloodhound Runt',NULL,NULL,NULL,NULL,0,0,54,0,1.0,1.142857,1.0,0,0,2000,2000,1,1,1,0,2048,0,0,0,1,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(263980,0,0,'Seaforium Blasting Powder',NULL,NULL,NULL,NULL,0,0,7,0,1.0,0.992063,1.0,0,0,2000,2000,1,1,1,0,2048,0,0,0,10,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(264943,0,0,'Afadra Dunwall',NULL,'Lorekeeper of Ironforge',NULL,NULL,0,0,55,2,1.0,1.142857,1.0,0,0,2000,2000,1,1,1,0,2048,0,0,0,7,0,'',0,1,0,1693,0,0,1,0,0,'',70124), +(265002,0,0,'Ghostly Attendant',NULL,NULL,NULL,NULL,0,0,35,2,1.0,1.142857,1.06,1,0,2000,2000,1,1,8,0,2048,0,0,0,6,0,'',0,1,0,0,0,0,1,0,0,'',70124), +(265003,0,0,'Thom Filch',NULL,NULL,NULL,NULL,0,0,474,2,1.0,1.142857,1.0,0,0,2000,2000,1,1,1,0,2048,0,0,0,7,0,'',0,1,0,1693,0,0,1,0,0,'',70124); +DELETE FROM `creature_template_difficulty` WHERE `Entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263467,263470,263980,264943,265002,265003); +INSERT INTO `creature_template_difficulty` (`Entry`,`DifficultyID`,`LevelScalingDeltaMin`,`LevelScalingDeltaMax`,`ContentTuningID`,`HealthScalingExpansion`,`HealthModifier`,`ManaModifier`,`ArmorModifier`,`DamageModifier`,`CreatureDifficultyID`,`TypeFlags`,`TypeFlags2`,`TypeFlags3`,`LootID`,`PickPocketLootID`,`SkinLootID`,`GoldMin`,`GoldMax`,`VerifiedBuild`) VALUES +(261306,0,0,0,0,0,4.2,1.5,1,1,344537,0,128,0,0,0,0,0,0,70124), +(261311,0,0,0,0,0,6.0,1.0,1,1,344542,0,128,0,0,0,0,0,0,70124), +(261316,0,0,0,0,0,4.2,1.0,1,1,344547,0,128,0,0,0,0,0,0,70124), +(261319,0,0,0,0,0,4.5,1.0,1,1,344550,0,128,0,0,0,0,0,0,70124), +(263389,0,0,0,0,0,3.0,1.0,1,1,346696,0,0,0,0,0,0,0,0,70124), +(263390,0,0,0,0,0,3.0,1.0,1,1,346697,0,0,0,0,0,0,0,0,70124), +(263396,0,0,0,0,0,3.0,1.0,1,1,346703,0,0,0,0,0,0,0,0,70124), +(263397,0,0,0,0,0,3.0,1.0,1,1,346704,0,0,0,0,0,0,0,0,70124), +(263438,0,0,0,0,0,3.0,1.2,1,1,346745,0,0,0,0,0,0,0,0,70124), +(263466,0,0,0,0,0,4.0,1.0,1,1,346773,0,0,0,0,0,0,0,0,70124), +(263467,0,0,0,0,0,0.8,1.0,1,1,346774,0,0,0,0,0,0,0,0,70124), +(263470,0,0,0,0,0,0.9,1.0,1,1,346777,0,0,0,0,0,0,0,0,70124), +(263980,0,0,0,0,0,0.1,1.0,1,1,347304,1610612736,67108864,0,0,0,0,0,0,70124), +(264943,0,0,0,0,0,1.0,1.0,1,1,348448,134217728,0,0,0,0,0,0,0,70124), +(265002,0,0,0,0,0,3.0,1.0,1,1,348507,0,0,0,0,0,0,0,0,70124), +(265003,0,0,0,0,0,1.0,1.0,1,1,348508,134217728,0,0,0,0,0,0,0,70124); +DELETE FROM `creature_template_model` WHERE `CreatureID` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263467,263470,263980,264943,265002,265003); +INSERT INTO `creature_template_model` (`CreatureID`,`Idx`,`CreatureDisplayID`,`DisplayScale`,`Probability`,`VerifiedBuild`) VALUES +(261306,0,142826,1.75,1.0,70124), +(261311,0,142840,1.5,1.0,70124), +(261316,0,1070,1.5,1.0,70124), +(261319,0,142837,1.5,1.0,70124), +(263389,0,143689,1.0,1.0,70124), +(263389,1,143694,1.0,1.0,70124), +(263389,2,143695,1.0,1.0,70124), +(263389,3,143696,1.0,1.0,70124), +(263390,0,143690,1.0,1.0,70124), +(263390,1,143692,1.0,1.0,70124), +(263390,2,143693,1.0,1.0,70124), +(263390,3,143691,1.0,1.0,70124), +(263396,0,3452,1.0,1.0,70124), +(263397,0,3954,1.0,1.0,70124), +(263438,0,143713,1.0,1.0,70124), +(263466,0,2693,0.9,1.0,70124), +(263467,0,1070,0.5,1.0,70124), +(263470,0,8180,0.6,1.0,70124), +(263980,0,142182,1.0,1.0,70124), +(264943,0,144322,1.0,100.0,70124), +(265002,0,144348,1.0,1.0,70124), +(265003,0,144349,1.0,100.0,70124); +INSERT IGNORE INTO `creature_model_info` (`DisplayID`,`BoundingRadius`,`CombatReach`,`DisplayID_Other_Gender`,`VerifiedBuild`) VALUES +(1070,0.389,1.5,0,70124), +(2693,0.389,1.5,0,70124), +(3452,0.389,1.5,0,70124), +(3954,0.389,1.5,0,70124), +(8180,0.389,1.5,0,70124), +(142182,0.389,1.5,0,70124), +(142826,0.389,1.5,0,70124), +(142837,0.389,1.5,0,70124), +(142840,0.389,1.5,0,70124), +(143689,0.389,1.5,0,70124), +(143690,0.389,1.5,0,70124), +(143691,0.389,1.5,0,70124), +(143692,0.389,1.5,0,70124), +(143693,0.389,1.5,0,70124), +(143694,0.389,1.5,0,70124), +(143695,0.389,1.5,0,70124), +(143696,0.389,1.5,0,70124), +(143713,0.389,1.5,0,70124), +(144322,0.389,1.5,0,70124), +(144348,0.389,1.5,0,70124), +(144349,0.389,1.5,0,70124); + +-- creature equipment seen in the sniffs +INSERT IGNORE INTO `creature_equip_template` (`CreatureID`,`ID`,`ItemID1`,`AppearanceModID1`,`ItemVisual1`,`ItemID2`,`AppearanceModID2`,`ItemVisual2`,`ItemID3`,`AppearanceModID3`,`ItemVisual3`,`VerifiedBuild`) VALUES +(261306,1,5491,0,0,0,0,0,0,0,0,70124), +(261319,1,14875,0,0,0,0,0,0,0,0,70124), +(263389,1,3488,0,0,0,0,0,0,0,0,70124), +(263390,1,12421,0,0,0,0,0,0,0,0,70124), +(263396,1,4565,0,0,0,0,0,0,0,0,70124), +(263397,1,1903,0,0,0,0,0,0,0,0,70124), +(264943,1,13312,0,0,0,0,0,0,0,0,70124), +(265003,1,15247,0,0,0,0,0,0,0,0,70124); + +-- creature levels seen in the sniffs (Forever creatures replaced, others only where missing) +DELETE FROM `creature_classic_level` WHERE `entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263470,263980,264943,265002,265003); +INSERT IGNORE INTO `creature_classic_level` (`entry`,`level_min`,`level_max`) VALUES +(4075,1,1), +(14881,1,1), +(261306,16,16), +(261311,16,16), +(261316,16,16), +(261319,16,16), +(263389,13,14), +(263390,13,14), +(263396,14,15), +(263397,14,15), +(263438,14,15), +(263466,14,15), +(263470,14,15), +(263980,13,13), +(264943,13,13), +(265002,13,13), +(265003,13,13); + +-- permanent creature auras seen in the sniffs (full aura updates of at least half of the creatures units) +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (263389,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (263390,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (263396,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (263397,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (263438,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; +INSERT INTO `creature_template_addon` (`entry`,`auras`) VALUES (265002,'1264628') ON DUPLICATE KEY UPDATE `auras` = '1264628'; + +-- gameobjects +DELETE FROM `gameobject_template` WHERE `entry` IN (457387,642023,642024,642025,642026,642027,642857,642858,642859,645389,645390,645391,645392,645393,648667,648668,648669,648670,648671,648672,648673,648674,648675,648676,648677,648678,650183,650720,652080,652081,652082,652083,652084,652085,652086,652087,652088,652089,652090,652091,652092,652093,652094,652095,652227,652228,673473,673474,703593,703594,703595,703596,703597,703598,703599,703600,703601,703602,703603,703604,703605,703606,703607,703608,703609,703610,703611,703612,703613,703614,703615,703616,703617,703618,703619,703620,703621,703622,703623,703624,703625,703626,703627,703628,703629,703630,703631,703632,703633,703634,703635,703636,703637,703638,703639,703640,703641,703642,703643,703644,703645,703646,703647,703648); +INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`IconName`,`castBarCaption`,`unk1`,`size`,`Data0`,`Data1`,`Data2`,`Data3`,`Data4`,`Data5`,`Data6`,`Data7`,`Data8`,`Data9`,`Data10`,`Data11`,`Data12`,`Data13`,`Data14`,`Data15`,`Data16`,`Data17`,`Data18`,`Data19`,`Data20`,`Data21`,`Data22`,`Data23`,`Data24`,`Data25`,`Data26`,`Data27`,`Data28`,`Data29`,`Data30`,`Data31`,`Data32`,`Data33`,`Data34`,`ContentTuningId`,`RequiredLevel`,`AIName`,`ScriptName`,`VerifiedBuild`) VALUES +(457387,3,88067,'Dwarven Heirloom','','','',0.35,93,141018,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4097,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2180,1,'','',70124), +(642023,0,401,'Portcullis','','','',0.72,1,0,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642024,0,401,'Portcullis','','','',0.72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642025,0,401,'Portcullis','','','',0.72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642026,0,401,'Portcullis','','','',0.72,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642027,0,401,'Portcullis','','','',0.72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642857,0,401,'Portcullis','','','',0.72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642858,0,401,'Portcullis','','','',0.829999,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(642859,0,401,'Portcullis','','','',0.829999,0,0,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(645389,0,2752,'Iron Door','','','',1.0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(645390,0,2752,'Iron Door','','','',1.0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(645391,0,2752,'Iron Door','','','',1.0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(645392,0,2752,'Iron Door','','','',1.0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(645393,0,2752,'Vault Door','','','',1.0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648667,0,401,'Portcullis','','','',0.9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648668,0,401,'Portcullis','','','',0.9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648669,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648670,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648671,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648672,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648673,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648674,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648675,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648676,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648677,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(648678,0,3075,'Vault Door','','','',1.5,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(650183,5,12419,'Faldrim Anvilmar, Thane of Ironforge','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(650720,23,5494,'Meeting Stone','','','',0.66,1,60,16919,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7420,10,'','',70124), +(652080,5,3011,'Bael\'gan Morogh','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652081,5,3011,'Aegrim Bronzebeard','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652082,5,3011,'Furgus Algaz','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652083,5,3011,'Modimus Anvilmar','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652084,5,3011,'Hargran Thandol','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652085,5,3011,'Eimear Bronzebeard','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652086,5,3011,'Madoran Bronzebeard','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652087,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652088,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652089,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652090,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652091,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652092,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652093,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652094,5,3011,'PlaqueBronze01','','','',2.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652095,5,3011,'Muradin Bronzebeard','','','',2.0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(652227,3,125243,'Dwarven Heirloom','','','',0.2,93,141018,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4097,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2180,1,'','',70124), +(652228,3,125245,'Dwarven Heirloom','','','',0.85,93,141018,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4097,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2180,1,'','',70124), +(673473,1,295,'Ancient Switch','','','',1.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(673474,2,129586,'Treaty of Understanding','','','',0.35,0,30571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2180,1,'','',70124), +(703593,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703594,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703595,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703596,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703597,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703598,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703599,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703600,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703601,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703602,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703603,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703604,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703605,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703606,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703607,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703608,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703609,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703610,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703611,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703612,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703613,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703614,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703615,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703616,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703617,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703618,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703619,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703620,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703621,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703622,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703623,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703624,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703625,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703626,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703627,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703628,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703629,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703630,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703631,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703632,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703633,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703634,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703635,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703636,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703637,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703638,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703639,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703640,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703641,8,197,'Dwarven Brazier','','','',0.999817,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703642,8,197,'Dwarven Brazier','','','',0.999817,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703643,8,197,'Dwarven Brazier','','','',0.999817,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703644,8,197,'Dwarven Brazier','','','',0.999817,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703645,8,197,'Dwarven Brazier','','','',0.999817,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703646,8,197,'Dwarven Brazier','','','',0.999998,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703647,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124), +(703648,8,197,'Dwarven Brazier','','','',0.999999,4,5,2061,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','',70124); + +-- quest items of the new quest objects (chests drop them while the quest needs them) +DELETE FROM `gameobject_questitem` WHERE `GameObjectEntry` IN (457387,652227,652228); +INSERT INTO `gameobject_questitem` (`GameObjectEntry`,`Idx`,`ItemId`,`VerifiedBuild`) VALUES +(457387,0,274289,70124), +(652227,0,274289,70124), +(652228,0,274289,70124); +DELETE FROM `gameobject_loot_template` WHERE (`Entry`, `Item`) IN ((141018,274289)); +INSERT INTO `gameobject_loot_template` (`Entry`,`ItemType`,`Item`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(141018,0,274289,100,1,1,0,1,1,'Dwarven Heirloom (sniff, quest item)'); + +-- loot of the Forever chests opened in the sniffs that have their own loot id (chance = drops / openings of all its chests) +DELETE FROM `gameobject_loot_template` WHERE `Entry` IN (141018); +INSERT INTO `gameobject_loot_template` (`Entry`,`ItemType`,`Item`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(141018,0,274289,100.0,1,1,0,1,1,'sniff: 8 of 8 openings (chests 457387 652227 652228)'); + +-- quests +DELETE FROM `quest_template` WHERE `ID` IN (96393,96394,96395,96403,98423); +INSERT INTO `quest_template` (`ID`,`QuestType`,`QuestPackageID`,`ContentTuningID`,`QuestSortID`,`QuestInfoID`,`SuggestedGroupNum`,`RewardNextQuest`,`RewardXPDifficulty`,`RewardXPMultiplier`,`RewardMoneyDifficulty`,`RewardMoneyMultiplier`,`RewardBonusMoney`,`RewardSpell`,`RewardHonor`,`RewardKillHonor`,`RewardFavor`,`RewardArtifactXPDifficulty`,`RewardArtifactXPMultiplier`,`RewardArtifactCategoryID`,`StartItem`,`Flags`,`FlagsEx`,`FlagsEx2`,`FlagsEx3`,`RewardItem1`,`RewardAmount1`,`ItemDrop1`,`ItemDropQuantity1`,`RewardItem2`,`RewardAmount2`,`ItemDrop2`,`ItemDropQuantity2`,`RewardItem3`,`RewardAmount3`,`ItemDrop3`,`ItemDropQuantity3`,`RewardItem4`,`RewardAmount4`,`ItemDrop4`,`ItemDropQuantity4`,`RewardChoiceItemID1`,`RewardChoiceItemQuantity1`,`RewardChoiceItemDisplayID1`,`RewardChoiceItemID2`,`RewardChoiceItemQuantity2`,`RewardChoiceItemDisplayID2`,`RewardChoiceItemID3`,`RewardChoiceItemQuantity3`,`RewardChoiceItemDisplayID3`,`RewardChoiceItemID4`,`RewardChoiceItemQuantity4`,`RewardChoiceItemDisplayID4`,`RewardChoiceItemID5`,`RewardChoiceItemQuantity5`,`RewardChoiceItemDisplayID5`,`RewardChoiceItemID6`,`RewardChoiceItemQuantity6`,`RewardChoiceItemDisplayID6`,`POIContinent`,`POIx`,`POIy`,`POIPriority`,`RewardTitle`,`RewardArenaPoints`,`RewardSkillLineID`,`RewardNumSkillUps`,`PortraitGiver`,`PortraitGiverMount`,`PortraitGiverModelSceneID`,`PortraitTurnIn`,`RewardFactionID1`,`RewardFactionValue1`,`RewardFactionOverride1`,`RewardFactionCapIn1`,`RewardFactionID2`,`RewardFactionValue2`,`RewardFactionOverride2`,`RewardFactionCapIn2`,`RewardFactionID3`,`RewardFactionValue3`,`RewardFactionOverride3`,`RewardFactionCapIn3`,`RewardFactionID4`,`RewardFactionValue4`,`RewardFactionOverride4`,`RewardFactionCapIn4`,`RewardFactionID5`,`RewardFactionValue5`,`RewardFactionOverride5`,`RewardFactionCapIn5`,`RewardFactionFlags`,`RewardCurrencyID1`,`RewardCurrencyQty1`,`RewardCurrencyID2`,`RewardCurrencyQty2`,`RewardCurrencyID3`,`RewardCurrencyQty3`,`RewardCurrencyID4`,`RewardCurrencyQty4`,`AcceptedSoundKitID`,`CompleteSoundKitID`,`AreaGroupID`,`TimeAllowed`,`AllowableRaces`,`Expansion`,`ManagedWorldStateID`,`QuestSessionBonus`,`ResetByScheduler`,`LogTitle`,`LogDescription`,`QuestDescription`,`AreaDescription`,`PortraitGiverText`,`PortraitGiverName`,`PortraitTurnInText`,`PortraitTurnInName`,`QuestCompletionLog`,`RewardDisplaySpell1`,`RewardDisplaySpell2`,`RewardDisplaySpell3`,`VerifiedBuild`) VALUES +(96393,2,9,0,16919,81,0,0,6,2.2,5,1.0,0,0,0,0.0,0,0,1.0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,279894,1,0,279895,1,0,279896,1,0,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0,47,5,0,7,54,5,0,7,0,0,0,7,0,0,0,7,0,0,0,7,3,0,0,0,0,0,0,0,0,890,878,0,0,18446744073709551615,-2,0,0,0,'Old Ironforge Incursion','Enter the Hall of Thanes beneath Old Ironforge and claim the Head of Durgen Dirgehammer.','Gather some allies and head down into the caverns beneath Old Ironforge. Enter the Hall of Thanes there and push to the lower vaults. \r\n\r\nMy Dark Iron is a bit rusty, but I can make out a name--one Durgen Dirgehammer. It\'s likely that he\'s the commander. Take his head and deliver it to King Magni Bronzebeard. \r\n\r\nOh, and when you do, tell him his old friend Farsen sends his regards!','','','','','','',0,0,0,70124), +(96394,2,10,0,16919,81,0,0,5,2.2,5,1.0,0,0,0,0.0,0,0,1.0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,279897,1,0,280095,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0,47,5,0,7,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,7,3,0,0,0,0,0,0,0,0,890,878,0,0,6130900294268439629,-2,0,0,0,'The Restless Dead','Kill $1oa Enraged Apparitions, $2oa Tormented Souls and put the spirit of Anvilmar to rest.','Something has disturbed the tombs down in the Hall of Thanes, and strange noises have been heard coming from deep within the vaults. The spirits of the dead are light sleepers, and whatever is going on down there seems to have startled them.\r\n\r\nHead down there and see what you can do about that for us. If any of the dead are awake--well, put them back down!','','','','','','',0,0,0,70124), +(96395,2,10,0,16919,81,0,0,5,2.2,0,1.0,0,0,0,0.0,0,0,1.0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,279899,1,0,279900,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,7,3,0,0,0,0,0,0,0,0,890,878,0,0,18446744073709551615,-2,0,0,0,'An Ancient Grudge','Put the spirit of Faldrim Anvilmar to rest and then return to the Ghostly Attendant in the Hall of Thanes.','The... Thane... my mighty... Thane... he... needs to... rest.\r\n\r\nPlease... help him... help him... rest...\r\n\r\nConsumed... by... ancient... grudge... No... rest...','','','','','','',0,0,0,70124), +(96403,2,10,0,16919,81,0,0,6,2.2,5,1.0,0,0,0,0.0,0,0,1.0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,279898,1,0,280096,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0,369,5,0,7,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,7,3,0,0,0,0,0,0,0,0,890,878,0,0,18446744073709551615,-2,0,0,0,'Important Heirlooms','Collect $1oa Dwarven Heirlooms from the Hall of Thanes.','You there, adventurer... I could really use your aid.\r\n\r\nI was sneaking--uh... \'patrolling\' in the vaults when a force of Dark Iron dwarves emerged from the depths in mole machines! I don\'t know what they are here for, but there is priceless loot--uh or, rather... I mean, \'important cultural heirlooms\' down there! Please, recover any such relics you see and return them here.\r\n\r\nI assure you that anything you recover will be catalogued and returned to its proper place of honor.','','','','','','',0,0,0,70124), +(98423,2,9,0,1,0,0,0,5,2.2,6,1.0,0,0,0,0.0,0,0,1.0,0,281030,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0,47,5,0,7,54,5,0,7,0,0,0,7,0,0,0,7,0,0,0,7,3,0,0,0,0,0,0,0,0,890,878,0,0,6130900294268439629,-2,0,0,0,'The Treaty of Understanding','Deliver the Treaty of Understanding to Magni Bronzebeard in Ironforge.','Inside of the vault you find a tablet detailing the terms of a peace treaty between the Bronzebeard and Wildhammer dwarf clans. It appears to date back to time period just after the War of the Three Hammers, and is very likely a notable piece of dwarven history. The king of Ironforge would no doubt be interested in this artifact.','','','','','','',0,0,0,70124); +DELETE FROM `quest_objectives` WHERE `QuestID` IN (96393,96394,96395,96403,98423); +INSERT INTO `quest_objectives` (`ID`,`QuestID`,`Type`,`Order`,`StorageIndex`,`ObjectID`,`Amount`,`ConditionalAmount`,`Flags`,`Flags2`,`ProgressBarWeight`,`ParentObjectiveID`,`Visible`,`Description`,`VerifiedBuild`) VALUES +(473137,96393,1,0,0,274286,1,-842150451,32,1,0.0,0,1,'',70124), +(473140,96394,0,0,0,263389,15,-842150451,32,0,0.0,0,1,'',70124), +(473142,96394,0,1,1,263390,10,-842150451,32,0,0.0,0,1,'',70124), +(473143,96395,0,0,2,261306,1,-842150451,32,0,0.0,0,1,'',70124), +(473157,96403,1,0,0,274289,8,-842150451,32,1,0.0,0,1,'',70124), +(477608,98423,1,0,0,281030,1,-842150451,32,0,0.0,0,1,'',70124); + +-- quest givers and takers seen in the sniffs +INSERT IGNORE INTO `creature_queststarter` (`id`,`quest`,`VerifiedBuild`) VALUES +(264943,96394,70124), +(265003,96403,70124), +(265002,96395,70124); +INSERT IGNORE INTO `gameobject_queststarter` (`id`,`quest`,`VerifiedBuild`) VALUES +(673474,98423,70124); +INSERT IGNORE INTO `creature_questender` (`id`,`quest`,`VerifiedBuild`) VALUES +(264943,96394,70124), +(265003,96403,70124), +(265002,96395,70124), +(2784,98423,70124); + +-- quest POIs (objective areas on the map and minimap) +DELETE FROM `quest_poi` WHERE `QuestID` IN (96394,96395,96403,98423); +INSERT INTO `quest_poi` (`QuestID`,`BlobIndex`,`Idx1`,`ObjectiveIndex`,`QuestObjectiveID`,`QuestObjectID`,`MapID`,`UiMapID`,`Priority`,`Flags`,`WorldEffectID`,`PlayerConditionID`,`NavigationPlayerConditionID`,`SpawnTrackingID`,`AlwaysAllowMergingBlobs`,`VerifiedBuild`) VALUES +(96394,0,0,32,0,0,0,1426,0,0,0,0,0,29384,0,70124), +(96395,0,0,32,0,0,0,1426,0,0,0,0,0,29384,0,70124), +(96403,0,0,-1,0,0,0,1455,0,0,0,0,0,3254787,0,70124), +(96403,0,1,32,0,0,0,1455,0,0,0,0,0,3254787,0,70124), +(98423,0,0,-1,0,0,0,1455,0,0,0,0,0,46858,0,70124), +(98423,0,1,32,0,0,0,1455,0,0,0,0,0,0,0,70124); +DELETE FROM `quest_poi_points` WHERE `QuestID` IN (96394,96395,96403,98423); +INSERT INTO `quest_poi_points` (`QuestID`,`Idx1`,`Idx2`,`X`,`Y`,`Z`,`VerifiedBuild`) VALUES +(96394,0,0,-5573,99,484,70124), +(96395,0,0,-5573,99,484,70124), +(96403,0,0,-4804,-968,399,70124), +(96403,1,0,-4804,-968,399,70124), +(98423,0,0,-4866,-1023,506,70124), +(98423,1,0,-4866,-1023,506,70124); + +-- quest levels as the official server sends them (sniff_quest_levels.py) +REPLACE INTO `quest_template_classic_level` (`ID`,`LevelType`,`QuestLevel`) VALUES +(96393,2,16), +(96394,2,15), +(96395,2,15), +(96403,2,15), +(98423,2,16); +REPLACE INTO `quest_classic_level` (`ID`,`QuestLevel`,`MinLevel`,`MaxLevel`) VALUES +(96393,16,9,0), +(96394,15,10,0), +(96395,15,10,0), +(96403,15,10,0), +(98423,16,9,0); + + +-- quest_offer_reward: the quest givers text (Forever and new quests replaced, others only where missing) +DELETE FROM `quest_offer_reward` WHERE `ID` IN (96394,96395,96403,98423); +INSERT IGNORE INTO `quest_offer_reward` (`ID`,`Emote1`,`Emote2`,`Emote3`,`Emote4`,`EmoteDelay1`,`EmoteDelay2`,`EmoteDelay3`,`EmoteDelay4`,`RewardText`,`VerifiedBuild`) VALUES +(96394,0,0,0,0,0,0,0,0,'Ah good, it\'s done then. I can\'t have the other keepers refusing to enter the hall to do their duties on account of "ghosts" and "angry dead", can I?',70124), +(96395,0,0,0,0,0,0,0,0,'My... Thane... he... rests... yes... rest.\r\n\r\nThank... you...\r\n\r\nI... rest...',70124), +(96403,0,0,0,0,0,0,0,0,'Look at you, as brave as you are enterprising! I\'m a gnome of my word, and your reward is well earned! \r\n\r\nNow, let me take a look at the haul--uh, I mean... the recovered heirlooms. I need to get started appraising--excuse me, \'cataloging\' them so that they can be put back in their proper places as quickly as possible.',70124), +(98423,0,0,0,0,0,0,0,0,'Ah yes, my ancestor Madoran was the first Bronzebeard king of Ironforge following the great civil war between the Wildhammer, Bronzebeard, and Dark Iron clans. This treaty was drafted to codify the cessation of hostilities and terms of peace after the Bronzebeards won the mountain.\r\n\r\nAs you can see, the Wildhammers and Bronzebeards signed it... and the Dark Irons did not.\r\n\r\nThank you for recovering this and bringing it to me, $c.',70124); + +-- quest_request_items: the quest givers text (Forever and new quests replaced, others only where missing) +DELETE FROM `quest_request_items` WHERE `ID` IN (96403,98423); +INSERT IGNORE INTO `quest_request_items` (`ID`,`EmoteOnComplete`,`EmoteOnIncomplete`,`EmoteOnCompleteDelay`,`EmoteOnIncompleteDelay`,`CompletionText`,`VerifiedBuild`) VALUES +(96403,0,0,0,0,'',70124), +(98423,0,0,0,0,'What have you brought from the depths, $c.',70124); + +-- loot of the Forever creatures (chance = drops / kills seen in the sniffs) +UPDATE `creature_template_difficulty` SET `LootID` = `Entry` WHERE `DifficultyID` = 0 AND `Entry` IN (261306,261319,263389,263396,263397,263438,263470); +UPDATE `creature_template_difficulty` SET `GoldMin` = 11, `GoldMax` = 35 WHERE `DifficultyID` = 0 AND `Entry` = 263389; +UPDATE `creature_template_difficulty` SET `GoldMin` = 19, `GoldMax` = 43 WHERE `DifficultyID` = 0 AND `Entry` = 263396; +UPDATE `creature_template_difficulty` SET `GoldMin` = 56, `GoldMax` = 73 WHERE `DifficultyID` = 0 AND `Entry` = 263438; +DELETE FROM `creature_loot_template` WHERE `Entry` IN (261306,261319,263389,263396,263397,263438,263470); +INSERT INTO `creature_loot_template` (`Entry`,`ItemType`,`Item`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(261306,0,271097,100.0,0,1,0,1,1,'sniff: 1 of 1 kills'), +(261319,0,270256,100.0,0,1,0,1,1,'sniff: 1 of 1 kills'), +(263389,0,1501,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263389,0,2589,33.33,0,1,0,4,4,'sniff: 2 of 6 kills'), +(263389,0,9759,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,858,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,1514,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,1732,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,2589,33.33,0,1,0,5,5,'sniff: 2 of 6 kills'), +(263396,0,2977,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,6543,16.67,0,1,0,1,1,'sniff: 1 of 6 kills'), +(263396,0,275893,33.33,0,1,0,1,1,'sniff: 2 of 6 kills'), +(263397,0,818,50.0,0,1,0,1,1,'sniff: 1 of 2 kills'), +(263397,0,1732,50.0,0,1,0,1,1,'sniff: 1 of 2 kills'), +(263438,0,2971,33.33,0,1,0,1,1,'sniff: 1 of 3 kills'), +(263438,0,4293,33.33,0,1,0,1,1,'sniff: 1 of 3 kills'), +(263470,0,2318,42.86,0,1,0,1,2,'sniff: 3 of 7 kills'), +(263470,0,2319,14.29,0,1,0,1,1,'sniff: 1 of 7 kills'), +(263470,0,2672,42.86,0,1,0,1,1,'sniff: 3 of 7 kills'); + +-- quest items of the creatures (creature query) and their drops when no sniffed loot had them +DELETE FROM `creature_questitem` WHERE `CreatureEntry` IN (261319); +INSERT INTO `creature_questitem` (`CreatureEntry`,`DifficultyID`,`Idx`,`ItemId`,`VerifiedBuild`) VALUES +(261319,0,0,274286,70124); +UPDATE `creature_template_difficulty` SET `LootID` = `Entry` WHERE `DifficultyID` = 0 AND `LootID` = 0 AND `Entry` IN (261319); +DELETE FROM `creature_loot_template` WHERE (`Entry`, `Item`) IN ((261319,274286)); +INSERT INTO `creature_loot_template` (`Entry`,`ItemType`,`Item`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(261319,0,274286,100,1,1,0,1,1,'quest item of the creature query (drop not seen in the sniffs)'); diff --git a/sql/custom/world/2026_10_13_03_world_classic_hall_of_thanes_wowhead_loot.sql b/sql/custom/world/2026_10_13_03_world_classic_hall_of_thanes_wowhead_loot.sql new file mode 100644 index 0000000000..de9c8db72b --- /dev/null +++ b/sql/custom/world/2026_10_13_03_world_classic_hall_of_thanes_wowhead_loot.sql @@ -0,0 +1,980 @@ +-- Classic 1.60: The Hall of Thanes dungeon (map 3065) loot from Wowhead (Forever) drop counts (chance = drops / kills there), +-- generated by gen_wowhead_loot.py. Bosses: their blues are one group (one of them per kill). Quest items keep the database rows +-- (quest required); everything else of these creatures is replaced. +-- Faldrim Anvilmar 261306: 3 items from 344 kills; Plunder 261311: 3 items from 295 kills; Magmatus 261316: 3 items from 196 kills; Durgen Dirgehammer 261319: 3 items from 278 kills; Enraged Apparition 263389: 149 items from 1392 kills; Tormented Soul 263390: 140 items from 1266 kills; Dark Iron Looter 263396: 160 items from 2282 kills; Dark Iron Engineer 263397: 122 items from 624 kills; Dark Iron Summoner 263438: 131 items from 634 kills; Lesser Stone Golem 263466: 118 items from 415 kills; Bloodhound Runt 263470: 141 items from 1248 kills +UPDATE `creature_template_difficulty` SET `LootID` = `Entry` WHERE `DifficultyID` = 0 AND `Entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263470); +DELETE FROM `creature_loot_template` WHERE `Entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263470) AND `QuestRequired` = 0; +INSERT INTO `creature_loot_template` (`Entry`,`ItemType`,`Item`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(261306,0,270227,31.686,0,1,1,1,1,'wowhead: 109 of 344 kills - Ephemeral Choker'), +(261306,0,271096,34.302,0,1,1,1,1,'wowhead: 118 of 344 kills - Aetherwisp Bracers'), +(261306,0,271097,33.43,0,1,1,1,1,'wowhead: 115 of 344 kills - Spiritwraith Drape'), +(261311,0,270228,34.576,0,1,1,1,1,'wowhead: 102 of 295 kills - Golemheart Stave'), +(261311,0,270229,32.542,0,1,1,1,1,'wowhead: 96 of 295 kills - Treads of the Protector Golem'), +(261311,0,271098,32.542,0,1,1,1,1,'wowhead: 96 of 295 kills - Golemguard Chest'), +(261316,0,270230,37.245,0,1,1,1,1,'wowhead: 73 of 196 kills - Kindlegem Girdle'), +(261316,0,270231,30.102,0,1,1,1,1,'wowhead: 59 of 196 kills - Flamefist Grips'), +(261316,0,271095,32.653,0,1,1,1,1,'wowhead: 64 of 196 kills - Fang of Magmatus'), +(261319,0,270256,26.978,0,1,1,1,1,'wowhead: 75 of 278 kills - Durgens Crescent Axe'), +(261319,0,270260,21.583,0,1,1,1,1,'wowhead: 60 of 278 kills - Direhammer Leggings'), +(261319,0,270261,24.46,0,1,1,1,1,'wowhead: 68 of 278 kills - Robes of the Disgraced Thane'), +(263389,0,818,4.167,0,1,0,1,1,'wowhead: 58 of 1392 kills - Tigerseye'), +(263389,0,1210,1.58,0,1,0,1,1,'wowhead: 22 of 1392 kills - Shadowgem'), +(263389,0,1495,0.934,0,1,0,1,1,'wowhead: 13 of 1392 kills - Calico Shoes'), +(263389,0,1497,0.503,0,1,0,1,1,'wowhead: 7 of 1392 kills - Calico Cloak'), +(263389,0,1499,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Calico Pants'), +(263389,0,1501,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Calico Tunic'), +(263389,0,1502,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Warped Leather Belt'), +(263389,0,1503,0.862,0,1,0,1,1,'wowhead: 12 of 1392 kills - Warped Leather Boots'), +(263389,0,1504,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Warped Leather Bracers'), +(263389,0,1505,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Warped Cloak'), +(263389,0,1506,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Warped Leather Gloves'), +(263389,0,1507,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Warped Leather Pants'), +(263389,0,1509,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Warped Leather Vest'), +(263389,0,1510,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Heavy Hammer'), +(263389,0,1511,0.862,0,1,0,1,1,'wowhead: 12 of 1392 kills - Commoners Sword'), +(263389,0,1513,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Old Greatsword'), +(263389,0,1514,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Rusty Warhammer'), +(263389,0,1515,1.006,0,1,0,1,1,'wowhead: 14 of 1392 kills - Rough Wooden Staff'), +(263389,0,1516,1.078,0,1,0,1,1,'wowhead: 15 of 1392 kills - Worn Hatchet'), +(263389,0,1730,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Worn Mail Belt'), +(263389,0,1731,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Worn Mail Boots'), +(263389,0,1732,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Worn Mail Bracers'), +(263389,0,1733,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Worn Cloak'), +(263389,0,1734,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Worn Mail Gloves'), +(263389,0,1735,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Worn Mail Pants'), +(263389,0,1737,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Worn Mail Vest'), +(263389,0,2073,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Dwarven Hatchet'), +(263389,0,2075,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Priests Mace'), +(263389,0,2079,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Sergeants Warhammer'), +(263389,0,2214,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Wooden Buckler'), +(263389,0,2215,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Wooden Shield'), +(263389,0,2406,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Pattern: Fine Leather Boots'), +(263389,0,2407,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Pattern: White Leather Jerkin'), +(263389,0,2409,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Pattern: Dark Leather Tunic'), +(263389,0,2553,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Recipe: Elixir of Minor Agility'), +(263389,0,2589,28.664,0,1,0,1,5,'wowhead: 399 of 1392 kills - Linen Cloth'), +(263389,0,2601,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Pattern: Gray Woolen Robe'), +(263389,0,2632,0.862,0,1,0,1,1,'wowhead: 12 of 1392 kills - Curved Dagger'), +(263389,0,2657,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Red Leather Bag'), +(263389,0,2763,0.934,0,1,0,1,1,'wowhead: 13 of 1392 kills - Fisherman Knife'), +(263389,0,2777,1.078,0,1,0,1,1,'wowhead: 15 of 1392 kills - Feeble Shortbow'), +(263389,0,2778,1.221,0,1,0,1,1,'wowhead: 17 of 1392 kills - Cheap Blunderbuss'), +(263389,0,2883,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Plans: Deadly Bronze Poniard'), +(263389,0,2969,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Spellbinder Vest'), +(263389,0,2970,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Spellbinder Pants'), +(263389,0,2971,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Spellbinder Boots'), +(263389,0,2972,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Spellbinder Gloves'), +(263389,0,2973,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Hunting Tunic'), +(263389,0,2974,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Hunting Pants'), +(263389,0,2975,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Hunting Boots'), +(263389,0,2976,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Hunting Gloves'), +(263389,0,2977,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Veteran Armor'), +(263389,0,2978,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Veteran Leggings'), +(263389,0,2979,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Veteran Boots'), +(263389,0,2980,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Veteran Gloves'), +(263389,0,2983,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Seers Boots'), +(263389,0,3036,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Heavy Shortbow'), +(263389,0,3192,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Short Bastard Sword'), +(263389,0,3213,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Veteran Bracers'), +(263389,0,3374,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Calico Belt'), +(263389,0,3375,0.503,0,1,0,1,1,'wowhead: 7 of 1392 kills - Calico Bracers'), +(263389,0,3643,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Spellbinder Bracers'), +(263389,0,3645,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Seers Cuffs'), +(263389,0,3651,0.718,0,1,0,1,1,'wowhead: 10 of 1392 kills - Veteran Shield'), +(263389,0,3652,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Hunting Buckler'), +(263389,0,4292,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Pattern: Green Woolen Bag'), +(263389,0,4345,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Pattern: Red Woolen Boots'), +(263389,0,4346,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Pattern: Heavy Woolen Cloak'), +(263389,0,4348,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Pattern: Phoenix Gloves'), +(263389,0,4409,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Schematic: Small Seaforium Charge'), +(263389,0,4564,1.221,0,1,0,1,1,'wowhead: 17 of 1392 kills - Spiked Club'), +(263389,0,4566,0.79,0,1,0,1,1,'wowhead: 11 of 1392 kills - Sturdy Quarterstaff'), +(263389,0,4567,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Merc Sword'), +(263389,0,4569,0.647,0,1,0,1,1,'wowhead: 9 of 1392 kills - Staunch Hammer'), +(263389,0,4570,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Birchwood Maul'), +(263389,0,4571,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - War Knife'), +(263389,0,4577,0.862,0,1,0,1,1,'wowhead: 12 of 1392 kills - Compact Shotgun'), +(263389,0,4677,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Veteran Cloak'), +(263389,0,4678,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Veteran Girdle'), +(263389,0,4683,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Spellbinder Cloak'), +(263389,0,4684,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Spellbinder Belt'), +(263389,0,4689,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Hunting Cloak'), +(263389,0,4690,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Hunting Belt'), +(263389,0,4701,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Inscribed Cloak'), +(263389,0,5069,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Fire Wand'), +(263389,0,5071,0.647,0,1,0,1,1,'wowhead: 9 of 1392 kills - Shadow Wand'), +(263389,0,5212,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Blazing Wand'), +(263389,0,5574,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - White Leather Bag'), +(263389,0,5578,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Plans: Silvered Bronze Breastplate'), +(263389,0,6266,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Disciples Vest'), +(263389,0,6267,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Disciples Pants'), +(263389,0,6268,0.79,0,1,0,1,1,'wowhead: 11 of 1392 kills - Pioneer Tunic'), +(263389,0,6269,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Pioneer Trousers'), +(263389,0,6336,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Infantry Tunic'), +(263389,0,6337,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Infantry Leggings'), +(263389,0,6344,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Formula: Enchant Bracer - Minor Spirit'), +(263389,0,6347,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Formula: Enchant Bracer - Minor Strength'), +(263389,0,6378,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Seers Cape'), +(263389,0,6380,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Inscribed Buckler'), +(263389,0,6512,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Disciples Robe'), +(263389,0,6528,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Spellbinder Robe'), +(263389,0,6537,0.647,0,1,0,1,1,'wowhead: 9 of 1392 kills - Willow Boots'), +(263389,0,6539,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Willow Belt'), +(263389,0,6541,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Willow Gloves'), +(263389,0,6542,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Willow Cape'), +(263389,0,6543,0.503,0,1,0,1,1,'wowhead: 7 of 1392 kills - Willow Bracers'), +(263389,0,6547,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Soldiers Gauntlets'), +(263389,0,6548,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Soldiers Girdle'), +(263389,0,6549,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Soldiers Cloak'), +(263389,0,6550,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Soldiers Wristguards'), +(263389,0,6551,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Soldiers Boots'), +(263389,0,6555,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Bards Cloak'), +(263389,0,6556,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Bards Bracers'), +(263389,0,6557,0.503,0,1,0,1,1,'wowhead: 7 of 1392 kills - Bards Boots'), +(263389,0,6558,0.503,0,1,0,1,1,'wowhead: 7 of 1392 kills - Bards Belt'), +(263389,0,6559,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Bards Buckler'), +(263389,0,6560,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Soldiers Shield'), +(263389,0,6580,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Defender Tunic'), +(263389,0,6585,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Scouting Cloak'), +(263389,0,6716,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Schematic: EZ-Thro Dynamite'), +(263389,0,9743,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Simple Shoes'), +(263389,0,9744,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Simple Bands'), +(263389,0,9746,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Simple Gloves'), +(263389,0,9747,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Simple Britches'), +(263389,0,9748,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Simple Robe'), +(263389,0,9749,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Simple Blouse'), +(263389,0,9750,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Nomad Sash'), +(263389,0,9751,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Nomad Sandals'), +(263389,0,9753,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Nomad Buckler'), +(263389,0,9756,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Nomad Trousers'), +(263389,0,9757,0.216,0,1,0,1,1,'wowhead: 3 of 1392 kills - Nomad Tunic'), +(263389,0,9758,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Cadet Belt'), +(263389,0,9760,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Cadet Bracers'), +(263389,0,9762,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Cadet Gauntlets'), +(263389,0,9763,0.862,0,1,0,1,1,'wowhead: 12 of 1392 kills - Cadet Leggings'), +(263389,0,9764,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Cadet Shield'), +(263389,0,9765,0.144,0,1,0,1,1,'wowhead: 2 of 1392 kills - Cadet Vest'), +(263389,0,9785,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Raiders Bracers'), +(263389,0,9786,0.359,0,1,0,1,1,'wowhead: 5 of 1392 kills - Raiders Cloak'), +(263389,0,15210,0.647,0,1,0,1,1,'wowhead: 9 of 1392 kills - Raider Shortsword'), +(263389,0,15268,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Twin-bladed Axe'), +(263389,0,15926,0.072,0,1,0,1,1,'wowhead: 1 of 1392 kills - Spellbinder Orb'), +(263389,0,15933,1.006,0,1,0,1,1,'wowhead: 14 of 1392 kills - Simple Branch'), +(263389,0,211785,0.575,0,1,0,1,1,'wowhead: 8 of 1392 kills - Scroll: CWAL'), +(263389,0,211786,0.431,0,1,0,1,1,'wowhead: 6 of 1392 kills - Scroll: CHAP BALK WELLES'), +(263389,0,211787,0.287,0,1,0,1,1,'wowhead: 4 of 1392 kills - Scroll: LOWER PING WHOMEVER'), +(263389,0,275894,1.006,0,1,0,1,1,'wowhead: 14 of 1392 kills - Ghastly Cloth'), +(263389,0,275895,6.681,0,1,0,1,1,'wowhead: 93 of 1392 kills - Fading Echo'), +(263389,0,9759,0.072,0,1,0,1,1,'sniff: 1 of 6 kills there, not on wowhead (rate taken over the 1392 wowhead kills)'), +(263390,0,818,3.555,0,1,0,1,1,'wowhead: 45 of 1266 kills - Tigerseye'), +(263390,0,1210,1.185,0,1,0,1,1,'wowhead: 15 of 1266 kills - Shadowgem'), +(263390,0,1495,0.869,0,1,0,1,1,'wowhead: 11 of 1266 kills - Calico Shoes'), +(263390,0,1497,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Calico Cloak'), +(263390,0,1499,1.106,0,1,0,1,1,'wowhead: 14 of 1266 kills - Calico Pants'), +(263390,0,1501,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Calico Tunic'), +(263390,0,1502,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Warped Leather Belt'), +(263390,0,1503,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Warped Leather Boots'), +(263390,0,1504,0.869,0,1,0,1,1,'wowhead: 11 of 1266 kills - Warped Leather Bracers'), +(263390,0,1505,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Warped Cloak'), +(263390,0,1506,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Warped Leather Gloves'), +(263390,0,1507,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Warped Leather Pants'), +(263390,0,1509,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Warped Leather Vest'), +(263390,0,1510,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Heavy Hammer'), +(263390,0,1511,0.79,0,1,0,1,1,'wowhead: 10 of 1266 kills - Commoners Sword'), +(263390,0,1512,1.185,0,1,0,1,1,'wowhead: 15 of 1266 kills - Crude Battle Axe'), +(263390,0,1513,0.948,0,1,0,1,1,'wowhead: 12 of 1266 kills - Old Greatsword'), +(263390,0,1514,1.738,0,1,0,1,1,'wowhead: 22 of 1266 kills - Rusty Warhammer'), +(263390,0,1515,1.106,0,1,0,1,1,'wowhead: 14 of 1266 kills - Rough Wooden Staff'), +(263390,0,1516,1.422,0,1,0,1,1,'wowhead: 18 of 1266 kills - Worn Hatchet'), +(263390,0,1730,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Worn Mail Belt'), +(263390,0,1731,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Worn Mail Boots'), +(263390,0,1732,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Worn Mail Bracers'), +(263390,0,1733,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Worn Cloak'), +(263390,0,1734,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Worn Mail Gloves'), +(263390,0,1735,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Worn Mail Pants'), +(263390,0,1737,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Worn Mail Vest'), +(263390,0,2073,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Dwarven Hatchet'), +(263390,0,2075,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Priests Mace'), +(263390,0,2079,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Sergeants Warhammer'), +(263390,0,2214,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Wooden Buckler'), +(263390,0,2215,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Wooden Shield'), +(263390,0,2409,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Pattern: Dark Leather Tunic'), +(263390,0,2589,28.673,0,1,0,1,5,'wowhead: 363 of 1266 kills - Linen Cloth'), +(263390,0,2632,1.343,0,1,0,1,1,'wowhead: 17 of 1266 kills - Curved Dagger'), +(263390,0,2763,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Fisherman Knife'), +(263390,0,2764,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Small Dagger'), +(263390,0,2777,0.948,0,1,0,1,1,'wowhead: 12 of 1266 kills - Feeble Shortbow'), +(263390,0,2778,0.869,0,1,0,1,1,'wowhead: 11 of 1266 kills - Cheap Blunderbuss'), +(263390,0,2881,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Plans: Runed Copper Breastplate'), +(263390,0,2969,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Spellbinder Vest'), +(263390,0,2970,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Spellbinder Pants'), +(263390,0,2971,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Spellbinder Boots'), +(263390,0,2972,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Spellbinder Gloves'), +(263390,0,2974,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Hunting Pants'), +(263390,0,2975,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Hunting Boots'), +(263390,0,2976,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Hunting Gloves'), +(263390,0,2977,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Veteran Armor'), +(263390,0,2978,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Veteran Leggings'), +(263390,0,2979,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Veteran Boots'), +(263390,0,2980,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Veteran Gloves'), +(263390,0,3036,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Heavy Shortbow'), +(263390,0,3192,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Short Bastard Sword'), +(263390,0,3205,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Inscribed Leather Bracers'), +(263390,0,3213,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Veteran Bracers'), +(263390,0,3374,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Calico Belt'), +(263390,0,3375,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Calico Bracers'), +(263390,0,3610,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Plans: Gemmed Copper Gauntlets'), +(263390,0,3643,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Spellbinder Bracers'), +(263390,0,3651,0.632,0,1,0,1,1,'wowhead: 8 of 1266 kills - Veteran Shield'), +(263390,0,3652,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Hunting Buckler'), +(263390,0,4293,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Pattern: Hillmans Leather Vest'), +(263390,0,4294,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Pattern: Hillmans Belt'), +(263390,0,4346,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Pattern: Heavy Woolen Cloak'), +(263390,0,4348,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Pattern: Phoenix Gloves'), +(263390,0,4409,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Schematic: Small Seaforium Charge'), +(263390,0,4564,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Spiked Club'), +(263390,0,4566,1.027,0,1,0,1,1,'wowhead: 13 of 1266 kills - Sturdy Quarterstaff'), +(263390,0,4567,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Merc Sword'), +(263390,0,4569,1.027,0,1,0,1,1,'wowhead: 13 of 1266 kills - Staunch Hammer'), +(263390,0,4571,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - War Knife'), +(263390,0,4577,0.79,0,1,0,1,1,'wowhead: 10 of 1266 kills - Compact Shotgun'), +(263390,0,4678,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Veteran Girdle'), +(263390,0,4683,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Spellbinder Cloak'), +(263390,0,4684,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Spellbinder Belt'), +(263390,0,4690,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Hunting Belt'), +(263390,0,4701,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Inscribed Cloak'), +(263390,0,5069,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Fire Wand'), +(263390,0,5071,1.027,0,1,0,1,1,'wowhead: 13 of 1266 kills - Shadow Wand'), +(263390,0,5212,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Blazing Wand'), +(263390,0,5573,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Green Leather Bag'), +(263390,0,6266,0.948,0,1,0,1,1,'wowhead: 12 of 1266 kills - Disciples Vest'), +(263390,0,6267,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Disciples Pants'), +(263390,0,6268,0.711,0,1,0,1,1,'wowhead: 9 of 1266 kills - Pioneer Tunic'), +(263390,0,6269,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Pioneer Trousers'), +(263390,0,6336,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Infantry Tunic'), +(263390,0,6337,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Infantry Leggings'), +(263390,0,6344,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Formula: Enchant Bracer - Minor Spirit'), +(263390,0,6347,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Formula: Enchant Bracer - Minor Strength'), +(263390,0,6348,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Formula: Enchant Weapon - Minor Beastslayer'), +(263390,0,6380,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Inscribed Buckler'), +(263390,0,6512,0.79,0,1,0,1,1,'wowhead: 10 of 1266 kills - Disciples Robe'), +(263390,0,6537,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Willow Boots'), +(263390,0,6539,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Willow Belt'), +(263390,0,6541,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Willow Gloves'), +(263390,0,6542,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Willow Cape'), +(263390,0,6543,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Willow Bracers'), +(263390,0,6547,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Soldiers Gauntlets'), +(263390,0,6548,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Soldiers Girdle'), +(263390,0,6549,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Soldiers Cloak'), +(263390,0,6550,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Soldiers Wristguards'), +(263390,0,6551,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Soldiers Boots'), +(263390,0,6555,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Bards Cloak'), +(263390,0,6556,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Bards Bracers'), +(263390,0,6557,0.395,0,1,0,1,1,'wowhead: 5 of 1266 kills - Bards Boots'), +(263390,0,6558,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Bards Belt'), +(263390,0,6560,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Soldiers Shield'), +(263390,0,7108,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Infantry Shield'), +(263390,0,7288,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Pattern: Rugged Leather Pants'), +(263390,0,9743,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Simple Shoes'), +(263390,0,9747,0.869,0,1,0,1,1,'wowhead: 11 of 1266 kills - Simple Britches'), +(263390,0,9748,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Simple Robe'), +(263390,0,9749,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Simple Blouse'), +(263390,0,9750,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Nomad Sash'), +(263390,0,9751,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Nomad Sandals'), +(263390,0,9752,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Nomad Bands'), +(263390,0,9753,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Nomad Buckler'), +(263390,0,9755,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Nomad Gloves'), +(263390,0,9756,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Nomad Trousers'), +(263390,0,9757,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Nomad Tunic'), +(263390,0,9758,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Cadet Belt'), +(263390,0,9759,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Cadet Boots'), +(263390,0,9762,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Cadet Gauntlets'), +(263390,0,9763,0.553,0,1,0,1,1,'wowhead: 7 of 1266 kills - Cadet Leggings'), +(263390,0,9764,0.632,0,1,0,1,1,'wowhead: 8 of 1266 kills - Cadet Shield'), +(263390,0,9765,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Cadet Vest'), +(263390,0,9785,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Raiders Bracers'), +(263390,0,9786,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Raiders Cloak'), +(263390,0,11039,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Formula: Enchant Cloak - Minor Agility'), +(263390,0,15210,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Raider Shortsword'), +(263390,0,15268,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Twin-bladed Axe'), +(263390,0,15926,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Spellbinder Orb'), +(263390,0,15932,0.079,0,1,0,1,1,'wowhead: 1 of 1266 kills - Disciples Stein'), +(263390,0,15933,0.869,0,1,0,1,1,'wowhead: 11 of 1266 kills - Simple Branch'), +(263390,0,211780,0.158,0,1,0,1,1,'wowhead: 2 of 1266 kills - Scroll: KWYJIBO'), +(263390,0,211785,0.316,0,1,0,1,1,'wowhead: 4 of 1266 kills - Scroll: CWAL'), +(263390,0,211786,0.474,0,1,0,1,1,'wowhead: 6 of 1266 kills - Scroll: CHAP BALK WELLES'), +(263390,0,211787,0.237,0,1,0,1,1,'wowhead: 3 of 1266 kills - Scroll: LOWER PING WHOMEVER'), +(263390,0,275894,1.027,0,1,0,1,1,'wowhead: 13 of 1266 kills - Ghastly Cloth'), +(263390,0,275895,7.346,0,1,0,1,1,'wowhead: 93 of 1266 kills - Fading Echo'), +(263396,0,818,3.55,0,1,0,1,1,'wowhead: 81 of 2282 kills - Tigerseye'), +(263396,0,858,0.613,0,1,0,1,1,'wowhead: 14 of 2282 kills - Lesser Healing Potion'), +(263396,0,1206,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Moss Agate'), +(263396,0,1210,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Shadowgem'), +(263396,0,1495,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Calico Shoes'), +(263396,0,1497,0.964,0,1,0,1,1,'wowhead: 22 of 2282 kills - Calico Cloak'), +(263396,0,1499,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Calico Pants'), +(263396,0,1501,0.701,0,1,0,1,1,'wowhead: 16 of 2282 kills - Calico Tunic'), +(263396,0,1502,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Warped Leather Belt'), +(263396,0,1503,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Warped Leather Boots'), +(263396,0,1504,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Warped Leather Bracers'), +(263396,0,1505,0.701,0,1,0,1,1,'wowhead: 16 of 2282 kills - Warped Cloak'), +(263396,0,1506,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Warped Leather Gloves'), +(263396,0,1507,0.394,0,1,0,1,1,'wowhead: 9 of 2282 kills - Warped Leather Pants'), +(263396,0,1509,0.394,0,1,0,1,1,'wowhead: 9 of 2282 kills - Warped Leather Vest'), +(263396,0,1510,0.92,0,1,0,1,1,'wowhead: 21 of 2282 kills - Heavy Hammer'), +(263396,0,1511,1.008,0,1,0,1,1,'wowhead: 23 of 2282 kills - Commoners Sword'), +(263396,0,1513,0.876,0,1,0,1,1,'wowhead: 20 of 2282 kills - Old Greatsword'), +(263396,0,1514,0.745,0,1,0,1,1,'wowhead: 17 of 2282 kills - Rusty Warhammer'), +(263396,0,1515,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Rough Wooden Staff'), +(263396,0,1516,0.833,0,1,0,1,1,'wowhead: 19 of 2282 kills - Worn Hatchet'), +(263396,0,1730,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Worn Mail Belt'), +(263396,0,1731,0.351,0,1,0,1,1,'wowhead: 8 of 2282 kills - Worn Mail Boots'), +(263396,0,1732,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Worn Mail Bracers'), +(263396,0,1733,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Worn Cloak'), +(263396,0,1734,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Worn Mail Gloves'), +(263396,0,1735,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Worn Mail Pants'), +(263396,0,1737,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Worn Mail Vest'), +(263396,0,2073,0.701,0,1,0,1,1,'wowhead: 16 of 2282 kills - Dwarven Hatchet'), +(263396,0,2078,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Northern Shortsword'), +(263396,0,2079,0.307,0,1,0,1,1,'wowhead: 7 of 2282 kills - Sergeants Warhammer'), +(263396,0,2214,0.613,0,1,0,1,1,'wowhead: 14 of 2282 kills - Wooden Buckler'), +(263396,0,2215,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Wooden Shield'), +(263396,0,2406,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Pattern: Fine Leather Boots'), +(263396,0,2409,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Dark Leather Tunic'), +(263396,0,2455,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Minor Mana Potion'), +(263396,0,2553,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Recipe: Elixir of Minor Agility'), +(263396,0,2555,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Recipe: Swiftness Potion'), +(263396,0,2589,25.679,0,1,0,1,5,'wowhead: 586 of 2282 kills - Linen Cloth'), +(263396,0,2632,1.139,0,1,0,1,1,'wowhead: 26 of 2282 kills - Curved Dagger'), +(263396,0,2657,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Red Leather Bag'), +(263396,0,2763,0.745,0,1,0,1,1,'wowhead: 17 of 2282 kills - Fisherman Knife'), +(263396,0,2777,1.227,0,1,0,1,1,'wowhead: 28 of 2282 kills - Feeble Shortbow'), +(263396,0,2778,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Cheap Blunderbuss'), +(263396,0,2781,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Dirty Blunderbuss'), +(263396,0,2881,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Plans: Runed Copper Breastplate'), +(263396,0,2883,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Plans: Deadly Bronze Poniard'), +(263396,0,2969,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Spellbinder Vest'), +(263396,0,2970,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Spellbinder Pants'), +(263396,0,2971,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Spellbinder Boots'), +(263396,0,2972,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Spellbinder Gloves'), +(263396,0,2973,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Hunting Tunic'), +(263396,0,2974,0.394,0,1,0,1,1,'wowhead: 9 of 2282 kills - Hunting Pants'), +(263396,0,2975,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Hunting Boots'), +(263396,0,2976,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Hunting Gloves'), +(263396,0,2977,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Veteran Armor'), +(263396,0,2978,0.613,0,1,0,1,1,'wowhead: 14 of 2282 kills - Veteran Leggings'), +(263396,0,2979,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Veteran Boots'), +(263396,0,2980,0.701,0,1,0,1,1,'wowhead: 16 of 2282 kills - Veteran Gloves'), +(263396,0,2983,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Seers Boots'), +(263396,0,2984,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Seers Gloves'), +(263396,0,2987,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Inscribed Leather Boots'), +(263396,0,3036,0.92,0,1,0,1,1,'wowhead: 21 of 2282 kills - Heavy Shortbow'), +(263396,0,3195,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Barbaric Battle Axe'), +(263396,0,3196,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Edged Bastard Sword'), +(263396,0,3205,0.307,0,1,0,1,1,'wowhead: 7 of 2282 kills - Inscribed Leather Bracers'), +(263396,0,3213,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Veteran Bracers'), +(263396,0,3374,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Calico Belt'), +(263396,0,3375,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Calico Bracers'), +(263396,0,3643,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Spellbinder Bracers'), +(263396,0,3645,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Seers Cuffs'), +(263396,0,3651,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Veteran Shield'), +(263396,0,3652,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Hunting Buckler'), +(263396,0,4292,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Green Woolen Bag'), +(263396,0,4293,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Hillmans Leather Vest'), +(263396,0,4346,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Pattern: Heavy Woolen Cloak'), +(263396,0,4408,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Schematic: Mechanical Squirrel'), +(263396,0,4409,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Schematic: Small Seaforium Charge'), +(263396,0,4541,1.665,0,1,0,1,1,'wowhead: 38 of 2282 kills - Freshly Baked Bread'), +(263396,0,4564,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Spiked Club'), +(263396,0,4566,0.438,0,1,0,1,1,'wowhead: 10 of 2282 kills - Sturdy Quarterstaff'), +(263396,0,4567,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Merc Sword'), +(263396,0,4569,1.139,0,1,0,1,1,'wowhead: 26 of 2282 kills - Staunch Hammer'), +(263396,0,4570,1.358,0,1,0,1,1,'wowhead: 31 of 2282 kills - Birchwood Maul'), +(263396,0,4571,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - War Knife'), +(263396,0,4577,0.351,0,1,0,1,1,'wowhead: 8 of 2282 kills - Compact Shotgun'), +(263396,0,4678,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Veteran Girdle'), +(263396,0,4683,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Spellbinder Cloak'), +(263396,0,4684,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Spellbinder Belt'), +(263396,0,4689,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Hunting Cloak'), +(263396,0,4690,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Hunting Belt'), +(263396,0,4695,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Burnished Cloak'), +(263396,0,4699,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Seers Belt'), +(263396,0,4701,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Inscribed Cloak'), +(263396,0,5071,1.446,0,1,0,1,1,'wowhead: 33 of 2282 kills - Shadow Wand'), +(263396,0,5212,0.307,0,1,0,1,1,'wowhead: 7 of 2282 kills - Blazing Wand'), +(263396,0,5573,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Green Leather Bag'), +(263396,0,6266,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Disciples Vest'), +(263396,0,6268,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Pioneer Tunic'), +(263396,0,6336,0.307,0,1,0,1,1,'wowhead: 7 of 2282 kills - Infantry Tunic'), +(263396,0,6347,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Formula: Enchant Bracer - Minor Strength'), +(263396,0,6348,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Formula: Enchant Weapon - Minor Beastslayer'), +(263396,0,6378,0.351,0,1,0,1,1,'wowhead: 8 of 2282 kills - Seers Cape'), +(263396,0,6379,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Inscribed Leather Belt'), +(263396,0,6380,0.394,0,1,0,1,1,'wowhead: 9 of 2282 kills - Inscribed Buckler'), +(263396,0,6390,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Stylish Blue Shirt'), +(263396,0,6512,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Disciples Robe'), +(263396,0,6528,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Spellbinder Robe'), +(263396,0,6537,0.92,0,1,0,1,1,'wowhead: 21 of 2282 kills - Willow Boots'), +(263396,0,6539,0.613,0,1,0,1,1,'wowhead: 14 of 2282 kills - Willow Belt'), +(263396,0,6540,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Willow Pants'), +(263396,0,6541,0.351,0,1,0,1,1,'wowhead: 8 of 2282 kills - Willow Gloves'), +(263396,0,6542,0.394,0,1,0,1,1,'wowhead: 9 of 2282 kills - Willow Cape'), +(263396,0,6543,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Willow Bracers'), +(263396,0,6545,0.131,0,1,0,1,1,'wowhead: 3 of 2282 kills - Soldiers Armor'), +(263396,0,6546,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Soldiers Leggings'), +(263396,0,6548,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Soldiers Girdle'), +(263396,0,6549,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Soldiers Cloak'), +(263396,0,6550,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Soldiers Wristguards'), +(263396,0,6551,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Soldiers Boots'), +(263396,0,6553,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Bards Trousers'), +(263396,0,6554,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Bards Gloves'), +(263396,0,6555,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Bards Cloak'), +(263396,0,6556,0.351,0,1,0,1,1,'wowhead: 8 of 2282 kills - Bards Bracers'), +(263396,0,6557,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Bards Boots'), +(263396,0,6558,0.613,0,1,0,1,1,'wowhead: 14 of 2282 kills - Bards Belt'), +(263396,0,6559,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Bards Buckler'), +(263396,0,6560,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Soldiers Shield'), +(263396,0,6716,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Schematic: EZ-Thro Dynamite'), +(263396,0,7288,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Rugged Leather Pants'), +(263396,0,9746,0.088,0,1,0,1,1,'wowhead: 2 of 2282 kills - Simple Gloves'), +(263396,0,9747,1.096,0,1,0,1,1,'wowhead: 25 of 2282 kills - Simple Britches'), +(263396,0,9748,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Simple Robe'), +(263396,0,9749,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Simple Blouse'), +(263396,0,9755,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Nomad Gloves'), +(263396,0,9756,0.789,0,1,0,1,1,'wowhead: 18 of 2282 kills - Nomad Trousers'), +(263396,0,9757,0.657,0,1,0,1,1,'wowhead: 15 of 2282 kills - Nomad Tunic'), +(263396,0,9759,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Cadet Boots'), +(263396,0,9762,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Cadet Gauntlets'), +(263396,0,9763,0.701,0,1,0,1,1,'wowhead: 16 of 2282 kills - Cadet Leggings'), +(263396,0,9764,0.526,0,1,0,1,1,'wowhead: 12 of 2282 kills - Cadet Shield'), +(263396,0,9765,0.438,0,1,0,1,1,'wowhead: 10 of 2282 kills - Cadet Vest'), +(263396,0,9779,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Bandit Cloak'), +(263396,0,9785,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Raiders Bracers'), +(263396,0,9786,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Raiders Cloak'), +(263396,0,9788,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Raiders Belt'), +(263396,0,9789,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Raiders Legguards'), +(263396,0,10316,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Pattern: Colorful Kilt'), +(263396,0,11081,0.044,0,1,0,1,1,'wowhead: 1 of 2282 kills - Formula: Enchant Shield - Lesser Protection'), +(263396,0,15210,0.438,0,1,0,1,1,'wowhead: 10 of 2282 kills - Raider Shortsword'), +(263396,0,15268,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Twin-bladed Axe'), +(263396,0,15926,0.175,0,1,0,1,1,'wowhead: 4 of 2282 kills - Spellbinder Orb'), +(263396,0,15933,0.438,0,1,0,1,1,'wowhead: 10 of 2282 kills - Simple Branch'), +(263396,0,211780,0.438,0,1,0,1,1,'wowhead: 10 of 2282 kills - Scroll: KWYJIBO'), +(263396,0,211785,0.482,0,1,0,1,1,'wowhead: 11 of 2282 kills - Scroll: CWAL'), +(263396,0,211786,0.263,0,1,0,1,1,'wowhead: 6 of 2282 kills - Scroll: CHAP BALK WELLES'), +(263396,0,211787,0.219,0,1,0,1,1,'wowhead: 5 of 2282 kills - Scroll: LOWER PING WHOMEVER'), +(263396,0,275891,2.103,0,1,0,1,1,'wowhead: 48 of 2282 kills - Dwarven Skull'), +(263396,0,275892,0.57,0,1,0,1,1,'wowhead: 13 of 2282 kills - Short Stout'), +(263396,0,275893,6.573,0,1,0,1,1,'wowhead: 150 of 2282 kills - Searing Gourd'), +(263397,0,818,4.167,0,1,0,1,1,'wowhead: 26 of 624 kills - Tigerseye'), +(263397,0,858,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Lesser Healing Potion'), +(263397,0,1210,1.122,0,1,0,1,1,'wowhead: 7 of 624 kills - Shadowgem'), +(263397,0,1495,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Calico Shoes'), +(263397,0,1497,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Calico Cloak'), +(263397,0,1499,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Calico Pants'), +(263397,0,1501,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Calico Tunic'), +(263397,0,1502,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Warped Leather Belt'), +(263397,0,1503,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Warped Leather Boots'), +(263397,0,1504,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Warped Leather Bracers'), +(263397,0,1505,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Warped Cloak'), +(263397,0,1506,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Warped Leather Gloves'), +(263397,0,1507,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Warped Leather Pants'), +(263397,0,1509,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Warped Leather Vest'), +(263397,0,1510,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Heavy Hammer'), +(263397,0,1511,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Commoners Sword'), +(263397,0,1513,1.763,0,1,0,1,1,'wowhead: 11 of 624 kills - Old Greatsword'), +(263397,0,1514,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Rusty Warhammer'), +(263397,0,1515,1.603,0,1,0,1,1,'wowhead: 10 of 624 kills - Rough Wooden Staff'), +(263397,0,1516,1.122,0,1,0,1,1,'wowhead: 7 of 624 kills - Worn Hatchet'), +(263397,0,1730,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Worn Mail Belt'), +(263397,0,1731,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Worn Mail Boots'), +(263397,0,1732,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Worn Mail Bracers'), +(263397,0,1733,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Worn Cloak'), +(263397,0,1734,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Worn Mail Gloves'), +(263397,0,1735,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Worn Mail Pants'), +(263397,0,1737,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Worn Mail Vest'), +(263397,0,2073,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Dwarven Hatchet'), +(263397,0,2214,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Wooden Buckler'), +(263397,0,2215,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Wooden Shield'), +(263397,0,2407,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: White Leather Jerkin'), +(263397,0,2408,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Fine Leather Gloves'), +(263397,0,2455,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Minor Mana Potion'), +(263397,0,2589,28.846,0,1,0,1,5,'wowhead: 180 of 624 kills - Linen Cloth'), +(263397,0,2601,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Gray Woolen Robe'), +(263397,0,2632,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Curved Dagger'), +(263397,0,2657,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Red Leather Bag'), +(263397,0,2763,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Fisherman Knife'), +(263397,0,2777,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Feeble Shortbow'), +(263397,0,2778,1.282,0,1,0,1,1,'wowhead: 8 of 624 kills - Cheap Blunderbuss'), +(263397,0,2881,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Plans: Runed Copper Breastplate'), +(263397,0,2969,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Spellbinder Vest'), +(263397,0,2970,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Spellbinder Pants'), +(263397,0,2971,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Spellbinder Boots'), +(263397,0,2973,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Hunting Tunic'), +(263397,0,2974,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Hunting Pants'), +(263397,0,2975,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Hunting Boots'), +(263397,0,2976,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Hunting Gloves'), +(263397,0,2978,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Veteran Leggings'), +(263397,0,2979,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Veteran Boots'), +(263397,0,2980,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Veteran Gloves'), +(263397,0,2983,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Seers Boots'), +(263397,0,2987,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Inscribed Leather Boots'), +(263397,0,3036,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Heavy Shortbow'), +(263397,0,3195,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Barbaric Battle Axe'), +(263397,0,3196,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Edged Bastard Sword'), +(263397,0,3205,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Inscribed Leather Bracers'), +(263397,0,3374,1.122,0,1,0,1,1,'wowhead: 7 of 624 kills - Calico Belt'), +(263397,0,3375,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Calico Bracers'), +(263397,0,3643,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Spellbinder Bracers'), +(263397,0,3645,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Seers Cuffs'), +(263397,0,3651,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Veteran Shield'), +(263397,0,4292,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Green Woolen Bag'), +(263397,0,4348,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Phoenix Gloves'), +(263397,0,4409,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Schematic: Small Seaforium Charge'), +(263397,0,4541,1.923,0,1,0,1,1,'wowhead: 12 of 624 kills - Freshly Baked Bread'), +(263397,0,4564,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Spiked Club'), +(263397,0,4566,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Sturdy Quarterstaff'), +(263397,0,4567,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Merc Sword'), +(263397,0,4569,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Staunch Hammer'), +(263397,0,4570,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Birchwood Maul'), +(263397,0,4571,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - War Knife'), +(263397,0,4577,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Compact Shotgun'), +(263397,0,4689,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Hunting Cloak'), +(263397,0,4699,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Seers Belt'), +(263397,0,4701,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Inscribed Cloak'), +(263397,0,5071,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Shadow Wand'), +(263397,0,5212,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Blazing Wand'), +(263397,0,6266,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Disciples Vest'), +(263397,0,6271,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Red Linen Vest'), +(263397,0,6344,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Formula: Enchant Bracer - Minor Spirit'), +(263397,0,6347,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Formula: Enchant Bracer - Minor Strength'), +(263397,0,6378,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Seers Cape'), +(263397,0,6379,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Inscribed Leather Belt'), +(263397,0,6512,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Disciples Robe'), +(263397,0,6528,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Spellbinder Robe'), +(263397,0,6537,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Willow Boots'), +(263397,0,6541,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Willow Gloves'), +(263397,0,6542,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Willow Cape'), +(263397,0,6543,0.801,0,1,0,1,1,'wowhead: 5 of 624 kills - Willow Bracers'), +(263397,0,6545,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Soldiers Armor'), +(263397,0,6546,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Soldiers Leggings'), +(263397,0,6548,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Soldiers Girdle'), +(263397,0,6549,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Soldiers Cloak'), +(263397,0,6550,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Soldiers Wristguards'), +(263397,0,6551,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Soldiers Boots'), +(263397,0,6553,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Bards Trousers'), +(263397,0,6554,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Bards Gloves'), +(263397,0,6556,1.122,0,1,0,1,1,'wowhead: 7 of 624 kills - Bards Bracers'), +(263397,0,6557,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Bards Boots'), +(263397,0,6558,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Bards Belt'), +(263397,0,6559,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Bards Buckler'), +(263397,0,9747,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Simple Britches'), +(263397,0,9748,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Simple Robe'), +(263397,0,9749,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Simple Blouse'), +(263397,0,9756,0.641,0,1,0,1,1,'wowhead: 4 of 624 kills - Nomad Trousers'), +(263397,0,9757,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Nomad Tunic'), +(263397,0,9759,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Cadet Boots'), +(263397,0,9763,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Cadet Leggings'), +(263397,0,9764,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Cadet Shield'), +(263397,0,9765,1.442,0,1,0,1,1,'wowhead: 9 of 624 kills - Cadet Vest'), +(263397,0,10316,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Pattern: Colorful Kilt'), +(263397,0,15210,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Raider Shortsword'), +(263397,0,15268,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Twin-bladed Axe'), +(263397,0,15933,0.481,0,1,0,1,1,'wowhead: 3 of 624 kills - Simple Branch'), +(263397,0,211780,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Scroll: KWYJIBO'), +(263397,0,211785,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Scroll: CWAL'), +(263397,0,211786,0.16,0,1,0,1,1,'wowhead: 1 of 624 kills - Scroll: CHAP BALK WELLES'), +(263397,0,211787,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Scroll: LOWER PING WHOMEVER'), +(263397,0,275891,0.962,0,1,0,1,1,'wowhead: 6 of 624 kills - Dwarven Skull'), +(263397,0,275892,0.321,0,1,0,1,1,'wowhead: 2 of 624 kills - Short Stout'), +(263397,0,275893,5.288,0,1,0,1,1,'wowhead: 33 of 624 kills - Searing Gourd'), +(263438,0,818,3.628,0,1,0,1,1,'wowhead: 23 of 634 kills - Tigerseye'), +(263438,0,858,0.946,0,1,0,1,1,'wowhead: 6 of 634 kills - Lesser Healing Potion'), +(263438,0,1179,1.42,0,1,0,1,1,'wowhead: 9 of 634 kills - Ice Cold Milk'), +(263438,0,1210,2.05,0,1,0,1,1,'wowhead: 13 of 634 kills - Shadowgem'), +(263438,0,1495,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Calico Shoes'), +(263438,0,1497,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Calico Cloak'), +(263438,0,1498,1.577,0,1,0,1,1,'wowhead: 10 of 634 kills - Calico Gloves'), +(263438,0,1499,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Calico Pants'), +(263438,0,1501,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Calico Tunic'), +(263438,0,1502,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Warped Leather Belt'), +(263438,0,1503,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Warped Leather Boots'), +(263438,0,1504,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Warped Leather Bracers'), +(263438,0,1505,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Warped Cloak'), +(263438,0,1506,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Warped Leather Gloves'), +(263438,0,1507,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Warped Leather Pants'), +(263438,0,1509,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Warped Leather Vest'), +(263438,0,1510,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Heavy Hammer'), +(263438,0,1511,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Commoners Sword'), +(263438,0,1513,0.789,0,1,0,1,1,'wowhead: 5 of 634 kills - Old Greatsword'), +(263438,0,1514,1.262,0,1,0,1,1,'wowhead: 8 of 634 kills - Rusty Warhammer'), +(263438,0,1515,1.893,0,1,0,1,1,'wowhead: 12 of 634 kills - Rough Wooden Staff'), +(263438,0,1516,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Worn Hatchet'), +(263438,0,1730,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Worn Mail Belt'), +(263438,0,1731,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Worn Mail Boots'), +(263438,0,1732,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Worn Mail Bracers'), +(263438,0,1733,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Worn Cloak'), +(263438,0,1734,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Worn Mail Gloves'), +(263438,0,1735,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Worn Mail Pants'), +(263438,0,1737,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Worn Mail Vest'), +(263438,0,2073,0.789,0,1,0,1,1,'wowhead: 5 of 634 kills - Dwarven Hatchet'), +(263438,0,2078,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Northern Shortsword'), +(263438,0,2079,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Sergeants Warhammer'), +(263438,0,2214,0.789,0,1,0,1,1,'wowhead: 5 of 634 kills - Wooden Buckler'), +(263438,0,2215,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Wooden Shield'), +(263438,0,2409,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Pattern: Dark Leather Tunic'), +(263438,0,2455,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Minor Mana Potion'), +(263438,0,2553,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Recipe: Elixir of Minor Agility'), +(263438,0,2589,26.972,0,1,0,1,5,'wowhead: 171 of 634 kills - Linen Cloth'), +(263438,0,2632,1.262,0,1,0,1,1,'wowhead: 8 of 634 kills - Curved Dagger'), +(263438,0,2763,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Fisherman Knife'), +(263438,0,2777,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Feeble Shortbow'), +(263438,0,2778,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Cheap Blunderbuss'), +(263438,0,2881,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Plans: Runed Copper Breastplate'), +(263438,0,2969,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Spellbinder Vest'), +(263438,0,2970,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Spellbinder Pants'), +(263438,0,2971,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Spellbinder Boots'), +(263438,0,2972,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Spellbinder Gloves'), +(263438,0,2973,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Hunting Tunic'), +(263438,0,2974,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Hunting Pants'), +(263438,0,2975,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Hunting Boots'), +(263438,0,2976,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Hunting Gloves'), +(263438,0,2977,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Veteran Armor'), +(263438,0,2978,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Veteran Leggings'), +(263438,0,2979,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Veteran Boots'), +(263438,0,2980,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Veteran Gloves'), +(263438,0,2983,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Seers Boots'), +(263438,0,2984,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Seers Gloves'), +(263438,0,3036,0.789,0,1,0,1,1,'wowhead: 5 of 634 kills - Heavy Shortbow'), +(263438,0,3205,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Inscribed Leather Bracers'), +(263438,0,3213,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Veteran Bracers'), +(263438,0,3374,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Calico Belt'), +(263438,0,3375,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Calico Bracers'), +(263438,0,3643,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Spellbinder Bracers'), +(263438,0,3645,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Seers Cuffs'), +(263438,0,3651,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Veteran Shield'), +(263438,0,3652,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Hunting Buckler'), +(263438,0,4346,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Pattern: Heavy Woolen Cloak'), +(263438,0,4408,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Schematic: Mechanical Squirrel'), +(263438,0,4541,3.155,0,1,0,1,1,'wowhead: 20 of 634 kills - Freshly Baked Bread'), +(263438,0,4564,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Spiked Club'), +(263438,0,4566,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Sturdy Quarterstaff'), +(263438,0,4567,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Merc Sword'), +(263438,0,4569,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Staunch Hammer'), +(263438,0,4570,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Birchwood Maul'), +(263438,0,4577,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Compact Shotgun'), +(263438,0,4678,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Veteran Girdle'), +(263438,0,4684,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Spellbinder Belt'), +(263438,0,4690,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Hunting Belt'), +(263438,0,4699,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Seers Belt'), +(263438,0,4701,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Inscribed Cloak'), +(263438,0,5071,0.946,0,1,0,1,1,'wowhead: 6 of 634 kills - Shadow Wand'), +(263438,0,5212,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Blazing Wand'), +(263438,0,6266,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Disciples Vest'), +(263438,0,6336,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Infantry Tunic'), +(263438,0,6348,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Formula: Enchant Weapon - Minor Beastslayer'), +(263438,0,6375,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Formula: Enchant Bracer - Lesser Spirit'), +(263438,0,6378,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Seers Cape'), +(263438,0,6512,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Disciples Robe'), +(263438,0,6537,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Willow Boots'), +(263438,0,6539,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Willow Belt'), +(263438,0,6541,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Willow Gloves'), +(263438,0,6542,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Willow Cape'), +(263438,0,6543,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Willow Bracers'), +(263438,0,6545,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Soldiers Armor'), +(263438,0,6546,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Soldiers Leggings'), +(263438,0,6547,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Soldiers Gauntlets'), +(263438,0,6548,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Soldiers Girdle'), +(263438,0,6549,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Soldiers Cloak'), +(263438,0,6550,1.262,0,1,0,1,1,'wowhead: 8 of 634 kills - Soldiers Wristguards'), +(263438,0,6551,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Soldiers Boots'), +(263438,0,6555,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Bards Cloak'), +(263438,0,6556,0.946,0,1,0,1,1,'wowhead: 6 of 634 kills - Bards Bracers'), +(263438,0,6557,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Bards Boots'), +(263438,0,6558,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Bards Belt'), +(263438,0,6560,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Soldiers Shield'), +(263438,0,9746,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Simple Gloves'), +(263438,0,9747,0.789,0,1,0,1,1,'wowhead: 5 of 634 kills - Simple Britches'), +(263438,0,9748,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Simple Robe'), +(263438,0,9749,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Simple Blouse'), +(263438,0,9755,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Nomad Gloves'), +(263438,0,9756,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Nomad Trousers'), +(263438,0,9757,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Nomad Tunic'), +(263438,0,9763,0.946,0,1,0,1,1,'wowhead: 6 of 634 kills - Cadet Leggings'), +(263438,0,9764,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Cadet Shield'), +(263438,0,9765,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Cadet Vest'), +(263438,0,9779,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Bandit Cloak'), +(263438,0,9785,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Raiders Bracers'), +(263438,0,9786,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Raiders Cloak'), +(263438,0,10316,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Pattern: Colorful Kilt'), +(263438,0,11038,0.158,0,1,0,1,1,'wowhead: 1 of 634 kills - Formula: Enchant 2H Weapon - Lesser Spirit'), +(263438,0,15210,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Raider Shortsword'), +(263438,0,15268,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Twin-bladed Axe'), +(263438,0,15926,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Spellbinder Orb'), +(263438,0,15933,0.631,0,1,0,1,1,'wowhead: 4 of 634 kills - Simple Branch'), +(263438,0,211780,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Scroll: KWYJIBO'), +(263438,0,211785,0.315,0,1,0,1,1,'wowhead: 2 of 634 kills - Scroll: CWAL'), +(263438,0,211787,0.473,0,1,0,1,1,'wowhead: 3 of 634 kills - Scroll: LOWER PING WHOMEVER'), +(263438,0,275891,2.208,0,1,0,1,1,'wowhead: 14 of 634 kills - Dwarven Skull'), +(263438,0,275892,1.104,0,1,0,1,1,'wowhead: 7 of 634 kills - Short Stout'), +(263438,0,275893,5.205,0,1,0,1,1,'wowhead: 33 of 634 kills - Searing Gourd'), +(263438,0,4293,0.158,0,1,0,1,1,'sniff: 1 of 3 kills there, not on wowhead (rate taken over the 634 wowhead kills)'), +(263466,0,774,2.892,0,1,0,1,1,'wowhead: 12 of 415 kills - Malachite'), +(263466,0,818,6.988,0,1,0,1,1,'wowhead: 29 of 415 kills - Tigerseye'), +(263466,0,1210,1.687,0,1,0,1,1,'wowhead: 7 of 415 kills - Shadowgem'), +(263466,0,1495,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Calico Shoes'), +(263466,0,1497,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Calico Cloak'), +(263466,0,1499,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Calico Pants'), +(263466,0,1501,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Calico Tunic'), +(263466,0,1503,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Warped Leather Boots'), +(263466,0,1504,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Warped Leather Bracers'), +(263466,0,1505,1.687,0,1,0,1,1,'wowhead: 7 of 415 kills - Warped Cloak'), +(263466,0,1506,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Warped Leather Gloves'), +(263466,0,1507,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Warped Leather Pants'), +(263466,0,1509,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Warped Leather Vest'), +(263466,0,1510,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Heavy Hammer'), +(263466,0,1511,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Commoners Sword'), +(263466,0,1513,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Old Greatsword'), +(263466,0,1514,2.41,0,1,0,1,1,'wowhead: 10 of 415 kills - Rusty Warhammer'), +(263466,0,1515,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Rough Wooden Staff'), +(263466,0,1516,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Worn Hatchet'), +(263466,0,1730,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Worn Mail Belt'), +(263466,0,1731,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Worn Mail Boots'), +(263466,0,1732,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Worn Mail Bracers'), +(263466,0,1733,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Worn Cloak'), +(263466,0,1734,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Worn Mail Gloves'), +(263466,0,1735,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Worn Mail Pants'), +(263466,0,1737,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Worn Mail Vest'), +(263466,0,2073,2.892,0,1,0,1,1,'wowhead: 12 of 415 kills - Dwarven Hatchet'), +(263466,0,2079,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Sergeants Warhammer'), +(263466,0,2214,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Wooden Buckler'), +(263466,0,2215,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Wooden Shield'), +(263466,0,2632,1.928,0,1,0,1,1,'wowhead: 8 of 415 kills - Curved Dagger'), +(263466,0,2763,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Fisherman Knife'), +(263466,0,2770,7.47,0,1,0,1,1,'wowhead: 31 of 415 kills - Copper Ore'), +(263466,0,2777,1.928,0,1,0,1,1,'wowhead: 8 of 415 kills - Feeble Shortbow'), +(263466,0,2778,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Cheap Blunderbuss'), +(263466,0,2881,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Plans: Runed Copper Breastplate'), +(263466,0,2970,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Spellbinder Pants'), +(263466,0,2972,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Spellbinder Gloves'), +(263466,0,2973,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Hunting Tunic'), +(263466,0,2974,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Hunting Pants'), +(263466,0,2975,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Hunting Boots'), +(263466,0,2976,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Hunting Gloves'), +(263466,0,2977,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Veteran Armor'), +(263466,0,2978,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Veteran Leggings'), +(263466,0,2979,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Veteran Boots'), +(263466,0,2980,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Veteran Gloves'), +(263466,0,2983,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Seers Boots'), +(263466,0,3036,2.41,0,1,0,1,1,'wowhead: 10 of 415 kills - Heavy Shortbow'), +(263466,0,3205,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Inscribed Leather Bracers'), +(263466,0,3374,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Calico Belt'), +(263466,0,3375,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Calico Bracers'), +(263466,0,3643,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Spellbinder Bracers'), +(263466,0,3645,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Seers Cuffs'), +(263466,0,3651,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Veteran Shield'), +(263466,0,3652,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Hunting Buckler'), +(263466,0,4292,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Pattern: Green Woolen Bag'), +(263466,0,4293,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Pattern: Hillmans Leather Vest'), +(263466,0,4345,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Pattern: Red Woolen Boots'), +(263466,0,4409,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Schematic: Small Seaforium Charge'), +(263466,0,4564,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Spiked Club'), +(263466,0,4566,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Sturdy Quarterstaff'), +(263466,0,4567,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Merc Sword'), +(263466,0,4569,1.687,0,1,0,1,1,'wowhead: 7 of 415 kills - Staunch Hammer'), +(263466,0,4570,1.687,0,1,0,1,1,'wowhead: 7 of 415 kills - Birchwood Maul'), +(263466,0,4571,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - War Knife'), +(263466,0,4577,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Compact Shotgun'), +(263466,0,4678,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Veteran Girdle'), +(263466,0,4684,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Spellbinder Belt'), +(263466,0,4690,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Hunting Belt'), +(263466,0,4695,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Burnished Cloak'), +(263466,0,4699,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Seers Belt'), +(263466,0,4701,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Inscribed Cloak'), +(263466,0,5071,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Shadow Wand'), +(263466,0,5741,11.325,0,1,0,1,1,'wowhead: 47 of 415 kills - Rock Chip'), +(263466,0,6268,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Pioneer Tunic'), +(263466,0,6336,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Infantry Tunic'), +(263466,0,6378,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Seers Cape'), +(263466,0,6380,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Inscribed Buckler'), +(263466,0,6537,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Willow Boots'), +(263466,0,6539,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Willow Belt'), +(263466,0,6540,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Willow Pants'), +(263466,0,6541,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Willow Gloves'), +(263466,0,6542,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Willow Cape'), +(263466,0,6543,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Willow Bracers'), +(263466,0,6546,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Soldiers Leggings'), +(263466,0,6547,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Soldiers Gauntlets'), +(263466,0,6548,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Soldiers Girdle'), +(263466,0,6550,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Soldiers Wristguards'), +(263466,0,6551,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Soldiers Boots'), +(263466,0,6553,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Bards Trousers'), +(263466,0,6554,0.964,0,1,0,1,1,'wowhead: 4 of 415 kills - Bards Gloves'), +(263466,0,6555,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Bards Cloak'), +(263466,0,6556,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Bards Bracers'), +(263466,0,6557,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Bards Boots'), +(263466,0,6558,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Bards Belt'), +(263466,0,6559,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Bards Buckler'), +(263466,0,6560,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Soldiers Shield'), +(263466,0,9747,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Simple Britches'), +(263466,0,9748,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Simple Robe'), +(263466,0,9749,0.723,0,1,0,1,1,'wowhead: 3 of 415 kills - Simple Blouse'), +(263466,0,9755,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Nomad Gloves'), +(263466,0,9756,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Nomad Trousers'), +(263466,0,9757,1.928,0,1,0,1,1,'wowhead: 8 of 415 kills - Nomad Tunic'), +(263466,0,9763,1.205,0,1,0,1,1,'wowhead: 5 of 415 kills - Cadet Leggings'), +(263466,0,9764,1.687,0,1,0,1,1,'wowhead: 7 of 415 kills - Cadet Shield'), +(263466,0,9765,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Cadet Vest'), +(263466,0,9779,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Bandit Cloak'), +(263466,0,9785,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Raiders Bracers'), +(263466,0,9786,1.446,0,1,0,1,1,'wowhead: 6 of 415 kills - Raiders Cloak'), +(263466,0,11039,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Formula: Enchant Cloak - Minor Agility'), +(263466,0,15210,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Raider Shortsword'), +(263466,0,15268,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Twin-bladed Axe'), +(263466,0,15926,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Spellbinder Orb'), +(263466,0,15933,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Simple Branch'), +(263466,0,211780,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Scroll: KWYJIBO'), +(263466,0,211785,0.241,0,1,0,1,1,'wowhead: 1 of 415 kills - Scroll: CWAL'), +(263466,0,211786,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Scroll: CHAP BALK WELLES'), +(263466,0,211787,0.482,0,1,0,1,1,'wowhead: 2 of 415 kills - Scroll: LOWER PING WHOMEVER'), +(263470,0,783,0.962,0,1,0,1,1,'wowhead: 12 of 1248 kills - Light Hide'), +(263470,0,818,3.365,0,1,0,1,1,'wowhead: 42 of 1248 kills - Tigerseye'), +(263470,0,1210,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Shadowgem'), +(263470,0,1495,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Calico Shoes'), +(263470,0,1497,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Calico Cloak'), +(263470,0,1499,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Calico Pants'), +(263470,0,1501,0.561,0,1,0,1,1,'wowhead: 7 of 1248 kills - Calico Tunic'), +(263470,0,1502,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Warped Leather Belt'), +(263470,0,1503,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Warped Leather Boots'), +(263470,0,1504,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Warped Leather Bracers'), +(263470,0,1505,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Warped Cloak'), +(263470,0,1506,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Warped Leather Gloves'), +(263470,0,1507,0.881,0,1,0,1,1,'wowhead: 11 of 1248 kills - Warped Leather Pants'), +(263470,0,1509,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Warped Leather Vest'), +(263470,0,1510,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Heavy Hammer'), +(263470,0,1511,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Commoners Sword'), +(263470,0,1513,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Old Greatsword'), +(263470,0,1514,0.962,0,1,0,1,1,'wowhead: 12 of 1248 kills - Rusty Warhammer'), +(263470,0,1515,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Rough Wooden Staff'), +(263470,0,1516,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Worn Hatchet'), +(263470,0,1730,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Worn Mail Belt'), +(263470,0,1731,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Worn Mail Boots'), +(263470,0,1732,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Worn Mail Bracers'), +(263470,0,1733,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Worn Cloak'), +(263470,0,1734,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Worn Mail Gloves'), +(263470,0,1735,0.962,0,1,0,1,1,'wowhead: 12 of 1248 kills - Worn Mail Pants'), +(263470,0,1737,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Worn Mail Vest'), +(263470,0,2073,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Dwarven Hatchet'), +(263470,0,2078,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Northern Shortsword'), +(263470,0,2079,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Sergeants Warhammer'), +(263470,0,2214,0.641,0,1,0,1,1,'wowhead: 8 of 1248 kills - Wooden Buckler'), +(263470,0,2215,0.561,0,1,0,1,1,'wowhead: 7 of 1248 kills - Wooden Shield'), +(263470,0,2318,18.99,0,1,0,1,2,'wowhead: 237 of 1248 kills - Light Leather'), +(263470,0,2319,5.849,0,1,0,1,2,'wowhead: 73 of 1248 kills - Medium Leather'), +(263470,0,2406,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Fine Leather Boots'), +(263470,0,2407,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: White Leather Jerkin'), +(263470,0,2553,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Recipe: Elixir of Minor Agility'), +(263470,0,2632,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Curved Dagger'), +(263470,0,2672,20.673,0,1,0,1,1,'wowhead: 258 of 1248 kills - Stringy Wolf Meat'), +(263470,0,2763,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Fisherman Knife'), +(263470,0,2777,1.282,0,1,0,1,1,'wowhead: 16 of 1248 kills - Feeble Shortbow'), +(263470,0,2778,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Cheap Blunderbuss'), +(263470,0,2881,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Plans: Runed Copper Breastplate'), +(263470,0,2970,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Spellbinder Pants'), +(263470,0,2971,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Spellbinder Boots'), +(263470,0,2972,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Spellbinder Gloves'), +(263470,0,2973,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Hunting Tunic'), +(263470,0,2974,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Hunting Pants'), +(263470,0,2975,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Hunting Boots'), +(263470,0,2976,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Hunting Gloves'), +(263470,0,2977,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Veteran Armor'), +(263470,0,2978,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Veteran Leggings'), +(263470,0,2979,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Veteran Boots'), +(263470,0,2980,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Veteran Gloves'), +(263470,0,2984,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Seers Gloves'), +(263470,0,3036,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Heavy Shortbow'), +(263470,0,3195,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Barbaric Battle Axe'), +(263470,0,3196,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Edged Bastard Sword'), +(263470,0,3205,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Inscribed Leather Bracers'), +(263470,0,3299,10.497,0,1,0,1,1,'wowhead: 131 of 1248 kills - Fractured Canine'), +(263470,0,3300,4.327,0,1,0,1,1,'wowhead: 54 of 1248 kills - Rabbits Foot'), +(263470,0,3374,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Calico Belt'), +(263470,0,3375,0.721,0,1,0,1,1,'wowhead: 9 of 1248 kills - Calico Bracers'), +(263470,0,3610,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Plans: Gemmed Copper Gauntlets'), +(263470,0,3643,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Spellbinder Bracers'), +(263470,0,3645,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Seers Cuffs'), +(263470,0,3651,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Veteran Shield'), +(263470,0,3652,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Hunting Buckler'), +(263470,0,4232,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Medium Hide'), +(263470,0,4292,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Pattern: Green Woolen Bag'), +(263470,0,4293,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Hillmans Leather Vest'), +(263470,0,4294,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Hillmans Belt'), +(263470,0,4346,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Heavy Woolen Cloak'), +(263470,0,4348,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Pattern: Phoenix Gloves'), +(263470,0,4564,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Spiked Club'), +(263470,0,4566,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Sturdy Quarterstaff'), +(263470,0,4567,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Merc Sword'), +(263470,0,4569,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Staunch Hammer'), +(263470,0,4570,0.881,0,1,0,1,1,'wowhead: 11 of 1248 kills - Birchwood Maul'), +(263470,0,4571,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - War Knife'), +(263470,0,4577,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Compact Shotgun'), +(263470,0,4678,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Veteran Girdle'), +(263470,0,4683,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Spellbinder Cloak'), +(263470,0,4684,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Spellbinder Belt'), +(263470,0,4689,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Hunting Cloak'), +(263470,0,4695,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Burnished Cloak'), +(263470,0,4699,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Seers Belt'), +(263470,0,4701,0.561,0,1,0,1,1,'wowhead: 7 of 1248 kills - Inscribed Cloak'), +(263470,0,5071,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Shadow Wand'), +(263470,0,5212,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Blazing Wand'), +(263470,0,6266,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Disciples Vest'), +(263470,0,6268,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Pioneer Tunic'), +(263470,0,6271,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Red Linen Vest'), +(263470,0,6344,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Formula: Enchant Bracer - Minor Spirit'), +(263470,0,6378,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Seers Cape'), +(263470,0,6379,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Inscribed Leather Belt'), +(263470,0,6380,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Inscribed Buckler'), +(263470,0,6390,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Pattern: Stylish Blue Shirt'), +(263470,0,6528,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Spellbinder Robe'), +(263470,0,6537,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Willow Boots'), +(263470,0,6539,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Willow Belt'), +(263470,0,6540,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Willow Pants'), +(263470,0,6541,0.801,0,1,0,1,1,'wowhead: 10 of 1248 kills - Willow Gloves'), +(263470,0,6542,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Willow Cape'), +(263470,0,6543,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Willow Bracers'), +(263470,0,6545,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Soldiers Armor'), +(263470,0,6546,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Soldiers Leggings'), +(263470,0,6547,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Soldiers Gauntlets'), +(263470,0,6548,0.641,0,1,0,1,1,'wowhead: 8 of 1248 kills - Soldiers Girdle'), +(263470,0,6549,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Soldiers Cloak'), +(263470,0,6550,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Soldiers Wristguards'), +(263470,0,6551,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Soldiers Boots'), +(263470,0,6553,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Bards Trousers'), +(263470,0,6554,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Bards Gloves'), +(263470,0,6555,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Bards Cloak'), +(263470,0,6556,0.641,0,1,0,1,1,'wowhead: 8 of 1248 kills - Bards Bracers'), +(263470,0,6557,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Bards Boots'), +(263470,0,6558,0.641,0,1,0,1,1,'wowhead: 8 of 1248 kills - Bards Belt'), +(263470,0,6559,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Bards Buckler'), +(263470,0,6560,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Soldiers Shield'), +(263470,0,9746,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Simple Gloves'), +(263470,0,9747,1.042,0,1,0,1,1,'wowhead: 13 of 1248 kills - Simple Britches'), +(263470,0,9748,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Simple Robe'), +(263470,0,9749,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Simple Blouse'), +(263470,0,9755,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Nomad Gloves'), +(263470,0,9756,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Nomad Trousers'), +(263470,0,9757,0.962,0,1,0,1,1,'wowhead: 12 of 1248 kills - Nomad Tunic'), +(263470,0,9763,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Cadet Leggings'), +(263470,0,9764,0.321,0,1,0,1,1,'wowhead: 4 of 1248 kills - Cadet Shield'), +(263470,0,9765,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Cadet Vest'), +(263470,0,9785,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Raiders Bracers'), +(263470,0,9786,0.401,0,1,0,1,1,'wowhead: 5 of 1248 kills - Raiders Cloak'), +(263470,0,15210,0.561,0,1,0,1,1,'wowhead: 7 of 1248 kills - Raider Shortsword'), +(263470,0,15268,0.481,0,1,0,1,1,'wowhead: 6 of 1248 kills - Twin-bladed Axe'), +(263470,0,15926,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Spellbinder Orb'), +(263470,0,15933,0.24,0,1,0,1,1,'wowhead: 3 of 1248 kills - Simple Branch'), +(263470,0,211780,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Scroll: KWYJIBO'), +(263470,0,211785,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Scroll: CWAL'), +(263470,0,211786,0.16,0,1,0,1,1,'wowhead: 2 of 1248 kills - Scroll: CHAP BALK WELLES'), +(263470,0,211787,0.08,0,1,0,1,1,'wowhead: 1 of 1248 kills - Scroll: LOWER PING WHOMEVER'), +(263470,0,249427,0.16,0,1,0,2,2,'wowhead: 2 of 1248 kills - Pristine Leather'); diff --git a/sql/custom/world/2026_10_13_04_world_classic_hall_of_thanes_ai.sql b/sql/custom/world/2026_10_13_04_world_classic_hall_of_thanes_ai.sql new file mode 100644 index 0000000000..84481b0f8a --- /dev/null +++ b/sql/custom/world/2026_10_13_04_world_classic_hall_of_thanes_ai.sql @@ -0,0 +1,56 @@ +-- Classic 1.60: The Hall of Thanes (map 3065) creature AI and boss lines from the official sniff of 2026-10-12 +-- (gen_hall_of_thanes.py). Timings: first cast after the attack start and repeat gap as seen (median +-25%); fights were short, so +-- a spell cast once per fight gets a repeat chosen from the spell (noted per row). Not in the sniff: Plunder Charge (22911) and +-- Durgen Intimidating Shout 29544 (listed by Wowhead), the health at which looters flee (15% used). Safe to run again. + +-- creatures added by sniff_import_dungeon.py that need more than the generic import +-- Poisoned Blades (1308473, procs 1308474 seen 22 times) is on every Dark Iron Looter next to the scale aura (the generic aura +-- import reads only the first aura of an update) +UPDATE `creature_template_addon` SET `auras` = '1264628 1308473' WHERE `entry` = 263396; +-- the Fiery Assistant is a summon (never a placed spawn): its level as seen +REPLACE INTO `creature_classic_level` (`entry`,`level_min`,`level_max`) VALUES (263467,14,15); +-- Ancient Switch: opens the two Iron Doors back to the entrance (instance script) +UPDATE `gameobject_template` SET `ScriptName` = 'go_hall_of_thanes_ancient_switch' WHERE `entry` = 673473; + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263467,263470,263980); +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (261306,261311,261316,261319,263389,263390,263396,263397,263438,263466,263467,263470,263980); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`Difficulties`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`event_param_string`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`action_param7`,`action_param_string`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_param_string`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(261306,0,0,0,'',0,0,100,0,2100,3500,25000,30000,0,'',11,1292602,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Faldrim Anvilmar - In Combat - Cast 1292602 (Anvilmar''s Curse on the tank) - sniff: 1 casts, first after (2100, 3500) ms, repeat not seen (25000-30000) ms'), +(261306,0,1,0,'',0,0,100,0,4900,8100,10000,15000,0,'',11,13860,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Faldrim Anvilmar - In Combat - Cast 13860 (Mind Blast) - sniff: 1 casts, first after (4900, 8100) ms, repeat not seen (10000-15000) ms'), +(261306,0,2,0,'',4,0,100,0,0,0,0,0,0,'',1,0,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Faldrim Anvilmar - On Aggro - Say Line 0'), +(261306,0,3,0,'',6,0,100,0,0,0,0,0,0,'',1,1,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Faldrim Anvilmar - On Death - Say Line 1'), +(261311,0,0,0,'',0,0,100,0,7200,12000,10000,15000,0,'',11,21055,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Plunder - In Combat - Cast 21055 (Crush Armor) - sniff: 1 casts, first after (7200, 12000) ms, repeat not seen (10000-15000) ms'), +(261311,0,1,0,'',0,0,100,0,8100,13500,10000,15000,0,'',11,11130,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Plunder - In Combat - Cast 11130 (Knock Away (no unit target: area around him)) - sniff: 1 casts, first after (8100, 13500) ms, repeat not seen (10000-15000) ms'), +(261311,0,2,0,'',4,0,100,0,0,0,0,0,0,'',1,0,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Plunder - On Aggro - Say Line 0'), +(261316,0,0,0,'',0,0,100,0,3600,5900,10000,15000,0,'',11,11970,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Magmatus - In Combat - Cast 11970 (Fire Nova (area around him)) - sniff: 1 casts, first after (3600, 5900) ms, repeat not seen (10000-15000) ms'), +(261316,0,1,0,'',0,0,100,0,8100,13600,10000,15000,0,'',11,1293228,0,0,0,0,0,0,'',5,0,0,0,0,'',0,0,0,0,'Magmatus - In Combat - Cast 1293228 (Combust (3 s cast, a random player)) - sniff: 1 casts, first after (8100, 13600) ms, repeat not seen (10000-15000) ms'), +(261316,0,2,0,'',4,0,100,0,0,0,0,0,0,'',1,0,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Magmatus - On Aggro - Say Line 0'), +(261319,0,0,0,'',0,0,100,0,8300,13800,15000,18000,0,'',11,11977,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Durgen Dirgehammer - In Combat - Cast 11977 (Rend) - sniff: 1 casts, first after (8300, 13800) ms, repeat not seen (15000-18000) ms'), +(261319,0,1,0,'',0,0,100,0,9200,15300,10000,15000,0,'',11,25710,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Durgen Dirgehammer - In Combat - Cast 25710 (Heroic Strike) - sniff: 1 casts, first after (9200, 15300) ms, repeat not seen (10000-15000) ms'), +(261319,0,2,0,'',0,0,100,0,11900,19900,20000,25000,0,'',11,19134,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Durgen Dirgehammer - In Combat - Cast 19134 (Intimidating Shout) - sniff: 1 casts, first after (11900, 19900) ms, repeat not seen (20000-25000) ms'), +(261319,0,3,0,'',4,0,100,0,0,0,0,0,0,'',1,0,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Durgen Dirgehammer - On Aggro - Say Line 0'), +(261319,0,4,0,'',6,0,100,0,0,0,0,0,0,'',1,1,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Durgen Dirgehammer - On Death - Say Line 1'), +(263389,0,0,0,'',0,0,100,0,4900,8100,10000,15000,0,'',11,11971,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Enraged Apparition - In Combat - Cast 11971 (Sunder Armor) - sniff: 11 casts, first after (4900, 8100) ms, repeat not seen (10000-15000) ms'), +(263390,0,0,0,'',0,0,100,0,6500,10800,10000,15000,0,'',11,11639,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Tormented Soul - In Combat - Cast 11639 (Shadow Word: Pain) - sniff: 6 casts, first after (6500, 10800) ms, repeat not seen (10000-15000) ms'), +(263396,0,0,0,'',0,0,100,0,5200,8600,4700,7800,0,'',11,14873,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Dark Iron Looter - In Combat - Cast 14873 (Sinister Strike) - sniff: 28 casts, first after (5200, 8600) ms, repeat (4700, 7800) ms'), +(263396,0,1,0,'',2,0,100,1,0,15,0,0,0,'',25,1,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Dark Iron Looter - Between 0-15% Health - Flee For Assist (sniff: attempts to run away in fear, 8 times; the health it starts at is not in the sniff)'), +(263397,0,0,0,'',0,0,100,0,2800,4600,1800,3000,0,'',11,1294260,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Dark Iron Engineer - In Combat - Cast 1294260 (Throw Dynamite (2 s cast, at the target position, cast again and again)) - sniff: 39 casts, first after (2800, 4600) ms, repeat (1800, 3000) ms'), +(263438,0,0,0,'',0,0,100,0,0,0,2700,4600,0,'',11,20793,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Dark Iron Summoner - In Combat - Cast 20793 (Fireball (3 s cast, cast again and again)) - sniff: 14 casts, first after (0, 0) ms, repeat (2700, 4600) ms'), +(263438,0,1,0,'',0,0,100,0,8100,13500,30000,35000,0,'',11,1291218,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Dark Iron Summoner - In Combat - Cast 1291218 (Summon Fiery Assistant (4 s cast)) - sniff: 2 casts, first after (8100, 13500) ms, repeat not seen (30000-35000) ms'), +(263466,0,0,0,'',0,0,100,0,5900,9900,11000,18300,0,'',11,5568,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Lesser Stone Golem - In Combat - Cast 5568 (Trample (area around it)) - sniff: 8 casts, first after (5900, 9900) ms, repeat (11000, 18300) ms'), +(263467,0,0,0,'',54,0,100,0,0,0,0,0,0,'',11,1291225,2,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Fiery Assistant - Just Summoned - Cast 1291225 (Spawn Cosmetics)'), +(263467,0,1,0,'',54,0,100,0,0,0,0,0,0,'',49,0,0,0,0,0,0,0,'',21,0,0,0,0,'',0,0,0,0,'Fiery Assistant - Just Summoned - Attack (sniff: attacks at once)'), +(263470,0,0,0,'',0,0,100,0,2700,4500,10000,15000,0,'',11,3427,0,0,0,0,0,0,'',2,0,0,0,0,'',0,0,0,0,'Bloodhound Runt - In Combat - Cast 3427 (Infected Wound) - sniff: 3 casts, first after (2700, 4500) ms, repeat not seen (10000-15000) ms'), +(263980,0,0,0,'',25,0,100,0,0,0,0,0,0,'',8,0,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Seaforium Blasting Powder - On Reset - Passive (a keg: does not fight back)'), +(263980,0,1,0,'',25,0,100,0,0,0,0,0,0,'',103,1,0,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Seaforium Blasting Powder - On Reset - Rooted'), +(263980,0,2,0,'',6,0,100,0,0,0,0,0,0,'',11,1291346,2,0,0,0,0,0,'',1,0,0,0,0,'',0,0,0,0,'Seaforium Blasting Powder - On Death - Cast 1291346 (explodes: sniff, at the moment it was killed)'); + +-- boss lines (yells) with their voice: sound kit from SMSG_PLAY_SOUND (the server has no broadcast text for them) +DELETE FROM `creature_text` WHERE `CreatureID` IN (261306,261311,261316,261319); +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`SoundPlayType`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(261306,0,0,'Defilers! Miscreants! Leave this place!',14,0,100,0,0,340212,0,0,0,'Faldrim Anvilmar - aggro (sniff; official broadcast text 310791)'), +(261306,1,0,'I return... to my... rest.',14,0,100,0,0,340226,0,0,0,'Faldrim Anvilmar - death (sniff; official broadcast text 310794)'), +(261311,0,0,'Loot acquisition protocol engaged.',14,0,100,0,0,340209,0,0,0,'Plunder - aggro (sniff; official broadcast text 310793)'), +(261316,0,0,'Flame consumes all!',14,0,100,0,0,340200,0,0,0,'Magmatus - aggro (sniff; official broadcast text 310795)'), +(261319,0,0,'Ye think you can stop the greatest heist in history?',14,0,100,0,0,340210,0,0,0,'Durgen Dirgehammer - aggro (sniff; official broadcast text 310796)'), +(261319,1,0,'I nearly... got away... with it.',14,0,100,0,0,340215,0,0,0,'Durgen Dirgehammer - death (sniff; official broadcast text 310797)'); diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index e27c254c2d..650b9804e9 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -106,7 +106,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_UNDELETE_ENUM_CUSTOMIZATIONS, "SELECT cc.guid, cc.chrCustomizationOptionID, cc.chrCustomizationChoiceID FROM character_customizations cc " "LEFT JOIN characters c ON cc.guid = c.guid WHERE c.deleteInfos_Account = ? AND c.deleteInfos_Name IS NOT NULL ORDER BY cc.guid, cc.chrCustomizationOptionID", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_FREE_NAME, "SELECT name, at_login FROM characters WHERE guid = ? AND NOT EXISTS (SELECT NULL FROM characters WHERE name = ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_FREE_NAME, "SELECT name, at_login FROM characters WHERE guid = ? AND NOT EXISTS (SELECT NULL FROM characters WHERE name = ? AND guid <> ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHAR_ZONE, "SELECT zone FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_POSITION_XYZ, "SELECT map, position_x, position_y, position_z FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_POSITION, "SELECT position_x, position_y, position_z, orientation, map, taxi_path FROM characters WHERE guid = ?", CONNECTION_SYNCH); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 1936631186..79c2f8b108 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -721,6 +721,133 @@ uint32 ObjectMgr::GetItemClassicBlock(uint32 entry) const return block ? *block : 0; } +void ObjectMgr::LoadShop() +{ + uint32 oldMSTime = getMSTime(); + + _shopGroupStore.clear(); + _shopProductStore.clear(); + + // 0 1 2 3 + if (QueryResult result = WorldDatabase.Query("SELECT ID, Name, IconFileDataID, Ordering FROM shop_group")) + { + do + { + Field* fields = result->Fetch(); + ShopGroup& group = _shopGroupStore[fields[0].GetUInt32()]; + group.ID = fields[0].GetUInt32(); + group.Name = fields[1].GetString(); + group.IconFileDataID = fields[2].GetInt32(); + group.Ordering = fields[3].GetInt32(); + } while (result->NextRow()); + } + + // 0 1 2 3 4 5 6 7 + if (QueryResult result = WorldDatabase.Query("SELECT ID, GroupID, Name, Description, IconFileDataID, Price, NormalPrice, Ordering FROM shop_product WHERE Enabled = 1")) + { + do + { + Field* fields = result->Fetch(); + uint32 id = fields[0].GetUInt32(); + uint32 groupId = fields[1].GetUInt32(); + if (!_shopGroupStore.contains(groupId)) + { + TC_LOG_ERROR("sql.sql", "Table `shop_product`: product {} has non-existing GroupID {}, skipped.", id, groupId); + continue; + } + + ShopProduct& product = _shopProductStore[id]; + product.ID = id; + product.GroupID = groupId; + product.Name = fields[2].GetString(); + product.Description = fields[3].GetString(); + if (product.Description.size() > 8191) // 13 bit length in the packet + product.Description.resize(8191); + product.IconFileDataID = fields[4].GetInt32(); + product.Price = fields[5].GetUInt32(); + product.NormalPrice = fields[6].GetUInt32(); + product.Ordering = fields[7].GetInt32(); + } while (result->NextRow()); + } + + // 0 1 2 3 + if (QueryResult result = WorldDatabase.Query("SELECT ProductID, Action, Param1, Param2 FROM shop_product_action ORDER BY ProductID, `Index`")) + { + do + { + Field* fields = result->Fetch(); + uint32 productId = fields[0].GetUInt32(); + ShopProduct* product = Trinity::Containers::MapGetValuePtr(_shopProductStore, productId); + if (!product) + continue; + + ShopProductAction action; + action.Action = ShopAction(fields[1].GetUInt8()); + action.Param1 = fields[2].GetInt32(); + action.Param2 = fields[3].GetInt32(); + + bool valid = true; + switch (action.Action) + { + case ShopAction::Item: + valid = GetItemTemplate(action.Param1) != nullptr; + action.Param2 = std::max(action.Param2, 1); + break; + case ShopAction::Gold: + valid = action.Param1 > 0; + break; + case ShopAction::Spell: + valid = sSpellMgr->GetSpellInfo(action.Param1, DIFFICULTY_NONE) != nullptr; + break; + case ShopAction::Service: + valid = action.Param1 >= AsUnderlyingType(ShopService::Rename) && action.Param1 <= AsUnderlyingType(ShopService::FactionChange); + break; + case ShopAction::Profession: + valid = sSkillLineStore.LookupEntry(action.Param1) != nullptr; + if (action.Param2 <= 0) + action.Param2 = 300; + break; + case ShopAction::Level: + valid = action.Param1 > 1 && action.Param1 <= STRONG_MAX_LEVEL; + break; + case ShopAction::Title: + valid = sCharTitlesStore.LookupEntry(action.Param1) != nullptr; + break; + case ShopAction::Reputation: + valid = sFactionStore.LookupEntry(action.Param1) != nullptr; + break; + case ShopAction::RealmTransfer: + break; + case ShopAction::BoostToken: + if (action.Param1 <= 0) + action.Param1 = 6; + break; + default: + valid = false; + break; + } + + if (!valid) + { + TC_LOG_ERROR("sql.sql", "Table `shop_product_action`: product {} has an invalid action {} ({}, {}), skipped.", productId, AsUnderlyingType(action.Action), action.Param1, action.Param2); + continue; + } + + // items (mailed) and account-wide things can be bought at the character screen too + if (action.Action != ShopAction::Item && action.Action != ShopAction::RealmTransfer && action.Action != ShopAction::BoostToken) + product->InGameOnly = true; + product->Actions.push_back(action); + } while (result->NextRow()); + } + + TC_LOG_INFO("server.loading", ">> Loaded {} shop tabs and {} shop products in {} ms", _shopGroupStore.size(), _shopProductStore.size(), GetMSTimeDiffToNow(oldMSTime)); +} + +ShopProduct const* ObjectMgr::GetShopProduct(uint32 id) const +{ + return Trinity::Containers::MapGetValuePtr(_shopProductStore, id); +} + void ObjectMgr::LoadCreatureTemplateModels() { uint32 oldMSTime = getMSTime(); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 0d2690beb1..c08cc9f9a5 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -634,6 +634,59 @@ struct PlayerLevelInfo typedef std::vector PlayerCreateInfoSpells; +// Classic 1.60 in-game Store (world tables shop_group / shop_product / shop_product_item) +struct ShopGroup +{ + uint32 ID = 0; + std::string Name; + int32 IconFileDataID = 0; + int32 Ordering = 0; +}; + +enum class ShopAction : uint8 +{ + Item = 1, // Param1 item, Param2 count (mailed) + Gold = 2, // Param1 copper + Spell = 3, // Param1 spell + Service = 4, // Param1 ShopService + Profession = 5, // Param1 skill line, Param2 skill value (0 = 300) + Level = 6, // Param1 level + Title = 7, // Param1 CharTitles id + Reputation = 8, // Param1 faction, Param2 standing + RealmTransfer = 9, // character transfer to another realm (work in progress): the product is sent as a character service, so the + // Store opens its character / realm window + BoostToken = 10, // Param1 boost type (6 = level 60): a character boost button on the character screen (auth.account_boost_token) +}; + +enum class ShopService : int32 +{ + Rename = 1, + Customize = 2, + RaceChange = 3, + FactionChange = 4, +}; + +struct ShopProductAction +{ + ShopAction Action = ShopAction::Item; + int32 Param1 = 0; + int32 Param2 = 0; +}; + +struct ShopProduct +{ + uint32 ID = 0; + uint32 GroupID = 0; + std::string Name; + std::string Description; + int32 IconFileDataID = 0; + uint32 Price = 0; // shop points + uint32 NormalPrice = 0; // crossed-out price, 0 = no sale + int32 Ordering = 0; + std::vector Actions; + bool InGameOnly = false; // has actions that need the character in game (anything but items) +}; + struct PlayerCreateInfoAction { PlayerCreateInfoAction(uint8 _button, uint32 _action, uint8 _type) : button(_button), type(_type), action(_action) { } @@ -1048,6 +1101,10 @@ class TC_GAME_API ObjectMgr ClassicCreatureClassLevelStats const* GetCreatureClassicClassLevelStats(uint8 level, uint8 unitClass) const; void LoadItemClassicBlock(); uint32 GetItemClassicBlock(uint32 entry) const; + void LoadShop(); + std::map const& GetShopGroups() const { return _shopGroupStore; } + std::map const& GetShopProducts() const { return _shopProductStore; } + ShopProduct const* GetShopProduct(uint32 id) const; static CreatureModel const* ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data = nullptr); static void ChooseCreatureFlags(CreatureTemplate const* cInfo, uint64* npcFlags, uint32* unitFlags, uint32* unitFlags2, uint32* unitFlags3, CreatureStaticFlagsHolder const& staticFlags, CreatureData const* data = nullptr); EquipmentInfo const* GetEquipmentInfo(uint32 entry, int8& id) const; @@ -1828,6 +1885,8 @@ class TC_GAME_API ObjectMgr std::unordered_map _creatureClassicStatsStore; std::unordered_map _creatureClassicClassLevelStatsStore; std::unordered_map _itemClassicBlockStore; + std::map _shopGroupStore; + std::map _shopProductStore; CreatureModelContainer _creatureModelStore; std::unordered_map _creatureSummonedDataStore; CreatureAddonContainer _creatureAddonStore; diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp index 15d064fbd6..bbe2b721c4 100644 --- a/src/server/game/Handlers/AuthHandler.cpp +++ b/src/server/game/Handlers/AuthHandler.cpp @@ -149,8 +149,9 @@ void WorldSession::SendFeatureSystemStatusGlueScreen() { "raidLockoutExtendEnabled"sv, "1"sv }, { "sellAllJunkEnabled"sv, "1"sv }, { "bypassItemLevelScalingCode"sv, "0"sv }, - // Classic 1.60: custom shop - the client's shop2 REST calls go to classic_re/shop_server.py - { "shop2Enabled"sv, "1"sv }, + // Classic 1.60: 0 = the legacy Store window fed by the BattlePay world packets (TokenHandler.cpp, Classic.Shop.Enabled); + // 1 = the shop2 catalog shop over REST (classic_re/shop_server.py stub, never answered) + { "shop2Enabled"sv, "0"sv }, { "shop2HostUrlRequests"sv, "https://trinity.actual.battle.net:8443"sv }, { "shop2HostUrlAuth"sv, "https://trinity.actual.battle.net:8443"sv }, { "shop2UseConnectedRealmGameServiceRegionId"sv, "0"sv }, // realm region is the fake 70 of the Classic super realm; use the account region (1) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 75338a4cc3..43f8dccdf1 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -555,6 +555,10 @@ void WorldSession::HandleCharEnum(CharacterDatabaseQueryHolder const& holder) SendPacket(charEnum.Write()); + // Classic 1.60: the official server sends the distribution list (boost / character service tokens) unasked with the character + // list; the client only asks for it when the Shop opens + SendShopDistributionList(); + if (!realmCharacters.empty()) charEnum.Characters = std::move(realmCharacters); @@ -2018,6 +2022,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPackets::Character::CharacterRena CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_FREE_NAME); stmt->setUInt64(0, request.RenameInfo->Guid.GetCounter()); stmt->setString(1, request.RenameInfo->NewName); + stmt->setUInt64(2, request.RenameInfo->Guid.GetCounter()); // Classic 1.60: keeping the name and changing only the surname is allowed _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt) .WithPreparedCallback([this, renameInfo = std::move(request.RenameInfo)](PreparedQueryResult result) mutable @@ -2064,14 +2069,22 @@ void WorldSession::HandleCharRenameCallBack(std::shared_ptrAppend(stmt); + // Classic 1.60: the rename dialog also sets the surname (up to 48 characters, like character creation) + if (utf8length(renameInfo->NewSurname) > 48) + renameInfo->NewSurname.clear(); + std::string escapedSurname = renameInfo->NewSurname; + CharacterDatabase.EscapeString(escapedSurname); + trans->Append(Trinity::StringFormat("UPDATE characters SET surname = '{}' WHERE guid = {}", escapedSurname, lowGuid).c_str()); + CharacterDatabase.CommitTransaction(trans); - TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] ({}) Changed name to: {}", - GetAccountId(), GetRemoteAddress(), oldName, renameInfo->Guid.ToString(), renameInfo->NewName); + TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] ({}) Changed name to: {} {}", + GetAccountId(), GetRemoteAddress(), oldName, renameInfo->Guid.ToString(), renameInfo->NewName, renameInfo->NewSurname); SendCharRename(RESPONSE_SUCCESS, renameInfo.get()); sCharacterCache->UpdateCharacterData(renameInfo->Guid, renameInfo->NewName); + sCharacterCache->UpdateCharacterSurname(renameInfo->Guid, renameInfo->NewSurname); } void WorldSession::HandleSetPlayerDeclinedNames(WorldPackets::Character::SetPlayerDeclinedNames& packet) @@ -2310,11 +2323,19 @@ void WorldSession::HandleCharCustomizeCallback(std::shared_ptrsetUInt64(0, lowGuid); trans->Append(stmt); + + // Classic 1.60: the surname is edited in the same screen (up to 48 characters, like character creation) + if (utf8length(customizeInfo->CharSurname) > 48) + customizeInfo->CharSurname.clear(); + std::string escapedSurname = customizeInfo->CharSurname; + CharacterDatabase.EscapeString(escapedSurname); + trans->Append(Trinity::StringFormat("UPDATE characters SET surname = '{}' WHERE guid = {}", escapedSurname, lowGuid).c_str()); } CharacterDatabase.CommitTransaction(trans); sCharacterCache->UpdateCharacterData(customizeInfo->CharGUID, customizeInfo->CharName, customizeInfo->SexID); + sCharacterCache->UpdateCharacterSurname(customizeInfo->CharGUID, customizeInfo->CharSurname); SendCharCustomize(RESPONSE_SUCCESS, customizeInfo.get()); @@ -2642,6 +2663,13 @@ void WorldSession::HandleCharRaceOrFactionChangeCallback(std::shared_ptrsetUInt64(0, lowGuid); trans->Append(stmt); + + // Classic 1.60: the surname is edited in the same screen (up to 48 characters, like character creation) + if (utf8length(factionChangeInfo->Surname) > 48) + factionChangeInfo->Surname.clear(); + std::string escapedSurname = factionChangeInfo->Surname; + CharacterDatabase.EscapeString(escapedSurname); + trans->Append(Trinity::StringFormat("UPDATE characters SET surname = '{}' WHERE guid = {}", escapedSurname, lowGuid).c_str()); } // Customize @@ -2657,7 +2685,6 @@ void WorldSession::HandleCharRaceOrFactionChangeCallback(std::shared_ptrAppend(stmt); } - sCharacterCache->UpdateCharacterData(factionChangeInfo->Guid, factionChangeInfo->Name, factionChangeInfo->SexID, factionChangeInfo->RaceID); if (oldRace != factionChangeInfo->RaceID) { @@ -2747,6 +2774,10 @@ void WorldSession::HandleCharRaceOrFactionChangeCallback(std::shared_ptrsetUInt16(1, 2987); break; + case RACE_SKYBORNE_ALLIANCE: // Classic 1.60: both Skyborne know Darnassian (skill 113) from creation + case RACE_SKYBORNE_HORDE: + stmt->setUInt16(1, 113); + break; default: TC_LOG_ERROR("entities.player", "Could not find language data for race ({}).", factionChangeInfo->RaceID); SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo.get()); @@ -3044,6 +3075,11 @@ void WorldSession::HandleCharRaceOrFactionChangeCallback(std::shared_ptrUpdateCharacterData(factionChangeInfo->Guid, factionChangeInfo->Name, factionChangeInfo->SexID, factionChangeInfo->RaceID); + sCharacterCache->UpdateCharacterSurname(factionChangeInfo->Guid, factionChangeInfo->Surname); + TC_LOG_DEBUG("entities.player", "{} (IP: {}) changed race from {} to {}", GetPlayerInfo(), GetRemoteAddress(), oldRace, factionChangeInfo->RaceID); SendCharFactionChange(RESPONSE_SUCCESS, factionChangeInfo.get()); @@ -3271,6 +3307,7 @@ void WorldSession::SendCharRename(ResponseCodes result, WorldPackets::Character: WorldPackets::Character::CharacterRenameResult packet; packet.Result = result; packet.Name = renameInfo->NewName; + packet.Surname = renameInfo->NewSurname; if (result == RESPONSE_SUCCESS) packet.Guid = renameInfo->Guid; @@ -3303,6 +3340,7 @@ void WorldSession::SendCharFactionChange(ResponseCodes result, WorldPackets::Cha { packet.Display.emplace(); packet.Display->Name = factionChangeInfo->Name; + packet.Display->Surname = factionChangeInfo->Surname; packet.Display->SexID = factionChangeInfo->SexID; packet.Display->Customizations = &factionChangeInfo->Customizations; packet.Display->RaceID = factionChangeInfo->RaceID; diff --git a/src/server/game/Handlers/TokenHandler.cpp b/src/server/game/Handlers/TokenHandler.cpp index eb54c7fcb0..9ff8c3d45d 100644 --- a/src/server/game/Handlers/TokenHandler.cpp +++ b/src/server/game/Handlers/TokenHandler.cpp @@ -15,10 +15,31 @@ * with this program. If not, see . */ +#include "CharacterCache.h" +#include "Chat.h" +#include "Config.h" +#include "DB2Stores.h" +#include "DatabaseEnv.h" +#include "GameTime.h" +#include "Item.h" +#include "ItemEnchantmentMgr.h" +#include "ItemTemplate.h" +#include "Log.h" +#include "Mail.h" +#include "ObjectAccessor.h" +#include "ObjectMgr.h" #include "Opcodes.h" +#include "Player.h" +#include "PlayerDump.h" +#include "Random.h" +#include "RealmList.h" +#include "SpellMgr.h" +#include "StringConvert.h" +#include "StringFormat.h" #include "TokenPackets.h" #include "WorldPacket.h" #include "WorldSession.h" +#include void WorldSession::HandleCommerceTokenGetLog(WorldPackets::Token::CommerceTokenGetLog& commerceTokenGetLog) { @@ -49,3 +70,931 @@ void WorldSession::HandleGetLastCatalogFetch(WorldPackets::Null& /*null*/) data << int64(0); SendPacket(&data); } + +// Classic 1.60 in-game Store, products from the world tables shop_group / shop_product / shop_product_action, plus the Gold +// Market tab built from the characters table shop_gold_listing (gold sold by players for points). +// Classic.Shop.Enabled = 0 answers like the official server (result 2, nothing for sale). +// Prices are shop points; the client shows fixed point / 10000 in its currency format. +static constexpr uint64 ShopPriceFixedPoint(uint32 points) { return uint64(points) * 10000; } + +namespace +{ +std::string_view CheckCharacterTransfer(uint32 accountId, ObjectGuid character, uint32 destinationRealmAddress); +bool BeginCharacterTransfer(uint32 accountId, ObjectGuid character, uint32 destinationRealmAddress); + +constexpr uint32 GoldMarketGroupID = 0x40000000; +constexpr uint32 GoldMarketProductBase = 0x40000000; // product id = base + listing id +constexpr uint32 GoldMarketMaxListings = 500; + +struct GoldListing +{ + uint32 ID = 0; + uint32 SellerAccount = 0; + uint32 Gold = 0; + uint32 Price = 0; +}; + +ShopProduct MakeGoldListingProduct(GoldListing const& listing) +{ + ShopProduct product; + product.ID = GoldMarketProductBase + listing.ID; + product.GroupID = GoldMarketGroupID; + product.Name = Trinity::StringFormat("{} Gold", listing.Gold); + product.Description = "Gold offered by another player, for this character."; + product.IconFileDataID = 133784; // inv_misc_coin_01 + product.Price = listing.Price; + product.Actions.push_back({ .Action = ShopAction::Gold, .Param1 = int32(std::min(uint64(listing.Gold) * GOLD, std::numeric_limits::max())) }); + product.InGameOnly = true; + return product; +} + +Optional GetGoldListing(uint32 listingId) +{ + if (QueryResult result = CharacterDatabase.PQuery("SELECT ID, SellerAccount, Gold, Price FROM shop_gold_listing WHERE ID = {}", listingId)) + { + Field* fields = result->Fetch(); + return GoldListing{ .ID = fields[0].GetUInt32(), .SellerAccount = fields[1].GetUInt32(), .Gold = fields[2].GetUInt32(), .Price = fields[3].GetUInt32() }; + } + return {}; +} + +// a product from the world tables or a Gold Market listing (built into storage) +ShopProduct const* FindShopProduct(uint32 productId, Optional& storage, Optional& listing) +{ + if (ShopProduct const* product = sObjectMgr->GetShopProduct(productId)) + return product; + + if (productId > GoldMarketProductBase) + { + listing = GetGoldListing(productId - GoldMarketProductBase); + if (listing) + return &storage.emplace(MakeGoldListingProduct(*listing)); + } + return nullptr; +} +} + +void WorldSession::HandleBattlePayGetProductList(WorldPackets::Null& /*null*/) +{ + SendShopProductList(); + SendShopDistributionList(); +} + +// boost / character service tokens of the account (also sent with the character list, see HandleCharEnum) +void WorldSession::SendShopDistributionList() +{ + WorldPackets::BattlePay::DistributionListResponse distributions; + // Hardcore Character Transfer token on the character screen: on realms whose characters may leave once dead (transfer rules), while + // the account has a dead character there (died before or after, like official); anywhere with Classic.Shop.VasTest + if (sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false) && (sConfigMgr->GetBoolDefault("Classic.Shop.VasTest", false) || + (LoginDatabase.PQuery("SELECT 1 FROM character_transfer_rule WHERE SourceRealm = {} AND DeadOnly = 1", sRealmList->GetCurrentRealmId().Realm) && + CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE account = {} AND deleteDate IS NULL AND (playerFlags & {} OR health = 0) LIMIT 1", + GetAccountId(), uint32(PLAYER_FLAGS_GHOST))))) + { + WorldPackets::BattlePay::DistributionObject& distribution = distributions.Distributions.emplace_back(); + distribution.DistributionID = 1; + distribution.DeliverableID = 900001; + distribution.PurchaseID = 1; + WorldPackets::BattlePay::Deliverable& token = distribution.Product.emplace(); + token.DeliverableID = 900001; + token.Type = 39; // HardcoreCharacterTransfer + token.Flags = 0x400; // character service token + token.Name = "Hardcore Character Transfer"; + } + + // character boost tokens of the account (auth.account_boost_token): a boost button for each boost type on the character screen + if (sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false)) + if (QueryResult boosts = LoginDatabase.PQuery("SELECT ID, BoostType FROM account_boost_token WHERE AccountID = {} AND UsedGuid = 0", GetAccountId())) + { + do + { + distributions.Distributions.push_back(MakeBoostDistribution((*boosts)[0].GetUInt32(), (*boosts)[1].GetUInt32(), 1)); + } while (boosts->NextRow()); + } + + SendPacket(distributions.Write()); +} + +// a character boost token as the client's distribution: deliverable Type 1, BoostID = boost type (GetUpgradeDistributions, 70058 +// 0x242A220); status 1 = usable +WorldPackets::BattlePay::DistributionObject WorldSession::MakeBoostDistribution(uint32 tokenId, uint32 boostType, int32 status) +{ + WorldPackets::BattlePay::DistributionObject distribution; + distribution.DistributionID = BoostDistributionIdBase + tokenId; + distribution.Status = status; + distribution.DeliverableID = 800000 + boostType; + distribution.PurchaseID = distribution.DistributionID; + WorldPackets::BattlePay::Deliverable& boost = distribution.Product.emplace(); + boost.DeliverableID = distribution.DeliverableID; + boost.Type = 1; + boost.BoostID = int32(boostType); + boost.Name = "Character Boost"; + return distribution; +} + +// boost button used: the character (offline, below the boost level) is raised to the boost level and gets the boost's items by mail +void WorldSession::HandleBattlePayDistributionAssignToTarget(WorldPackets::BattlePay::DistributionAssignToTarget& assign) +{ + WorldPackets::BattlePay::StartDistributionAssignToTargetResponse response; + response.ClientToken = assign.ClientToken; + response.DistributionID = assign.DistributionID; + + uint32 tokenId = assign.DistributionID > BoostDistributionIdBase ? uint32(assign.DistributionID - BoostDistributionIdBase) : 0; + QueryResult token = tokenId ? LoginDatabase.PQuery("SELECT BoostType FROM account_boost_token WHERE ID = {} AND AccountID = {} AND UsedGuid = 0", + tokenId, GetAccountId()) : nullptr; + uint32 boostType = token ? (*token)[0].GetUInt32() : 0; + uint8 boostLevel = boostType == 4 ? 50 : boostType == 8 ? 70 : boostType == 11 ? 80 : 60; // CharacterServiceInfo boost levels + + std::string_view error; + QueryResult character = CharacterDatabase.PQuery("SELECT level, class FROM characters WHERE guid = {} AND account = {} AND deleteDate IS NULL", + assign.TargetCharacter.GetCounter(), GetAccountId()); + if (!token) + error = "no such boost"; + else if (!character) + error = "not your character"; + else if ((*character)[0].GetUInt8() >= boostLevel) + error = "the character is already at that level"; + else if (ObjectAccessor::FindConnectedPlayer(assign.TargetCharacter)) + error = "log out the character first"; + + TC_LOG_INFO("entities.player", "Shop: boost token {} (type {}) for {} by account {}, spec choice {}: {}", tokenId, boostType, + assign.TargetCharacter.ToString(), GetAccountId(), assign.ProductChoice, error.empty() ? "ok" : error); + + if (!error.empty()) + { + response.Result = 1; + SendPacket(response.Write()); + WorldPackets::BattlePay::CharacterUpgradeState aborted(SMSG_CHARACTER_UPGRADE_ABORTED); + aborted.Character = assign.TargetCharacter; + SendPacket(aborted.Write()); + return; + } + + uint8 classId = (*character)[1].GetUInt8(); + LoginDatabase.DirectPExecute("UPDATE account_boost_token SET UsedRealm = {}, UsedGuid = {}, UsedTime = NOW() WHERE ID = {}", + sRealmList->GetCurrentRealmId().Realm, assign.TargetCharacter.GetCounter(), tokenId); + + SendPacket(response.Write()); + + WorldPackets::BattlePay::DistributionUpdate used; + used.Distribution = MakeBoostDistribution(tokenId, boostType, 2); + used.Distribution.Revoked = true; + SendPacket(used.Write()); + + WorldPackets::BattlePay::CharacterUpgradeState started(SMSG_CHARACTER_UPGRADE_STARTED); + started.Character = assign.TargetCharacter; + SendPacket(started.Write()); + + // the character is offline: level in the database (stats, talent points and spells follow at login; spells from trainers) + CharacterDatabase.DirectPExecute("UPDATE characters SET level = {}, xp = 0 WHERE guid = {}", boostLevel, assign.TargetCharacter.GetCounter()); + sCharacterCache->UpdateCharacterLevel(assign.TargetCharacter, boostLevel); + + // the boost's items (world.shop_boost_item) and gold (Classic.Shop.BoostGold) by mail. RandomPropertyID = the "of the X" suffix + // (an ItemBonusList); Item::CreateItem adds none, so it is set here (0 = a random one from the item's pool, if it has one) + struct BoostStack { uint32 ItemId; uint32 Count; uint32 BonusList; }; + std::vector stacks; + if (QueryResult items = WorldDatabase.PQuery("SELECT ItemID, Count, RandomPropertyID FROM shop_boost_item WHERE BoostType = {} AND ClassID IN (0, {})", boostType, classId)) + { + do + { + uint32 itemId = (*items)[0].GetUInt32(); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId); + if (!proto) + continue; + uint32 maxStack = std::max(proto->GetMaxStackSize(), 1); + for (uint32 left = std::max((*items)[1].GetUInt32(), 1); left > 0; left -= std::min(left, maxStack)) + stacks.push_back({ itemId, std::min(left, maxStack), (*items)[2].GetUInt32() }); + } while (items->NextRow()); + } + + uint64 gold = uint64(std::max(sConfigMgr->GetIntDefault("Classic.Shop.BoostGold", 250), 0)) * GOLD; + CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); + for (std::size_t i = 0; i < stacks.size() || (i == 0 && gold); i += MAX_MAIL_ITEMS) + { + MailDraft draft("Character Boost", "Your character has been boosted. Here is your gear."); + if (i == 0 && gold) + draft.AddMoney(gold); + for (std::size_t j = i; j < std::min(stacks.size(), i + MAX_MAIL_ITEMS); ++j) + if (Item* item = Item::CreateItem(stacks[j].ItemId, stacks[j].Count, ItemContext::NONE, nullptr)) + { + if (uint32 bonusList = stacks[j].BonusList ? stacks[j].BonusList : GenerateItemRandomBonusListId(stacks[j].ItemId)) + item->SetItemRandomBonusList(bonusList); + item->SaveToDB(trans); + draft.AddItem(item); + } + draft.SendMailTo(trans, MailReceiver(nullptr, assign.TargetCharacter.GetCounter()), MailSender(MAIL_NORMAL, UI64LIT(0), MAIL_STATIONERY_GM), MAIL_CHECK_MASK_NOT_RETURNABLE); + } + CharacterDatabase.CommitTransaction(trans); + + WorldPackets::BattlePay::CharacterUpgradeState complete(SMSG_CHARACTER_UPGRADE_COMPLETE); + complete.Character = assign.TargetCharacter; + SendPacket(complete.Write()); +} + +// Classic 1.60 character services, work in progress (Classic.Shop.VasTest). The Store's character service window (and the character +// screen's service token) ask for the account's characters and the target realms. For now: the characters of this realm. +void WorldSession::HandleGetVasAccountCharacterList(WorldPackets::BattlePay::GetVasAccountCharacterList& request) +{ + TC_LOG_DEBUG("network", "Shop: VAS character list request {} {}", request.Unknown1, request.Unknown2); + WorldPackets::BattlePay::GetVasAccountCharacterListResult result; + result.ClientToken = request.Unknown1; + result.Unknown = request.Unknown2; + + uint32 realmAddress = sRealmList->GetCurrentRealmId().GetAddress(); + std::shared_ptr realm = sRealmList->GetCurrentRealm(); + if (QueryResult characters = CharacterDatabase.PQuery("SELECT guid, name, race, class, gender, level FROM characters WHERE account = {} AND deleteDate IS NULL ORDER BY name", GetAccountId())) + { + do + { + Field* fields = characters->Fetch(); + WorldPackets::BattlePay::VasCharacter& character = result.Characters.emplace_back(); + character.Guid = ObjectGuid::Create(fields[0].GetUInt64()); + character.WowAccountGuid = ObjectGuid::Create(GetAccountId()); + character.VirtualRealmAddress = realmAddress; + character.Name = fields[1].GetString(); + character.Race = int8(fields[2].GetUInt8()); + character.Class = int8(fields[3].GetUInt8()); + character.Sex = int8(fields[4].GetUInt8()); + character.Level = fields[5].GetUInt8(); + character.RealmName = realm ? realm->Name : ""; + } while (characters->NextRow()); + } + SendPacket(result.Write()); +} + +void WorldSession::HandleGetVasTransferTargetRealmList(WorldPackets::BattlePay::GetVasTransferTargetRealmList& request) +{ + TC_LOG_DEBUG("network", "Shop: VAS target realm list request {} {}", request.Unknown1, request.Unknown2); + WorldPackets::BattlePay::GetVasTransferTargetRealmListResult result; + result.Unknown1 = request.Unknown1; // client token + result.Unknown2 = 0; // result, 0 = ok + result.Unknown3 = request.Unknown2; // the client sends it back in its character list request (15 = character transfer) + Battlenet::RealmHandle current = sRealmList->GetCurrentRealmId(); + if (QueryResult realms = LoginDatabase.PQuery("SELECT id, name FROM realmlist WHERE id <> {} ORDER BY id", current.Realm)) + { + do + { + WorldPackets::BattlePay::VasTransferTargetRealm& realm = result.Realms.emplace_back(); + realm.RealmAddress = Battlenet::RealmHandle(current.Region, current.Site, (*realms)[0].GetUInt32()).GetAddress(); + realm.Name = (*realms)[1].GetString(); + } while (realms->NextRow()); + } + SendPacket(result.Write()); +} + +// target side of a realm transfer: load the dumps addressed to this realm onto the same account (a taken name loads with a +// temporary one and the character renames at login); called at start and every minute (classic_shop_commands.cpp) +void WorldSession::ProcessIncomingCharacterTransfers() +{ + uint32 realmId = sRealmList->GetCurrentRealmId().Realm; + + // the dump loader commits in the background: a load counts as done once the character is really there (status 3 -> 1); + // a rejected one (e.g. a duplicate key) becomes failed, so a GM can retry or return it (the dump stays in the row) + if (QueryResult loaded = LoginDatabase.PQuery("SELECT ID, TargetGuid, Name FROM character_transfer WHERE TargetRealm = {} AND Status = 3", realmId)) + { + do + { + Field* fields = loaded->Fetch(); + bool arrived = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = {}", fields[1].GetUInt64()) != nullptr; + if (arrived) + LoginDatabase.DirectPExecute("UPDATE character_transfer SET Status = 1 WHERE ID = {}", fields[0].GetUInt32()); + else + LoginDatabase.DirectPExecute("UPDATE character_transfer SET Status = 2, Message = 'the character database rejected the character (see DBErrors.log)' WHERE ID = {}", + fields[0].GetUInt32()); + TC_LOG_INFO("entities.player", "Realm transfer {}: {} {}", fields[0].GetUInt32(), fields[2].GetString(), arrived ? "is in the database" : "was NOT saved"); + } while (loaded->NextRow()); + } + + QueryResult result = LoginDatabase.PQuery("SELECT ID, AccountID, Name, Dump FROM character_transfer WHERE TargetRealm = {} AND Status = 0 ORDER BY ID", realmId); + if (!result) + return; + + do + { + Field* fields = result->Fetch(); + uint32 id = fields[0].GetUInt32(); + uint32 accountId = fields[1].GetUInt32(); + std::string name = fields[2].GetString(); + std::string dump = fields[3].GetString(); + + ObjectGuid::LowType newGuid = sObjectMgr->GetGenerator().GetNextAfterMaxUsed(); + + // rows a deleted character left behind under the guid the loader picks would make its whole transaction fail (duplicate key) + static constexpr std::string_view CharacterGuidTables[] = + { + "character_account_data", "character_achievement", "character_achievement_progress", "character_action", "character_aura", + "character_aura_effect", "character_cuf_profiles", "character_declinedname", "character_favorite_auctions", + "character_fishingsteps", "character_glyphs", "character_homebind", "character_inventory", "character_pvp_talent", + "character_queststatus", "character_queststatus_daily", "character_queststatus_monthly", "character_queststatus_objectives", + "character_queststatus_objectives_criteria", "character_queststatus_objectives_criteria_progress", "character_queststatus_rewarded", + "character_queststatus_seasonal", "character_queststatus_weekly", "character_reputation", "character_select_screen_equipment_cache", + "character_skills", "character_spell", "character_spell_charges", "character_spell_cooldown", "character_talent", + "character_equipmentsets", "character_transmog_outfits", + }; + if (!CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = {}", newGuid)) + { + for (std::string_view table : CharacterGuidTables) + CharacterDatabase.DirectPExecute("DELETE FROM `{}` WHERE guid = {}", table, newGuid); + CharacterDatabase.DirectPExecute("DELETE FROM character_currency WHERE CharacterGuid = {}", newGuid); + } + + PlayerDumpReader reader; + DumpReturn loaded = reader.LoadDumpFromString(dump, accountId, name, 0); + if (loaded == DUMP_SUCCESS) + { + LoginDatabase.DirectPExecute("UPDATE character_transfer SET Status = 3, TargetGuid = {}, Finished = NOW() WHERE ID = {}", newGuid, id); + TC_LOG_INFO("entities.player", "Realm transfer {}: {} of account {} loaded as guid {}", id, name, accountId, newGuid); + } + else + { + std::string_view reason = loaded == DUMP_TOO_MANY_CHARS ? "the account has too many characters on this realm" : "the character data could not be loaded"; + LoginDatabase.DirectPExecute("UPDATE character_transfer SET Status = 2, Message = '{}', Finished = NOW() WHERE ID = {}", reason, id); + TC_LOG_ERROR("entities.player", "Realm transfer {}: {} of account {} failed: {}", id, name, accountId, reason); + } + } while (result->NextRow()); +} + +void WorldSession::HandleRequestCharacterGuildFollowInfo(WorldPackets::BattlePay::RequestCharacterGuildFollowInfo& request) +{ + WorldPackets::BattlePay::QueryGuildFollowInfoResponse response; + response.Character = request.Character; + SendPacket(response.Write()); +} + +// character screen Hardcore Character Transfer token used: a free realm transfer of a dead character to the picked ruleset, under +// the same rules as the Store's transfer (auth.character_transfer_rule). The flow sends the same request twice, first to validate +// (which of its flag bits says so is not known): the first one is only checked, an identical second one moves the character. +void WorldSession::HandleBattlePayDistributionAssignVas(WorldPackets::BattlePay::DistributionAssignVas& assign) +{ + TC_LOG_INFO("network", "Shop: transfer token {} for {} to super district {} by account {} (flags {} {} {})", assign.DistributionID, + assign.Character.ToString(), assign.DesiredSuperDistrictID, GetAccountId(), assign.Flags[0], assign.Flags[1], assign.Flags[2]); + + WorldPackets::BattlePay::DistributionAssignVasResponse response; + response.ClientToken = assign.ClientToken; + + // destination ruleset -> its realm + uint32 targetRealm = 0; + if (uint32 contentSet = GetClassicContentSetForSuperDistrict(assign.DesiredSuperDistrictID)) + if (QueryResult realm = LoginDatabase.PQuery("SELECT id FROM realmlist WHERE contentSetId = {} LIMIT 1", contentSet)) + targetRealm = (*realm)[0].GetUInt32(); + Battlenet::RealmHandle current = sRealmList->GetCurrentRealmId(); + uint32 targetAddress = Battlenet::RealmHandle(current.Region, current.Site, targetRealm).GetAddress(); + + std::string_view error; + if (!sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false)) + error = "the shop is closed"; + else if (!targetRealm) + error = "unknown destination"; + else if (!IsLegitCharacterForAccount(assign.Character)) + error = "not your character"; + else + error = CheckCharacterTransfer(GetAccountId(), assign.Character, targetAddress); + + if (!error.empty()) + { + TC_LOG_INFO("network", "Shop: transfer token refused: {}", error); + _hardcoreTransferValidated.reset(); + response.StoreError = 1; + SendPacket(response.Write()); + return; + } + + std::pair request(assign.Character, targetAddress); + if (_hardcoreTransferValidated != request) + { + _hardcoreTransferValidated = request; // validation step + SendPacket(response.Write()); + return; + } + + _hardcoreTransferValidated.reset(); + if (!BeginCharacterTransfer(GetAccountId(), assign.Character, targetAddress)) + response.StoreError = 1; + SendPacket(response.Write()); +} + +// also sent after a purchase, so a sold Gold Market listing leaves the open Store at once +void WorldSession::SendShopProductList() +{ + bool const enabled = sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false); + + WorldPackets::BattlePay::ProductListResponse response; + response.Result = enabled ? 0 : 2; + response.CurrencyID = enabled ? 1 : 0; + + if (enabled) + { + for (auto const& [id, shopGroup] : sObjectMgr->GetShopGroups()) + { + WorldPackets::BattlePay::ProductGroup& group = response.Groups.emplace_back(); + group.GroupID = shopGroup.ID; + group.IconFileDataID = shopGroup.IconFileDataID; + group.Ordering = shopGroup.Ordering; + group.Name = shopGroup.Name; + } + + uint32 deliverableId = 0; + for (auto const& [id, shopProduct] : sObjectMgr->GetShopProducts()) + { + WorldPackets::BattlePay::DisplayInfo display; + display.FileDataID = shopProduct.IconFileDataID; + display.Name1 = shopProduct.Name; + display.Name3 = shopProduct.Description; + + WorldPackets::BattlePay::Product& product = response.Products.emplace_back(); + product.ProductID = shopProduct.ID; + product.CurrentPriceFixedPoint = ShopPriceFixedPoint(shopProduct.Price); + product.NormalPriceFixedPoint = ShopPriceFixedPoint(std::max(shopProduct.NormalPrice, shopProduct.Price)); + // 0x1/0x2 visible/buyable in one client context, 0x4/0x8 in the other (entry info builder 70291 0x2fb9520) + product.Flags = 0x1 | 0x2 | 0x4 | 0x8; + product.Display = display; + // product Type -> character service (70338 0x2E378F0): 15 = CharacterTransfer, Buy Now opens the character / realm window + if (std::ranges::any_of(shopProduct.Actions, [](ShopProductAction const& action) { return action.Action == ShopAction::RealmTransfer; })) + product.Type = 15; + + for (ShopProductAction const& action : shopProduct.Actions) + { + if (action.Action != ShopAction::Item) + continue; + + WorldPackets::BattlePay::Deliverable& deliverable = response.Deliverables.emplace_back(); + deliverable.DeliverableID = ++deliverableId; + deliverable.ItemID = action.Param1; + deliverable.Quantity = action.Param2; + if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(action.Param1)) + deliverable.Name = proto->GetName(GetSessionDbcLocale()); + if (deliverable.Name.size() > 255) + deliverable.Name.resize(255); + product.DeliverableIDs.push_back(deliverable.DeliverableID); + } + + WorldPackets::BattlePay::ShopEntry& entry = response.Entries.emplace_back(); + entry.EntryID = shopProduct.ID; + entry.GroupID = shopProduct.GroupID; + entry.ProductID = shopProduct.ID; + entry.Ordering = shopProduct.Ordering; + entry.Display = display; + } + + // Gold Market: most gold first + if (QueryResult result = CharacterDatabase.PQuery("SELECT ID, SellerAccount, Gold, Price FROM shop_gold_listing ORDER BY Gold DESC, Price ASC, ID ASC LIMIT {}", GoldMarketMaxListings)) + { + WorldPackets::BattlePay::ProductGroup& group = response.Groups.emplace_back(); + group.GroupID = GoldMarketGroupID; + group.IconFileDataID = 133784; + group.Ordering = 1000; + group.Name = "Gold Market"; + + int32 ordering = 0; + do + { + Field* fields = result->Fetch(); + ShopProduct listingProduct = MakeGoldListingProduct({ .ID = fields[0].GetUInt32(), .SellerAccount = fields[1].GetUInt32(), .Gold = fields[2].GetUInt32(), .Price = fields[3].GetUInt32() }); + + WorldPackets::BattlePay::DisplayInfo display; + display.FileDataID = listingProduct.IconFileDataID; + display.Name1 = listingProduct.Name; + display.Name3 = listingProduct.Description; + + WorldPackets::BattlePay::Product& product = response.Products.emplace_back(); + product.ProductID = listingProduct.ID; + product.CurrentPriceFixedPoint = ShopPriceFixedPoint(listingProduct.Price); + product.NormalPriceFixedPoint = product.CurrentPriceFixedPoint; + product.Flags = 0x1 | 0x2 | 0x4 | 0x8; + product.Display = display; + + WorldPackets::BattlePay::ShopEntry& entry = response.Entries.emplace_back(); + entry.EntryID = listingProduct.ID; + entry.GroupID = GoldMarketGroupID; + entry.ProductID = listingProduct.ID; + entry.Ordering = ++ordering; + entry.Display = display; + } while (result->NextRow()); + } + } + + SendPacket(response.Write()); +} + +void WorldSession::HandleBattlePayGetPurchaseList(WorldPackets::Null& /*null*/) +{ + WorldPackets::BattlePay::PurchaseListResponse response; + response.Result = sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false) ? 0 : 2; + SendPacket(response.Write()); +} + +namespace +{ +constexpr int32 ShopPurchaseStatusPending = 9; // waiting for confirmation: C_StoreSecure.PurchaseProductConfirm (70338 0x19cfc70) requires it +constexpr int32 ShopPurchaseStatusFinished = 6; // HasPurchaseInProgress (70291 0x1af9ed0) treats 6 as done +constexpr int32 ShopPurchaseResultError = 1; + +uint32 GetShopPoints(uint32 accountId) +{ + if (QueryResult result = LoginDatabase.PQuery("SELECT Points FROM account_shop_points WHERE AccountID = {}", accountId)) + return (*result)[0].GetUInt32(); + return 0; +} + +WorldPackets::BattlePay::Purchase MakeShopPurchase(uint64 purchaseId, ShopProduct const& product, int32 status, int32 result, int64 timeCreated, uint32 points) +{ + WorldPackets::BattlePay::Purchase purchase; + purchase.PurchaseID = purchaseId; + purchase.Status = status; + purchase.ResultCode = result; + purchase.ProductID = product.ID; + purchase.BasePrice = ShopPriceFixedPoint(product.Price); + purchase.UserPrice = ShopPriceFixedPoint(product.Price); + purchase.TimeCreated = timeCreated; + purchase.WalletName = Trinity::StringFormat("Shop points: {}", points); + return purchase; +} + +// realm transfer rules (auth.character_transfer_rule, support site Shop admin -> Transfers): a transfer needs its row +std::string_view CheckCharacterTransfer(uint32 accountId, ObjectGuid character, uint32 destinationRealmAddress) +{ + uint32 sourceRealm = sRealmList->GetCurrentRealmId().Realm; + uint32 targetRealm = Battlenet::RealmHandle(destinationRealmAddress).Realm; + if (targetRealm == sourceRealm) + return "the character is already on that realm"; + if (!LoginDatabase.PQuery("SELECT 1 FROM realmlist WHERE id = {}", targetRealm)) + return "unknown realm"; + if (ObjectAccessor::FindConnectedPlayer(character)) + return "log out the character first"; + + { + QueryResult rule = LoginDatabase.PQuery("SELECT DeadOnly FROM character_transfer_rule WHERE SourceRealm = {} AND TargetRealm = {}", sourceRealm, targetRealm); + if (!rule) + return "characters of this realm can not move to that realm"; + if ((*rule)[0].GetUInt8()) + { + // dead: released (ghost) or still lying dead (no health) + QueryResult state = CharacterDatabase.PQuery("SELECT playerFlags, health FROM characters WHERE guid = {}", character.GetCounter()); + if (!state || (!((*state)[0].GetUInt32() & PLAYER_FLAGS_GHOST) && (*state)[1].GetUInt32() != 0)) + return "only characters that died can move to that realm"; + } + } + + if (LoginDatabase.PQuery("SELECT 1 FROM character_transfer WHERE AccountID = {} AND SourceRealm = {} AND SourceGuid = {} AND Status = 0", accountId, sourceRealm, character.GetCounter())) + return "this character is already being transferred"; + return {}; +} + +// source side of a realm transfer: the character's dump goes to auth.character_transfer for the target realm, then the character +// is removed here. Returns false (and nothing changed) when the dump can not be written. +bool BeginCharacterTransfer(uint32 accountId, ObjectGuid character, uint32 destinationRealmAddress) +{ + std::string dump; + PlayerDumpWriter writer; + if (writer.WriteDumpToString(dump, character.GetCounter()) != DUMP_SUCCESS) + return false; + + std::string name; + sCharacterCache->GetCharacterNameByGuid(character, name); + std::string escapedDump = dump; + LoginDatabase.EscapeString(escapedDump); + std::string escapedName = name; + LoginDatabase.EscapeString(escapedName); + LoginDatabase.DirectExecute(Trinity::StringFormat("INSERT INTO character_transfer (AccountID, SourceRealm, SourceGuid, TargetRealm, Name, Dump) " + "VALUES ({}, {}, {}, {}, '{}', '{}')", accountId, sRealmList->GetCurrentRealmId().Realm, character.GetCounter(), + Battlenet::RealmHandle(destinationRealmAddress).Realm, escapedName, escapedDump).c_str()); + + Player::DeleteFromDB(character, accountId, true, true); + TC_LOG_INFO("entities.player", "Realm transfer: {} ({}) of account {} left for realm address {:X}", name, character.ToString(), accountId, destinationRealmAddress); + return true; +} + +AtLoginFlags GetShopServiceFlag(int32 service) +{ + switch (ShopService(service)) + { + case ShopService::Rename: return AT_LOGIN_RENAME; + case ShopService::Customize: return AT_LOGIN_CUSTOMIZE; + case ShopService::RaceChange: return AT_LOGIN_CHANGE_RACE; + case ShopService::FactionChange: return AT_LOGIN_CHANGE_FACTION; + default: return AT_LOGIN_NONE; + } +} + +// checked before the confirmation, so nothing is charged for a product that cannot be applied; player is null at character select +std::string_view CheckShopProduct(ShopProduct const& product, Player const* player) +{ + if (product.InGameOnly && !player) + return "log in with the character to buy this"; + + if (!player) + return {}; + + for (ShopProductAction const& action : product.Actions) + { + switch (action.Action) + { + case ShopAction::Spell: + if (player->HasSpell(action.Param1)) + return "this character already knows it"; + break; + case ShopAction::Service: + if ((ShopService(action.Param1) == ShopService::RaceChange || ShopService(action.Param1) == ShopService::FactionChange) && player->GetLevel() < 10) + return "the character must be level 10"; + break; + case ShopAction::Profession: + // only raises a profession the character already has (primary or secondary), it never takes a profession slot + if (!player->HasSkill(action.Param1)) + return "the character must learn this profession first"; + break; + case ShopAction::Level: + if (player->GetLevel() >= action.Param1) + return "the character is already at that level"; + break; + case ShopAction::Title: + if (player->HasTitle(sCharTitlesStore.LookupEntry(action.Param1))) + return "this character already has the title"; + break; + default: + break; + } + } + return {}; +} + +// items are mailed to target, boost tokens go to the account; everything else is applied to player (in game only, see CheckShopProduct) +void ApplyShopProduct(ShopProduct const& product, Player* player, ObjectGuid target, uint32 accountId) +{ + for (ShopProductAction const& action : product.Actions) + if (action.Action == ShopAction::BoostToken) + LoginDatabase.DirectPExecute("INSERT INTO account_boost_token (AccountID, BoostType, Source) VALUES ({}, {}, 'shop product {}')", + accountId, action.Param1, product.ID); + + // items by mail, MAX_MAIL_ITEMS per mail + std::vector> stacks; + for (ShopProductAction const& action : product.Actions) + { + if (action.Action != ShopAction::Item) + continue; + + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(action.Param1); + uint32 maxStack = proto ? std::max(proto->GetMaxStackSize(), 1) : 1; + for (uint32 left = action.Param2; left > 0; left -= std::min(left, maxStack)) + stacks.emplace_back(action.Param1, std::min(left, maxStack)); + } + + if (!stacks.empty()) + { + Player* receiver = ObjectAccessor::FindConnectedPlayer(target); + CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); + for (std::size_t i = 0; i < stacks.size(); i += MAX_MAIL_ITEMS) + { + MailDraft draft("Shop purchase", Trinity::StringFormat("Thank you for buying {}.", product.Name)); + for (std::size_t j = i; j < std::min(stacks.size(), i + MAX_MAIL_ITEMS); ++j) + { + if (Item* item = Item::CreateItem(stacks[j].first, stacks[j].second, ItemContext::NONE, receiver)) + { + if (uint32 bonusList = GenerateItemRandomBonusListId(stacks[j].first)) // "of the X" items get a suffix like a drop would + item->SetItemRandomBonusList(bonusList); + item->SaveToDB(trans); + draft.AddItem(item); + } + } + draft.SendMailTo(trans, MailReceiver(receiver, target.GetCounter()), MailSender(MAIL_NORMAL, UI64LIT(0), MAIL_STATIONERY_GM), MAIL_CHECK_MASK_NOT_RETURNABLE); + } + CharacterDatabase.CommitTransaction(trans); + } + + if (!player) + return; + + for (ShopProductAction const& action : product.Actions) + { + switch (action.Action) + { + case ShopAction::Gold: + player->ModifyMoney(action.Param1); + break; + case ShopAction::Spell: + player->LearnSpell(action.Param1, false); + break; + case ShopAction::Service: + { + AtLoginFlags flag = GetShopServiceFlag(action.Param1); + player->SetAtLoginFlag(flag); + CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); + stmt->setUInt16(0, uint16(flag)); + stmt->setUInt64(1, player->GetGUID().GetCounter()); + CharacterDatabase.Execute(stmt); + break; + } + case ShopAction::Profession: + { + // every recipe of the profession this race and class can learn (both specializations included) + uint32 skill = action.Param1; + if (std::vector const* abilities = sDB2Manager.GetSkillLineAbilitiesBySkill(skill)) + { + for (SkillLineAbilityEntry const* ability : *abilities) + { + if (ability->ClassMask && !(ability->ClassMask & player->GetClassMask())) + continue; + if (!ability->RaceMask.IsEmpty() && !ability->RaceMask.HasRace(player->GetRace())) + continue; + if (!sSpellMgr->GetSpellInfo(ability->Spell, DIFFICULTY_NONE) || player->HasSpell(ability->Spell)) + continue; + player->LearnSpell(ability->Spell, false, skill, true); + } + } + uint16 value = uint16(action.Param2); + player->SetSkill(skill, std::max(player->GetSkillStep(skill), std::max(value / 75, 1)), value, value); + break; + } + case ShopAction::Level: + player->GiveLevel(uint8(action.Param1)); + player->SetXP(0); + break; + case ShopAction::Title: + player->SetTitle(sCharTitlesStore.LookupEntry(action.Param1)); + break; + case ShopAction::Reputation: + player->SetReputation(action.Param1, action.Param2); + break; + default: + break; + } + } +} +} + +// Buy Now: answer with a purchase id, the purchase itself (the confirmation reads product, price and wallet name from it) and +// the confirmation request. Points are checked here and taken in the confirmation response. +void WorldSession::HandleBattlePayStartPurchase(WorldPackets::BattlePay::StartPurchase& startPurchase) +{ + // the client sends no target (also at character select): in game the player, at character select the last played character + ObjectGuid target = _player ? _player->GetGUID() : startPurchase.TargetCharacter; + if (target.IsEmpty()) + if (QueryResult result = CharacterDatabase.PQuery("SELECT guid FROM characters WHERE account = {} AND deleteDate IS NULL ORDER BY logout_time DESC LIMIT 1", GetAccountId())) + target = ObjectGuid::Create((*result)[0].GetUInt64()); + + StartShopPurchase(startPurchase.ClientToken, startPurchase.ProductID, target, 0); +} + +// the character service window (product Type 15, realm transfer): the same purchase steps, for the picked character and realm +void WorldSession::HandleBattlePayStartVasPurchase(WorldPackets::BattlePay::StartVasPurchase& startVasPurchase) +{ + TC_LOG_INFO("network", "Shop: account {} asks for product {} for {} to realm address {:X}", GetAccountId(), startVasPurchase.ProductID, + startVasPurchase.Character.ToString(), startVasPurchase.DestinationRealmAddress); + StartShopPurchase(startVasPurchase.ClientToken, startVasPurchase.ProductID, startVasPurchase.Character, startVasPurchase.DestinationRealmAddress); +} + +void WorldSession::StartShopPurchase(uint32 clientToken, uint32 productId, ObjectGuid target, uint32 transferRealmAddress) +{ + static std::atomic nextPurchaseId{ uint64(GameTime::GetGameTime()) << 16 }; + + WorldPackets::BattlePay::StartPurchaseResponse response; + response.ClientToken = clientToken; + response.PurchaseID = ++nextPurchaseId; + + Optional listingProduct; + Optional listing; + ShopProduct const* product = FindShopProduct(productId, listingProduct, listing); + uint32 points = GetShopPoints(GetAccountId()); + bool const isTransfer = product && std::ranges::any_of(product->Actions, [](ShopProductAction const& action) { return action.Action == ShopAction::RealmTransfer; }); + + std::string_view error; + if (!sConfigMgr->GetBoolDefault("Classic.Shop.Enabled", false) || !product) + error = "the product is not available"; + else if (target.IsEmpty() || !IsLegitCharacterForAccount(target)) + error = "no character selected"; + else if (points < product->Price) + error = "not enough shop points"; + else if (listing && listing->SellerAccount == GetAccountId()) + error = "this is your own listing"; + else if (isTransfer != (transferRealmAddress != 0)) + error = "pick the character and the realm in the transfer window"; + else if (isTransfer) + error = CheckCharacterTransfer(GetAccountId(), target, transferRealmAddress); + else + error = CheckShopProduct(*product, _player); + + if (!error.empty()) + { + TC_LOG_DEBUG("network", "Shop: account {} could not buy product {}: {} (points {})", GetAccountId(), productId, error, points); + if (_player) + ChatHandler(this).SendSysMessage(Trinity::StringFormat("Shop: {} (you have {} points, the price is {}).", error, points, product ? product->Price : 0)); + // purchase id 0: the client raises the purchase error; any other id makes it wait for a confirmation ("Connecting to Shop") + response.PurchaseResult = ShopPurchaseResultError; + response.PurchaseID = 0; + SendPacket(response.Write()); + return; + } + + ShopPendingPurchase& pending = _shopPendingPurchase.emplace(); + pending.PurchaseID = response.PurchaseID; + pending.ProductID = product->ID; + pending.ServerToken = urand(1, std::numeric_limits::max()); + pending.Target = target; + pending.TimeCreated = GameTime::GetGameTime(); + pending.TransferRealmAddress = transferRealmAddress; + + SendPacket(response.Write()); + + WorldPackets::BattlePay::PurchaseUpdate update; + update.Purchases.push_back(MakeShopPurchase(pending.PurchaseID, *product, ShopPurchaseStatusPending, 0, pending.TimeCreated, points)); + SendPacket(update.Write()); + + WorldPackets::BattlePay::ConfirmPurchase confirm; + confirm.PurchaseID = pending.PurchaseID; + confirm.ServerToken = pending.ServerToken; + SendPacket(confirm.Write()); +} + +void WorldSession::HandleBattlePayConfirmPurchaseResponse(WorldPackets::BattlePay::ConfirmPurchaseResponse& confirmPurchaseResponse) +{ + if (!_shopPendingPurchase || _shopPendingPurchase->ServerToken != confirmPurchaseResponse.ServerToken) + return; + + ShopPendingPurchase pending = *_shopPendingPurchase; + _shopPendingPurchase.reset(); + + Optional listingProduct; + Optional listing; + ShopProduct const* product = FindShopProduct(pending.ProductID, listingProduct, listing); + + uint32 points = GetShopPoints(GetAccountId()); + if (!product) + { + // removed meanwhile (a Gold Market listing someone else bought): end the purchase with an error + ShopProduct gone; + gone.ID = pending.ProductID; + if (_player && confirmPurchaseResponse.ConfirmPurchase) + ChatHandler(this).SendSysMessage("Shop: this offer is no longer available."); + WorldPackets::BattlePay::PurchaseUpdate update; + update.Purchases.push_back(MakeShopPurchase(pending.PurchaseID, gone, ShopPurchaseStatusFinished, + confirmPurchaseResponse.ConfirmPurchase ? ShopPurchaseResultError : 0, pending.TimeCreated, points)); + SendPacket(update.Write()); + SendShopProductList(); + return; + } + + int32 result = 0; + if (confirmPurchaseResponse.ConfirmPurchase) + { + // the player can not have changed character (in game -> character select logs out), but recheck what can change meanwhile + if (points < product->Price || !IsLegitCharacterForAccount(pending.Target) + || !(pending.TransferRealmAddress ? CheckCharacterTransfer(GetAccountId(), pending.Target, pending.TransferRealmAddress) : CheckShopProduct(*product, _player)).empty()) + result = ShopPurchaseResultError; + // the transfer goes first: if the character can not be written out, nothing is charged + else if (pending.TransferRealmAddress && !BeginCharacterTransfer(GetAccountId(), pending.Target, pending.TransferRealmAddress)) + result = ShopPurchaseResultError; + else + { + if (listing) + { + // Gold Market: the listing is gone once bought; the seller's account gets the price minus the fee + CharacterDatabase.DirectPExecute("DELETE FROM shop_gold_listing WHERE ID = {}", listing->ID); + // fee percent from auth.shop_config (support site GM part), else the config; at least 1 point while the percent is not 0 + int32 feePercent = sConfigMgr->GetIntDefault("Classic.Shop.GoldMarketFee", 10); + if (QueryResult feeResult = LoginDatabase.Query("SELECT Value FROM shop_config WHERE Name = 'GoldMarketFee'")) + feePercent = Trinity::StringTo((*feeResult)[0].GetStringView()).value_or(feePercent); + feePercent = std::clamp(feePercent, 0, 100); + uint32 fee = uint32(uint64(listing->Price) * feePercent / 100); + if (feePercent && !fee) + fee = 1; + if (listing->SellerAccount && listing->Price > fee) + LoginDatabase.PExecute("INSERT INTO account_shop_points (AccountID, Points) VALUES ({0}, {1}) ON DUPLICATE KEY UPDATE Points = Points + {1}", + listing->SellerAccount, listing->Price - fee); + TC_LOG_INFO("entities.player", "Shop: Gold Market listing {} ({} gold, {} points, fee {}) of account {} sold to account {}", + listing->ID, listing->Gold, listing->Price, fee, listing->SellerAccount, GetAccountId()); + } + + LoginDatabase.DirectPExecute("UPDATE account_shop_points SET Points = Points - {} WHERE AccountID = {} AND Points >= {}", + product->Price, GetAccountId(), product->Price); + LoginDatabase.PExecute("INSERT INTO shop_purchase_log (AccountID, ProductID, Price, CharacterGUID) VALUES ({}, {}, {}, {})", + GetAccountId(), product->ID, product->Price, pending.Target.GetCounter()); + points -= product->Price; + + ApplyShopProduct(*product, _player, pending.Target, GetAccountId()); + if (std::ranges::any_of(product->Actions, [](ShopProductAction const& action) { return action.Action == ShopAction::BoostToken; })) + SendShopDistributionList(); // the new boost button on the character screen + + TC_LOG_INFO("entities.player", "Shop: account {} bought product {} ({}) for {} points for {}", GetAccountId(), product->ID, product->Name, product->Price, pending.Target.ToString()); + if (_player) + ChatHandler(this).SendSysMessage(Trinity::StringFormat("Shop: thank you for buying {}. You have {} points left.", product->Name, points)); + } + } + + WorldPackets::BattlePay::PurchaseUpdate update; + update.Purchases.push_back(MakeShopPurchase(pending.PurchaseID, *product, ShopPurchaseStatusFinished, result, pending.TimeCreated, points)); + SendPacket(update.Write()); + + if (listing) + SendShopProductList(); + + // realm transfer done: the character service window's "complete" screen (one per purchase), and the character list without it + if (pending.TransferRealmAddress && confirmPurchaseResponse.ConfirmPurchase && !result) + { + WorldPackets::BattlePay::VasPurchaseComplete complete; + complete.ProductID = product->ID; + complete.Character = pending.Target; + complete.DestinationRealmAddress = pending.TransferRealmAddress; + if (QueryResult realm = LoginDatabase.PQuery("SELECT name FROM realmlist WHERE id = {}", Battlenet::RealmHandle(pending.TransferRealmAddress).Realm)) + complete.RealmName = (*realm)[0].GetString(); + SendPacket(complete.Write()); + } +} diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp index 60e59e54ed..b6d12d912f 100644 --- a/src/server/game/Server/Packets/CharacterPackets.cpp +++ b/src/server/game/Server/Packets/CharacterPackets.cpp @@ -245,7 +245,9 @@ ByteBuffer& operator<<(ByteBuffer& data, EnumCharactersResult::CharacterInfoBasi for (EnumCharactersResult::CharacterInfoBasic::VisualItemInfo const& visualItem : charInfo.VisualItems) data << visualItem; - data << int32(charInfo.SaveVersion); + // Classic 1.60: the client wants a character to be logged in once before a character service while this is below 49 + // (GetServiceCharacterInfo().characterServiceRequiresLogin, 70058 0x2402F4F: "Please log into the game with this character") + data << int32(std::max(charInfo.SaveVersion, 49)); data << charInfo.CreateTime; data << charInfo.LastActiveTime; data << int32(charInfo.LastLoginVersion); @@ -539,23 +541,30 @@ void CharacterRenameRequest::Read() { RenameInfo = std::make_shared(); + // Classic 1.60: 6 bit surname length after the name length, surname after the name (captured: 01e00e180108 | 14 20 | "Hunty" "fd") _worldPacket >> RenameInfo->Guid; _worldPacket >> SizedString::BitsSize<6>(RenameInfo->NewName); + _worldPacket >> SizedString::BitsSize<6>(RenameInfo->NewSurname); _worldPacket >> SizedString::Data(RenameInfo->NewName); + _worldPacket >> SizedString::Data(RenameInfo->NewSurname); } WorldPacket const* CharacterRenameResult::Write() { + // Classic 1.60: 6 bit surname length after the name length, surname after the name (like the request; without it the + // client shows "rename failed" for a successful rename) _worldPacket << uint32(Result); _worldPacket << OptionalInit(Guid); _worldPacket << SizedString::BitsSize<6>(Name); + _worldPacket << SizedString::BitsSize<6>(Surname); _worldPacket.FlushBits(); if (Guid) _worldPacket << *Guid; _worldPacket << SizedString::Data(Name); + _worldPacket << SizedString::Data(Surname); return &_worldPacket; } @@ -570,8 +579,14 @@ void CharCustomize::Read() for (ChrCustomizationChoice& customization : CustomizeInfo->Customizations) _worldPacket >> customization; + // Classic 1.60: 6 bit name length, 3 unknown bits, 6 bit surname length (like CheckCharacterNameAvailability), surname after + // the name (captured: ... | 14 04 | "Hello" "ff") _worldPacket >> SizedString::BitsSize<6>(CustomizeInfo->CharName); + _worldPacket.ReadBits(3); + _worldPacket >> SizedString::BitsSize<6>(CustomizeInfo->CharSurname); + _worldPacket.ResetBitPos(); _worldPacket >> SizedString::Data(CustomizeInfo->CharName); + _worldPacket >> SizedString::Data(CustomizeInfo->CharSurname); SortCustomizations(CustomizeInfo->Customizations); } @@ -582,6 +597,7 @@ CharCustomizeSuccess::CharCustomizeSuccess(CharCustomizeInfo const* info) CharGUID = info->CharGUID; SexID = info->SexID; CharName = info->CharName; + CharSurname = info->CharSurname; } WorldPacket const* CharCustomizeSuccess::Write() @@ -592,10 +608,13 @@ WorldPacket const* CharCustomizeSuccess::Write() for (ChrCustomizationChoice customization : Customizations) _worldPacket << customization; + // Classic 1.60: surname length and data after the name, as in SMSG_CHARACTER_RENAME_RESULT (not captured yet) _worldPacket << SizedString::BitsSize<6>(CharName); + _worldPacket << SizedString::BitsSize<6>(CharSurname); _worldPacket.FlushBits(); _worldPacket << SizedString::Data(CharName); + _worldPacket << SizedString::Data(CharSurname); return &_worldPacket; } @@ -612,14 +631,20 @@ void CharRaceOrFactionChange::Read() { RaceOrFactionChangeInfo = std::make_shared(); + // Classic 1.60: 3 unknown bits and a 6 bit surname length after the name length, surname after the name + // (captured: 8a 02 | guid | 01 08 5f | 07000000 | "Hello" "ff" | 7 customizations) _worldPacket >> Bits<1>(RaceOrFactionChangeInfo->FactionChange); _worldPacket >> SizedString::BitsSize<6>(RaceOrFactionChangeInfo->Name); + _worldPacket.ReadBits(3); + _worldPacket >> SizedString::BitsSize<6>(RaceOrFactionChangeInfo->Surname); + _worldPacket.ResetBitPos(); _worldPacket >> RaceOrFactionChangeInfo->Guid; _worldPacket >> RaceOrFactionChangeInfo->SexID; _worldPacket >> RaceOrFactionChangeInfo->RaceID; _worldPacket >> RaceOrFactionChangeInfo->InitialRaceID; _worldPacket >> Size(RaceOrFactionChangeInfo->Customizations); _worldPacket >> SizedString::Data(RaceOrFactionChangeInfo->Name); + _worldPacket >> SizedString::Data(RaceOrFactionChangeInfo->Surname); for (ChrCustomizationChoice& customization : RaceOrFactionChangeInfo->Customizations) _worldPacket >> customization; @@ -635,11 +660,15 @@ WorldPacket const* CharFactionChangeResult::Write() if (Display) { + // Classic 1.60: surname length and data after the name, as in SMSG_CHARACTER_RENAME_RESULT (not captured yet) _worldPacket << SizedString::BitsSize<6>(Display->Name); + _worldPacket << SizedString::BitsSize<6>(Display->Surname); + _worldPacket.FlushBits(); _worldPacket << uint8(Display->SexID); _worldPacket << uint8(Display->RaceID); _worldPacket << Size(*Display->Customizations); _worldPacket << SizedString::Data(Display->Name); + _worldPacket << SizedString::Data(Display->Surname); for (ChrCustomizationChoice customization : *Display->Customizations) _worldPacket << customization; } diff --git a/src/server/game/Server/Packets/CharacterPackets.h b/src/server/game/Server/Packets/CharacterPackets.h index 9c23aa7287..39dbd0159b 100644 --- a/src/server/game/Server/Packets/CharacterPackets.h +++ b/src/server/game/Server/Packets/CharacterPackets.h @@ -76,6 +76,7 @@ namespace WorldPackets struct CharacterRenameInfo { std::string NewName; + std::string NewSurname; // Classic 1.60 ObjectGuid Guid; }; @@ -84,6 +85,7 @@ namespace WorldPackets ObjectGuid CharGUID; uint8 SexID = GENDER_NONE; std::string CharName; + std::string CharSurname; // Classic 1.60 Array Customizations; }; @@ -95,6 +97,7 @@ namespace WorldPackets ObjectGuid Guid; bool FactionChange = false; std::string Name; + std::string Surname; // Classic 1.60 Array Customizations; }; @@ -401,6 +404,7 @@ namespace WorldPackets WorldPacket const* Write() override; std::string Name; + std::string Surname; // Classic 1.60 uint32 Result = 0; Optional Guid; }; @@ -434,6 +438,7 @@ namespace WorldPackets ObjectGuid CharGUID; std::string CharName; + std::string CharSurname; // Classic 1.60 uint8 SexID = 0; Array const& Customizations; }; @@ -474,6 +479,7 @@ namespace WorldPackets struct CharFactionChangeDisplayInfo { std::string Name; + std::string Surname; // Classic 1.60 uint8 SexID = 0; uint8 RaceID = RACE_NONE; Array const* Customizations = nullptr; diff --git a/src/server/game/Server/Packets/GuildPackets.cpp b/src/server/game/Server/Packets/GuildPackets.cpp index 301d1484ef..0075920bc2 100644 --- a/src/server/game/Server/Packets/GuildPackets.cpp +++ b/src/server/game/Server/Packets/GuildPackets.cpp @@ -17,6 +17,7 @@ #include "GuildPackets.h" #include "CharacterCache.h" +#include "ClassicOpcodes.h" #include "PacketOperators.h" namespace WorldPackets::Guild @@ -92,6 +93,10 @@ ByteBuffer& operator<<(ByteBuffer& data, GuildRosterMemberData const& rosterMemb data << rosterMemberData.DungeonScore; data << uint64(rosterMemberData.GuildClubMemberID); data << uint8(rosterMemberData.RaceID); + // Classic 1.60.1.70291+: a new u64 after RaceID (member reader 70291 0xA36700, meaning unknown); without it the client reads + // the rest 8 bytes off and fails BC_ASSERT(n < N) (n 402, N 257) on the surname length as soon as a roster arrives + if (ClassicOpcodes::IsBuild70291OrLater()) + data << uint64(0); data << int32(rosterMemberData.TimerunningSeasonID); // Classic 1.60 (member reader rva 0x8F5C10 in 70058): the surname (9 bit length) follows the name diff --git a/src/server/game/Server/Packets/SystemPackets.cpp b/src/server/game/Server/Packets/SystemPackets.cpp index 29a42ec48e..1f5dca0953 100644 --- a/src/server/game/Server/Packets/SystemPackets.cpp +++ b/src/server/game/Server/Packets/SystemPackets.cpp @@ -249,7 +249,13 @@ WorldPacket const* FeatureSystemStatusGlueScreen::Write() // WoW Classic 1.60.1.70009 layout, from the client's reader (0x7F9E70): 6 bytes of flags (their order differs from retail and is not // mapped yet, so all flags are sent as off), no KioskSessionDurationMinutes, array elements directly after the counts. // Retail flags misread by the Classic client enabled the Timerunning (Remix) UI and disabled character creation. - for (int32 i = 0; i < 6; ++i) + // Bit 0 (MSB of the first byte) is BpayStoreAvailable like retail: the glue handler (70058 0x23e2be0) copies it to the + // byte C_StoreSecure.IsAvailable() returns, so without it the Store says "unavailable" at character select. + // Not set: in the 70058 decoder bit 41 (byte 5, 0x40; message +0x169) is C_RealmList.ShouldShowRealmsAsCheatButton() (the nav + // bar's Realms button that CharacterSelectNavBar.lua:391 expects during a character service flow), but on 70338 0x40 showed no + // button and crashed the client at the next realm login: ASSERTSAFE(isRuleActive) in PremadeGroupFinderStyleUtils.cpp:23. + _worldPacket << uint8(BpayStoreAvailable ? 0x80 : 0x00); + for (int32 i = 1; i < 6; ++i) _worldPacket << uint8(0); _worldPacket << uint32(CommercePricePollTimeSeconds); diff --git a/src/server/game/Server/Packets/TokenPackets.cpp b/src/server/game/Server/Packets/TokenPackets.cpp index 2d94b84942..495ad1fd31 100644 --- a/src/server/game/Server/Packets/TokenPackets.cpp +++ b/src/server/game/Server/Packets/TokenPackets.cpp @@ -57,3 +57,473 @@ WorldPacket const* CommerceTokenGetMarketPriceResponse::Write() return &_worldPacket; } } + +namespace WorldPackets::BattlePay +{ +// strings are sent without terminator; bits are flushed at the end of each struct's bit block +static ByteBuffer& operator<<(ByteBuffer& data, DisplayInfo const& displayInfo) +{ + data << OptionalInit(displayInfo.FileDataID); + data << OptionalInit(displayInfo.ModelSceneID); + data << SizedString::BitsSize<10>(displayInfo.Name1); + data << SizedString::BitsSize<10>(displayInfo.Name2); + data << SizedString::BitsSize<13>(displayInfo.Name3); + data << SizedString::BitsSize<13>(displayInfo.Tooltip); + data << SizedString::BitsSize<13>(displayInfo.Instructions); + data << OptionalInit(displayInfo.Flags); + data << OptionalInit(displayInfo.OverrideTextColor); + data << OptionalInit(displayInfo.OverrideTexture); + data << OptionalInit(displayInfo.OverrideBackground); + data << SizedString::BitsSize<13>(displayInfo.Disclaimer); + data << SizedString::BitsSize<12>(displayInfo.NydusLink); + data.FlushBits(); + + data << Size(displayInfo.Cards); + data << int32(displayInfo.CardType); + data << int32(displayInfo.BannerType); + data << int32(displayInfo.ItemQuantity); + if (displayInfo.FileDataID) + data << uint32(*displayInfo.FileDataID); + if (displayInfo.ModelSceneID) + data << uint32(*displayInfo.ModelSceneID); + data << SizedString::Data(displayInfo.Name1); + data << SizedString::Data(displayInfo.Name2); + data << SizedString::Data(displayInfo.Name3); + data << SizedString::Data(displayInfo.Tooltip); + data << SizedString::Data(displayInfo.Instructions); + if (displayInfo.Flags) + data << uint32(*displayInfo.Flags); + if (displayInfo.OverrideTextColor) + data << uint32(*displayInfo.OverrideTextColor); + if (displayInfo.OverrideTexture) + data << uint32(*displayInfo.OverrideTexture); + if (displayInfo.OverrideBackground) + data << uint32(*displayInfo.OverrideBackground); + data << SizedString::Data(displayInfo.Disclaimer); + data << SizedString::Data(displayInfo.NydusLink); + + for (DisplayCard const& card : displayInfo.Cards) + { + data << SizedString::BitsSize<10>(card.Title); + data.FlushBits(); + data << uint32(card.CreatureDisplayInfoID); + data << uint32(card.ModelSceneID); + data << uint32(card.TransmogSetID); + data << SizedString::Data(card.Title); + } + + return data; +} + +static ByteBuffer& operator<<(ByteBuffer& data, Deliverable const& deliverable) +{ + data << uint32(deliverable.DeliverableID); + data << int32(deliverable.Type); + data << uint32(deliverable.ItemID); + data << uint32(deliverable.Quantity); + data << uint32(deliverable.MountSpellID); + data << uint32(deliverable.BattlePetCreatureID); + data << int32(deliverable.BoostID); + data << int32(deliverable.Flags); + data << uint32(deliverable.TransmogItemModifiedAppearanceID); + data << uint32(deliverable.TransmogSetID); + data << uint32(deliverable.CharTitleID); + data << uint32(deliverable.SpellItemEnchantmentID); + data << uint32(deliverable.WarbandSceneID); + data << SizedString::BitsSize<8>(deliverable.Name); + data << Bits<1>(deliverable.AlreadyOwns); + data << Bits<1>(false); // HasPetResult + data << Bits<7>(0); // Choices + data << OptionalInit(deliverable.Display); + data.FlushBits(); + + data << SizedString::Data(deliverable.Name); + if (deliverable.Display) + data << *deliverable.Display; + + return data; +} + +static ByteBuffer& operator<<(ByteBuffer& data, Product const& product) +{ + // reader 70338 0x91b440 + data << uint32(product.ProductID); + data << uint64(product.NormalPriceFixedPoint); + data << uint64(product.CurrentPriceFixedPoint); + data << Size(product.DeliverableIDs); + data << int32(product.Type); + data << int32(product.Flags); + data << uint32(product.RequiredDeliverableID); + data << Size(product.BundledProductIDs); + data << int32(product.Eligibility); + data << uint64(product.PmtProductID); + for (uint32 deliverableID : product.DeliverableIDs) + data << uint32(deliverableID); + for (uint32 productID : product.BundledProductIDs) + data << uint32(productID); + + data << OptionalInit(product.Display); + data.FlushBits(); + if (product.Display) + data << *product.Display; + + return data; +} + +static ByteBuffer& operator<<(ByteBuffer& data, ProductGroup const& group) +{ + data << uint32(group.GroupID); + data << int32(group.IconFileDataID); + data << uint8(group.DisplayType); + data << int32(group.Ordering); + data << int32(group.Flags); + data << uint32(group.ParentGroupID); + data << SizedString::BitsSize<8>(group.Name); + data.WriteBits(group.DisabledDescription.empty() ? 0 : group.DisabledDescription.length() + 1, 24); + data.FlushBits(); + + data << SizedString::Data(group.Name); + if (!group.DisabledDescription.empty()) + { + data << SizedString::Data(group.DisabledDescription); + data << uint8(0); + } + + return data; +} + +static ByteBuffer& operator<<(ByteBuffer& data, ShopEntry const& entry) +{ + data << uint32(entry.EntryID); + data << uint32(entry.GroupID); + data << uint32(entry.ProductID); + data << int32(entry.Ordering); + data << int32(entry.Flags); + data << uint8(entry.BannerType); + data << OptionalInit(entry.Display); + data.FlushBits(); + + if (entry.Display) + data << *entry.Display; + + return data; +} + +WorldPacket const* ProductListResponse::Write() +{ + _worldPacket << int32(Result); + _worldPacket << uint32(CurrencyID); + _worldPacket << Size(Products); + _worldPacket << Size(Deliverables); + _worldPacket << Size(Groups); + _worldPacket << Size(Entries); + + for (Product const& product : Products) + _worldPacket << product; + for (Deliverable const& deliverable : Deliverables) + _worldPacket << deliverable; + for (ProductGroup const& group : Groups) + _worldPacket << group; + for (ShopEntry const& entry : Entries) + _worldPacket << entry; + + return &_worldPacket; +} + +// reader 70291 0x91e530 +static ByteBuffer& operator<<(ByteBuffer& data, Purchase const& purchase) +{ + data << uint64(purchase.PurchaseID); + data << int32(purchase.Status); + data << int32(purchase.ResultCode); + data << uint32(purchase.ProductID); + data << uint64(purchase.BasePrice); + data << uint64(purchase.UserPrice); + data << int64(purchase.TimeCreated); + data << SizedString::BitsSize<8>(purchase.WalletName); + data.FlushBits(); + data << SizedString::Data(purchase.WalletName); + + return data; +} + +WorldPacket const* PurchaseListResponse::Write() +{ + _worldPacket << int32(Result); + _worldPacket << Size(Purchases); + for (Purchase const& purchase : Purchases) + _worldPacket << purchase; + + return &_worldPacket; +} + +WorldPacket const* PurchaseUpdate::Write() +{ + _worldPacket << Size(Purchases); + for (Purchase const& purchase : Purchases) + _worldPacket << purchase; + + return &_worldPacket; +} + +// writer 70058 0x8be640 +void StartPurchase::Read() +{ + _worldPacket >> ClientToken; + _worldPacket >> ProductID; + _worldPacket >> TargetCharacter; + _worldPacket >> Unknown; + _worldPacket >> SizedString::BitsSize<6>(Unknown1); + _worldPacket >> SizedString::BitsSize<12>(Unknown2); + _worldPacket >> SizedString::BitsSize<7>(Unknown3); + _worldPacket >> SizedString::Data(Unknown1); + _worldPacket >> SizedString::Data(Unknown2); + _worldPacket >> SizedString::Data(Unknown3); +} + +// reader only (handler not captured): result and client token roles inferred from ACK_FAILED +WorldPacket const* StartPurchaseResponse::Write() +{ + _worldPacket << int32(PurchaseResult); + _worldPacket << uint32(ClientToken); + _worldPacket << uint64(PurchaseID); + + return &_worldPacket; +} + +// handler 70291 0x2fb90f0: fires STORE_CONFIRM_PURCHASE when PurchaseID is the current purchase +WorldPacket const* ConfirmPurchase::Write() +{ + _worldPacket << uint64(PurchaseID); + _worldPacket << uint32(ServerToken); + + return &_worldPacket; +} + +// writer 70058 0x8bea40 +void ConfirmPurchaseResponse::Read() +{ + _worldPacket >> ServerToken; + _worldPacket >> ClientCurrentPriceFixedPoint; + _worldPacket >> Bits<1>(ConfirmPurchase); +} + +static ByteBuffer& operator<<(ByteBuffer& data, DistributionObject const& distribution) +{ + data << uint64(distribution.DistributionID); + data << int32(distribution.Status); + data << uint32(distribution.DeliverableID); + data << distribution.LicenseGameAccountGUID; + data << distribution.TargetPlayer; + data << uint32(distribution.TargetNativeRealm); + data << uint32(distribution.TargetVirtualRealm); + data << uint64(distribution.PurchaseID); + data << uint32(distribution.ManualReview); + data << OptionalInit(distribution.Product); + data << Bits<1>(distribution.Revoked); + data.FlushBits(); + if (distribution.Product) + data << *distribution.Product; + + return data; +} + +WorldPacket const* DistributionListResponse::Write() +{ + _worldPacket << int32(Result); + _worldPacket.WriteBits(Distributions.size(), 11); + _worldPacket.FlushBits(); + + for (DistributionObject const& distribution : Distributions) + _worldPacket << distribution; + + return &_worldPacket; +} + +void DistributionAssignToTarget::Read() +{ + _worldPacket >> ClientToken; + _worldPacket >> DistributionID; + _worldPacket >> TargetCharacter; + _worldPacket >> ProductChoice; +} + +WorldPacket const* StartDistributionAssignToTargetResponse::Write() +{ + _worldPacket << int32(Result); + _worldPacket << uint32(ClientToken); + _worldPacket << uint64(DistributionID); + + return &_worldPacket; +} + +WorldPacket const* DistributionUpdate::Write() +{ + _worldPacket << Distribution; + + return &_worldPacket; +} + +WorldPacket const* CharacterUpgradeState::Write() +{ + _worldPacket << Character; + + return &_worldPacket; +} + +void GetVasAccountCharacterList::Read() +{ + _worldPacket >> Unknown1; + _worldPacket >> Unknown2; +} + +void GetVasTransferTargetRealmList::Read() +{ + _worldPacket >> Unknown1; + _worldPacket >> Unknown2; +} + +WorldPacket const* GetVasAccountCharacterListResult::Write() +{ + _worldPacket << uint32(ClientToken); + _worldPacket << int32(Result); + _worldPacket << int32(Unknown); + _worldPacket << Size(Characters); + for (VasCharacter const& character : Characters) + { + // the client keys its character map by the second guid (70338 0x2E3E6B0) + _worldPacket << character.WowAccountGuid; + _worldPacket << character.Guid; + _worldPacket << uint32(character.VirtualRealmAddress); + _worldPacket << int8(character.Race); + _worldPacket << int8(character.Class); + _worldPacket << int8(character.Sex); + _worldPacket << uint8(character.Level); + _worldPacket << int64(0); + _worldPacket << int32(0); + _worldPacket << SizedString::BitsSize<6>(character.Name); + _worldPacket << SizedString::BitsSize<9>(character.RealmName); + _worldPacket.WriteBits(0, 9); // unknown string, empty + _worldPacket.FlushBits(); + _worldPacket << SizedString::Data(character.Name); + _worldPacket << SizedString::Data(character.RealmName); + } + + return &_worldPacket; +} + +void StartVasPurchase::Read() +{ + _worldPacket >> ClientToken; + _worldPacket >> ProductID; + _worldPacket >> Character; + _worldPacket >> CharacterRealmAddress; + _worldPacket >> DestinationRealmAddress; + for (ObjectGuid& guid : Guids) + _worldPacket >> guid; + _worldPacket >> SizedString::BitsSize<6>(NewName); + _worldPacket >> SizedString::BitsSize<7>(GuildName1); + _worldPacket >> SizedString::BitsSize<7>(GuildName2); + _worldPacket >> SizedString::BitsSize<6>(Platform); + _worldPacket >> SizedString::BitsSize<12>(Fingerprint); + _worldPacket >> Bits<1>(Unknown); + _worldPacket.ResetBitPos(); + _worldPacket >> SizedString::Data(NewName); + _worldPacket >> SizedString::Data(GuildName1); + _worldPacket >> SizedString::Data(GuildName2); + _worldPacket >> SizedString::Data(Platform); + _worldPacket >> SizedString::Data(Fingerprint); +} + +WorldPacket const* VasPurchaseComplete::Write() +{ + _worldPacket << uint32(ProductID); + _worldPacket << uint32(Unknown); + _worldPacket << Character; + _worldPacket << Guid2; + _worldPacket << uint32(DestinationRealmAddress); + _worldPacket << Guid3; + _worldPacket << SizedString::BitsSize<6>(Name); + _worldPacket << SizedString::BitsSize<9>(RealmName); + _worldPacket.FlushBits(); + _worldPacket << SizedString::Data(Name); + _worldPacket << SizedString::Data(RealmName); + + return &_worldPacket; +} + +void RequestCharacterGuildFollowInfo::Read() +{ + _worldPacket >> Character; + _worldPacket >> VirtualRealmAddress; +} + +WorldPacket const* QueryGuildFollowInfoResponse::Write() +{ + _worldPacket << Character; + _worldPacket << Bits<1>(HasInfo); // with info: 9 bit realm name length, faction changed bit, u32, name (not sent) + _worldPacket.FlushBits(); + + return &_worldPacket; +} + +WorldPacket const* GetVasTransferTargetRealmListResult::Write() +{ + _worldPacket << uint32(Unknown1); + _worldPacket << int32(Unknown2); + _worldPacket << int32(Unknown3); + _worldPacket << Size(Realms); + for (VasTransferTargetRealm const& realm : Realms) + { + _worldPacket << uint32(realm.RealmAddress); + for (int32 value : realm.Unknown) + _worldPacket << int32(value); + _worldPacket << SizedString::BitsSize<9>(realm.Name); + _worldPacket.FlushBits(); + _worldPacket << SizedString::Data(realm.Name); + } + + return &_worldPacket; +} + +// writer 70058 0x8C6220 (order read from the writer, names guessed) +void DistributionAssignVas::Read() +{ + _worldPacket >> ClientToken; + _worldPacket >> DistributionID; + _worldPacket >> Character; + _worldPacket >> SourceRealmAddress; + _worldPacket >> Unknown1; + _worldPacket >> DesiredSuperDistrictID; + for (ObjectGuid& guid : Guids) + _worldPacket >> guid; + for (uint8& value : Unknown2) + _worldPacket >> value; + uint32 pairCount = 0; + _worldPacket >> pairCount; + _worldPacket >> Unknown3; + if (pairCount > 100) + throw ByteBufferException(); + Pairs.resize(pairCount); + for (auto& [first, second] : Pairs) + _worldPacket >> first >> second; + _worldPacket >> SizedString::BitsSize<6>(Strings[0]); + _worldPacket >> SizedString::BitsSize<9>(Strings[1]); + _worldPacket >> SizedString::BitsSize<7>(Strings[2]); + _worldPacket >> SizedString::BitsSize<7>(Strings[3]); + for (bool& flag : Flags) + _worldPacket >> Bits<1>(flag); + _worldPacket.ResetBitPos(); + for (std::string& text : Strings) + _worldPacket >> SizedString::Data(text); +} + +WorldPacket const* DistributionAssignVasResponse::Write() +{ + _worldPacket << uint32(ClientToken); + _worldPacket << int32(StoreError); + _worldPacket << int32(VasPurchaseResult); + + return &_worldPacket; +} +} diff --git a/src/server/game/Server/Packets/TokenPackets.h b/src/server/game/Server/Packets/TokenPackets.h index 0a1c8dbfc1..74b6040dc9 100644 --- a/src/server/game/Server/Packets/TokenPackets.h +++ b/src/server/game/Server/Packets/TokenPackets.h @@ -20,6 +20,8 @@ #include "Packet.h" #include "PacketUtilities.h" +#include "ObjectGuid.h" +#include namespace WorldPackets { @@ -79,6 +81,447 @@ namespace WorldPackets uint32 ExpectedSecondsUntilSold = 0; }; } + + // Classic 1.60 in-game Store (legacy StoreFrame, used while the mirror var shop2Enabled is 0). Layouts read from the client + // readers (70291 product list decoder 0x8287b0, deliverable 0x91e130, purchase 0x91e530, distribution 0x91e650; 70338 + // product 0x91b440, display info 0x91a6d0). + namespace BattlePay + { + struct DisplayCard + { + std::string Title; // 10 bit length + uint32 CreatureDisplayInfoID = 0; + uint32 ModelSceneID = 0; + uint32 TransmogSetID = 0; + }; + + struct DisplayInfo + { + Optional FileDataID; // icon / card texture + Optional ModelSceneID; + std::string Name1; // title, 10 bit length + std::string Name2; // 10 bit length + std::string Name3; // description, 13 bit length + std::string Tooltip; // 13 bit length + std::string Instructions; // 13 bit length + std::string Disclaimer; // 13 bit length + std::string NydusLink; // 12 bit length + Optional Flags; + Optional OverrideTextColor; + Optional OverrideTexture; + Optional OverrideBackground; + int32 CardType = 0; + int32 BannerType = 0; + int32 ItemQuantity = 0; + std::vector Cards; + }; + + struct Deliverable + { + uint32 DeliverableID = 0; + int32 Type = 0; + uint32 ItemID = 0; + uint32 Quantity = 0; + uint32 MountSpellID = 0; + uint32 BattlePetCreatureID = 0; + int32 BoostID = 0; + int32 Flags = 0; + uint32 TransmogItemModifiedAppearanceID = 0; + uint32 TransmogSetID = 0; + uint32 CharTitleID = 0; + uint32 SpellItemEnchantmentID = 0; + uint32 WarbandSceneID = 0; + std::string Name; // 8 bit length + bool AlreadyOwns = false; + Optional Display; + }; + + struct Product + { + uint32 ProductID = 0; + uint64 NormalPriceFixedPoint = 0; + uint64 CurrentPriceFixedPoint = 0; + int32 Type = 0; + int32 Flags = 0; // 0x1 visible / 0x2 buyable in one client context, 0x4 / 0x8 in the other + uint32 RequiredDeliverableID = 0; + int32 Eligibility = 0; + uint64 PmtProductID = 0; + std::vector DeliverableIDs; + std::vector BundledProductIDs; + Optional Display; + }; + + struct ProductGroup + { + uint32 GroupID = 0; + int32 IconFileDataID = 0; + uint8 DisplayType = 0; + int32 Ordering = 0; + int32 Flags = 0; + uint32 ParentGroupID = 0; + std::string Name; // 8 bit length + std::string DisabledDescription; // 24 bit length, sent with its '\0' + }; + + struct ShopEntry + { + uint32 EntryID = 0; + uint32 GroupID = 0; + uint32 ProductID = 0; + int32 Ordering = 0; + int32 Flags = 0; + uint8 BannerType = 0; + Optional Display; + }; + + class ProductListResponse final : public ServerPacket + { + public: + explicit ProductListResponse() : ServerPacket(SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE, 24) { } + + WorldPacket const* Write() override; + + int32 Result = 0; // official sends 2 while its store is off + uint32 CurrencyID = 0; + std::vector Products; + std::vector Deliverables; + std::vector Groups; + std::vector Entries; + }; + + struct Purchase + { + uint64 PurchaseID = 0; + int32 Status = 0; // 0 asserts in the client; 6 = finished (HasPurchaseInProgress 70291 0x1af9ed0) + int32 ResultCode = 0; // 0 = ok; anything else fires the purchase error event + uint32 ProductID = 0; + uint64 BasePrice = 0; // fixed point; 0 and 0 = the product's prices + uint64 UserPrice = 0; + int64 TimeCreated = 0; + std::string WalletName; // 8 bit length, shown as payment method in the confirmation + }; + + class PurchaseListResponse final : public ServerPacket + { + public: + explicit PurchaseListResponse() : ServerPacket(SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE, 8) { } + + WorldPacket const* Write() override; + + int32 Result = 0; + std::vector Purchases; + }; + + class PurchaseUpdate final : public ServerPacket + { + public: + explicit PurchaseUpdate() : ServerPacket(SMSG_BATTLE_PAY_PURCHASE_UPDATE, 4 + 60) { } + + WorldPacket const* Write() override; + + std::vector Purchases; + }; + + class StartPurchase final : public ClientPacket + { + public: + explicit StartPurchase(WorldPacket&& packet) : ClientPacket(CMSG_BATTLE_PAY_START_PURCHASE, std::move(packet)) { } + + void Read() override; + + uint32 ClientToken = 0; + uint32 ProductID = 0; + ObjectGuid TargetCharacter; // character chosen at character select, empty in game + uint32 Unknown = 0; + std::string Unknown1; // 6 bit length + std::string Unknown2; // 12 bit length + std::string Unknown3; // 7 bit length + }; + + class StartPurchaseResponse final : public ServerPacket + { + public: + explicit StartPurchaseResponse() : ServerPacket(SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE, 16) { } + + WorldPacket const* Write() override; + + int32 PurchaseResult = 0; // 0 = ok + uint32 ClientToken = 0; + uint64 PurchaseID = 0; // must match the CONFIRM_PURCHASE that follows + }; + + class ConfirmPurchase final : public ServerPacket + { + public: + explicit ConfirmPurchase() : ServerPacket(SMSG_BATTLE_PAY_CONFIRM_PURCHASE, 12) { } + + WorldPacket const* Write() override; + + uint64 PurchaseID = 0; // the purchase (sent before in PURCHASE_UPDATE) the client shows for confirmation + uint32 ServerToken = 0; + }; + + class ConfirmPurchaseResponse final : public ClientPacket + { + public: + explicit ConfirmPurchaseResponse(WorldPacket&& packet) : ClientPacket(CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE, std::move(packet)) { } + + void Read() override; + + uint32 ServerToken = 0; + uint64 ClientCurrentPriceFixedPoint = 0; + bool ConfirmPurchase = false; + }; + + // a product the account owns but has not used yet (boost, character service token); reader 70291 0x91e650. + // Character screen service token (70058 0x24273C0): Status 1, not revoked, no manual review, deliverable Flags 0x400 and + // deliverable Type 11 paid transfer / 6 faction / 8 race / 5 name / 25 free transfer / 39 hardcore transfer. + struct DistributionObject + { + uint64 DistributionID = 0; + int32 Status = 1; + uint32 DeliverableID = 0; + ObjectGuid LicenseGameAccountGUID; + ObjectGuid TargetPlayer; + uint32 TargetNativeRealm = 0; + uint32 TargetVirtualRealm = 0; + uint64 PurchaseID = 0; + uint32 ManualReview = 0; + Optional Product; + bool Revoked = false; + }; + + class DistributionListResponse final : public ServerPacket + { + public: + explicit DistributionListResponse() : ServerPacket(SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE, 6) { } + + WorldPacket const* Write() override; + + int32 Result = 0; + std::vector Distributions; + }; + + // client asks for the characters (and target realms) of the Store's character service window; Classic 0x440120 / 0x440121 + // (writers 70058 0x8C1E70 / 0x8C1EC0), field meaning not known yet + class GetVasAccountCharacterList final : public ClientPacket + { + public: + explicit GetVasAccountCharacterList(WorldPacket&& packet) : ClientPacket(CMSG_GET_VAS_ACCOUNT_CHARACTER_LIST, std::move(packet)) { } + + void Read() override; + + uint32 Unknown1 = 0; + int32 Unknown2 = 0; + }; + + class GetVasTransferTargetRealmList final : public ClientPacket + { + public: + explicit GetVasTransferTargetRealmList(WorldPacket&& packet) : ClientPacket(CMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST, std::move(packet)) { } + + void Read() override; + + uint32 Unknown1 = 0; + int32 Unknown2 = 0; + }; + + struct VasCharacter + { + ObjectGuid Guid; + ObjectGuid WowAccountGuid; + uint32 VirtualRealmAddress = 0; // the Store window groups characters into realms by this + int8 Race = 0; + int8 Class = 0; + int8 Sex = 0; + uint8 Level = 0; + std::string Name; // 6 bit length + std::string RealmName; // 9 bit length + }; + + // reader 70338 0x82F830, handler 0x2E38A20: ignored unless ClientToken is the request's; Result 0 = ok + class GetVasAccountCharacterListResult final : public ServerPacket + { + public: + explicit GetVasAccountCharacterListResult() : ServerPacket(SMSG_GET_VAS_ACCOUNT_CHARACTER_LIST_RESULT, 16) { } + + WorldPacket const* Write() override; + + uint32 ClientToken = 0; + int32 Result = 0; + int32 Unknown = 0; // echo of the request (0 Store, 26 hardcore transfer token) + std::vector Characters; + }; + + // the Store's character service window's purchase (writer 70058 0x8C1F10; captured: token, product 30, character, realm 70, + // realm 71, 3 empty guids, "" "" "" "win" json) + class StartVasPurchase final : public ClientPacket + { + public: + explicit StartVasPurchase(WorldPacket&& packet) : ClientPacket(CMSG_BATTLE_PAY_START_VAS_PURCHASE, std::move(packet)) { } + + void Read() override; + + uint32 ClientToken = 0; + uint32 ProductID = 0; + ObjectGuid Character; + uint32 CharacterRealmAddress = 0; + uint32 DestinationRealmAddress = 0; + std::array Guids; // destination account etc. (empty so far) + std::string NewName; // 6 bit length + std::string GuildName1; // 7 bit length + std::string GuildName2; // 7 bit length + std::string Platform; // 6 bit length + std::string Fingerprint; // 12 bit length + bool Unknown = false; + }; + + // handler 70338 0x2E3A160: fires STORE_VAS_PURCHASE_COMPLETE (product ready / purchase sent screen); field meanings inferred + class VasPurchaseComplete final : public ServerPacket + { + public: + explicit VasPurchaseComplete() : ServerPacket(SMSG_VAS_PURCHASE_COMPLETE, 40) { } + + WorldPacket const* Write() override; + + uint32 ProductID = 0; + uint32 Unknown = 0; // 0 (non 0 with product 0 sets another client flag) + ObjectGuid Character; + ObjectGuid Guid2; + uint32 DestinationRealmAddress = 0; + ObjectGuid Guid3; + std::string Name; // 6 bit length + std::string RealmName; // 9 bit length + }; + + // the Store's transfer window asks after a character is picked and waits for the answer before it shows the target realm box + class RequestCharacterGuildFollowInfo final : public ClientPacket + { + public: + explicit RequestCharacterGuildFollowInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_CHARACTER_GUILD_FOLLOW_INFO, std::move(packet)) { } + + void Read() override; + + ObjectGuid Character; + uint32 VirtualRealmAddress = 0; + }; + + // reader in the 70058 guild message switch; fires STORE_GUILD_FOLLOW_INFO_RECEIVED + class QueryGuildFollowInfoResponse final : public ServerPacket + { + public: + explicit QueryGuildFollowInfoResponse() : ServerPacket(SMSG_QUERY_GUILD_FOLLOW_INFO_RESPONSE, 20) { } + + WorldPacket const* Write() override; + + ObjectGuid Character; + bool HasInfo = false; // guild of the character (not sent: no guild to follow) + }; + + struct VasTransferTargetRealm + { + uint32 RealmAddress = 0; // name guessed + std::array Unknown = { }; + std::string Name; // 9 bit length + }; + + // reader 70291 0x8320F0, field names not known yet + class GetVasTransferTargetRealmListResult final : public ServerPacket + { + public: + explicit GetVasTransferTargetRealmListResult() : ServerPacket(SMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST_RESULT, 16) { } + + WorldPacket const* Write() override; + + uint32 Unknown1 = 0; + int32 Unknown2 = 0; + int32 Unknown3 = 0; + std::vector Realms; + }; + + // only the client token is read; the rest of the message is kept in the packet log until its layout is known + class DistributionAssignVas final : public ClientPacket + { + public: + explicit DistributionAssignVas(WorldPacket&& packet) : ClientPacket(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS, std::move(packet)) { } + + void Read() override; + + uint32 ClientToken = 0; + uint64 DistributionID = 0; + ObjectGuid Character; + uint32 SourceRealmAddress = 0; // name guessed + uint32 Unknown1 = 0; + int32 DesiredSuperDistrictID = 0; // hardcore transfer destination ruleset (name guessed) + std::array Guids; + std::array Unknown2 = { }; + uint32 Unknown3 = 0; + std::vector> Pairs; + std::array Strings; // 6, 9, 7, 7 bit lengths + std::array Flags = { }; // one is probably "validation only" + }; + + // character boost used on a character (writer 70058; ProductChoice = the chosen spec, inferred) + class DistributionAssignToTarget final : public ClientPacket + { + public: + explicit DistributionAssignToTarget(WorldPacket&& packet) : ClientPacket(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_TO_TARGET, std::move(packet)) { } + + void Read() override; + + uint32 ClientToken = 0; + uint64 DistributionID = 0; + ObjectGuid TargetCharacter; + uint32 ProductChoice = 0; + }; + + // handler 70338 0x2E3A7F0: Result != 0 raises the error event with that code + class StartDistributionAssignToTargetResponse final : public ServerPacket + { + public: + explicit StartDistributionAssignToTargetResponse() : ServerPacket(SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE, 16) { } + + WorldPacket const* Write() override; + + int32 Result = 0; + uint32 ClientToken = 0; + uint64 DistributionID = 0; + }; + + class DistributionUpdate final : public ServerPacket + { + public: + explicit DistributionUpdate() : ServerPacket(SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE, 64) { } + + WorldPacket const* Write() override; + + DistributionObject Distribution; + }; + + // SMSG_CHARACTER_UPGRADE_STARTED / _COMPLETE / _ABORTED: just the character + class CharacterUpgradeState final : public ServerPacket + { + public: + explicit CharacterUpgradeState(OpcodeServer opcode) : ServerPacket(opcode, 18) { } + + WorldPacket const* Write() override; + + ObjectGuid Character; + }; + + // ASSIGN_VAS_RESPONSE event: both results 0 = the service was assigned + class DistributionAssignVasResponse final : public ServerPacket + { + public: + explicit DistributionAssignVasResponse() : ServerPacket(SMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS_RESPONSE, 12) { } + + WorldPacket const* Write() override; + + uint32 ClientToken = 0; + int32 StoreError = 0; + int32 VasPurchaseResult = 0; + }; + } } #endif // TRINITYCORE_TOKEN_PACKETS_H diff --git a/src/server/game/Server/Protocol/ClassicClientOpcodes.inc b/src/server/game/Server/Protocol/ClassicClientOpcodes.inc index 04f993e640..84ccb5f993 100644 --- a/src/server/game/Server/Protocol/ClassicClientOpcodes.inc +++ b/src/server/game/Server/Protocol/ClassicClientOpcodes.inc @@ -589,7 +589,7 @@ { 0x4400F5, 0x4300F5 }, // CMSG_CHARACTER_CHECK_UPGRADE (0.0) { 0x4400F7, 0x4300F7 }, // CMSG_GUILD_SET_GUILD_MASTER (1.0) { 0x4400F8, 0x4300F8 }, // CMSG_PETITION_RENAME_GUILD (1.8) - { 0x4400F9, 0x4300FB }, // CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE (0.0) + { 0x4400F9, 0x4300FC }, // CMSG_BATTLE_PAY_ACK_FAILED_RESPONSE: u32, sent after a failed START_PURCHASE (the confirm response is 0x4400FB, client writer 70058 0x8bea40) { 0x44010B, 0x4300FD }, // CMSG_CATALOG_SHOP_LICENSE_GAME_DATA_REQUEST (0.0) { 0x44010C, 0x4300FF }, // CMSG_SEND_CONTACT_LIST (3.8) { 0x44010D, 0x43010D }, // CMSG_ENUM_CHARACTERS_DELETED_BY_CLIENT (0.0) diff --git a/src/server/game/Server/Protocol/ClassicOpcodes.cpp b/src/server/game/Server/Protocol/ClassicOpcodes.cpp index 421ac841cc..141eca4281 100644 --- a/src/server/game/Server/Protocol/ClassicOpcodes.cpp +++ b/src/server/game/Server/Protocol/ClassicOpcodes.cpp @@ -52,6 +52,7 @@ std::unordered_map const ServerOpcodes = { SMSG_SERVER_TIME_OFFSET, 0x4601BF }, // decoder asserts datasize == 8; 0x1BD = CORPSE_TRANSPORT_QUERY, 0x1BE = ENCHANTMENT_LOG (both retail - 1) { SMSG_MIRROR_VARS, 0x460371 }, // decoder 0x83E330: count, then 1 bit + 2 x 24-bit sized strings (0x46036F reads 16-byte records) { SMSG_LAST_CATALOG_FETCH_RESPONSE, 0x460382 }, // +2 region like MIRROR_VARS (decoder 0x83FCC0) + { SMSG_QUERY_GUILD_FOLLOW_INFO_RESPONSE, 0x52002E }, // retail index - 1 (70058 guild switch reader) }; // sent with the shifted number these hit a different Classic message (client JamClient size asserts) diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 9888f035fc..c5934d9dba 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -221,15 +221,15 @@ void OpcodeTable::InitializeClientOpcodes() DEFINE_HANDLER(CMSG_BATTLENET_REQUEST, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlenetRequest); DEFINE_HANDLER(CMSG_BATTLE_PAY_ACK_FAILED_RESPONSE, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_BATTLE_PAY_CANCEL_OPEN_CHECKOUT, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_TO_TARGET, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_GET_PRODUCT_LIST, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_GET_PURCHASE_LIST, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayConfirmPurchaseResponse); + DEFINE_HANDLER(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_TO_TARGET, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayDistributionAssignToTarget); + DEFINE_HANDLER(CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayDistributionAssignVas); + DEFINE_HANDLER(CMSG_BATTLE_PAY_GET_PRODUCT_LIST, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayGetProductList); + DEFINE_HANDLER(CMSG_BATTLE_PAY_GET_PURCHASE_LIST, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayGetPurchaseList); DEFINE_HANDLER(CMSG_GENERATE_SSO_TOKEN, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleGenerateSsoToken); DEFINE_HANDLER(CMSG_BATTLE_PAY_REQUEST_PRICE_INFO, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_START_PURCHASE, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_BATTLE_PAY_START_VAS_PURCHASE, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_BATTLE_PAY_START_PURCHASE, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayStartPurchase); + DEFINE_HANDLER(CMSG_BATTLE_PAY_START_VAS_PURCHASE, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePayStartVasPurchase); DEFINE_HANDLER(CMSG_BATTLE_PET_CLEAR_FANFARE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePetClearFanfare); DEFINE_HANDLER(CMSG_BATTLE_PET_DELETE_PET, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlePetDeletePet); DEFINE_HANDLER(CMSG_BATTLE_PET_DELETE_PET_CHEAT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); @@ -513,8 +513,8 @@ void OpcodeTable::InitializeClientOpcodes() DEFINE_HANDLER(CMSG_GET_REMAINING_GAME_TIME, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_GET_TROPHY_LIST, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_GET_UNDELETE_CHARACTER_COOLDOWN_STATUS, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleGetUndeleteCooldownStatus); - DEFINE_HANDLER(CMSG_GET_VAS_ACCOUNT_CHARACTER_LIST, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST, STATUS_IGNORED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_GET_VAS_ACCOUNT_CHARACTER_LIST, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleGetVasAccountCharacterList); + DEFINE_HANDLER(CMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleGetVasTransferTargetRealmList); DEFINE_HANDLER(CMSG_GM_TICKET_ACKNOWLEDGE_SURVEY, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_GM_TICKET_GET_CASE_STATUS, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleGMTicketGetCaseStatusOpcode); DEFINE_HANDLER(CMSG_GM_TICKET_GET_SYSTEM_STATUS, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleGMTicketSystemStatusOpcode); @@ -962,7 +962,7 @@ void OpcodeTable::InitializeClientOpcodes() DEFINE_HANDLER(CMSG_REQUEST_AREA_POI_UPDATE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_REQUEST_BATTLEFIELD_STATUS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestBattlefieldStatusOpcode); DEFINE_HANDLER(CMSG_REQUEST_CEMETERY_LIST, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleRequestCemeteryList); - DEFINE_HANDLER(CMSG_REQUEST_CHARACTER_GUILD_FOLLOW_INFO, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); + DEFINE_HANDLER(CMSG_REQUEST_CHARACTER_GUILD_FOLLOW_INFO, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestCharacterGuildFollowInfo); DEFINE_HANDLER(CMSG_REQUEST_CHAT_LOGIN, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_REQUEST_COVENANT_CALLINGS, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_REQUEST_CROWD_CONTROL_SPELL, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); @@ -1302,20 +1302,20 @@ void OpcodeTable::InitializeServerOpcodes() DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_ACK_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_BATTLE_PET_DELIVERED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_COLLECTION_ITEM_DELIVERED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_CONFIRM_PURCHASE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_CONFIRM_PURCHASE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DELIVERY_ENDED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DELIVERY_STARTED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_VAS_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DISTRIBUTION_UNREVOKED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_MOUNT_DELIVERED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_PURCHASE_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_PURCHASE_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_START_CHECKOUT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PAY_VALIDATE_PURCHASE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PETS_HEALED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_BATTLE_PET_CAGE_DATE_ERROR, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1406,10 +1406,10 @@ void OpcodeTable::InitializeServerOpcodes() DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_LOGIN_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_OBJECT_TEST_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_RENAME_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_ABORTED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_COMPLETE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_ABORTED, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_COMPLETE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_MANUAL_UNREVOKE_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_STARTED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHARACTER_UPGRADE_STARTED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHAR_CUSTOMIZE_FAILURE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHAR_CUSTOMIZE_SUCCESS, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHAR_FACTION_CHANGE_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1668,8 +1668,8 @@ void OpcodeTable::InitializeServerOpcodes() DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_SHIPMENTS_OF_TYPE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_SHIPMENT_INFO_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_TROPHY_LIST_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_VAS_ACCOUNT_CHARACTER_LIST_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_VAS_ACCOUNT_CHARACTER_LIST_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_GET_VAS_TRANSFER_TARGET_REALM_LIST_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_PLAYER_INFO, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_REQUEST_PLAYER_INFO, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_CASE_STATUS, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -2250,7 +2250,7 @@ void OpcodeTable::InitializeServerOpcodes() DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_CREATURE_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_GAME_OBJECT_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_GARRISON_PET_NAME_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_GUILD_FOLLOW_INFO_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_GUILD_FOLLOW_INFO_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_GUILD_INFO_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_ITEM_TEXT_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_QUERY_NEIGHBORHOOD_NAME_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index d367c53f0b..31c968e5e6 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -792,6 +792,19 @@ namespace WorldPackets class CommerceTokenGetMarketPrice; } + namespace BattlePay + { + class StartPurchase; + class ConfirmPurchaseResponse; + class GetVasAccountCharacterList; + class GetVasTransferTargetRealmList; + class DistributionAssignVas; + class RequestCharacterGuildFollowInfo; + class StartVasPurchase; + class DistributionAssignToTarget; + struct DistributionObject; + } + namespace Totem { class TotemDestroyed; @@ -1244,6 +1257,21 @@ class TC_GAME_API WorldSession void HandleLfgListProbe(WorldPackets::Null& packet); // Classic 1.60 Group Finder: layouts still being worked out void HandleRecentAllyProbe(WorldPackets::Null& packet); // Classic 1.60 Social window: Recent Allies tab (RecentAllies.cpp) void HandleGetLastCatalogFetch(WorldPackets::Null& null); // Classic 1.60 catalog shop + void HandleBattlePayGetProductList(WorldPackets::Null& null); // Classic 1.60 in-game Store + void HandleBattlePayGetPurchaseList(WorldPackets::Null& null); + void SendShopProductList(); + void SendShopDistributionList(); + static constexpr uint64 BoostDistributionIdBase = UI64LIT(0x100000000); // boost token distribution id = base + auth.account_boost_token.ID + static WorldPackets::BattlePay::DistributionObject MakeBoostDistribution(uint32 tokenId, uint32 boostType, int32 status); + void HandleBattlePayDistributionAssignToTarget(WorldPackets::BattlePay::DistributionAssignToTarget& assign); + static void ProcessIncomingCharacterTransfers(); // realm transfers to this realm (auth.character_transfer) + void HandleGetVasAccountCharacterList(WorldPackets::BattlePay::GetVasAccountCharacterList& request); + void HandleGetVasTransferTargetRealmList(WorldPackets::BattlePay::GetVasTransferTargetRealmList& request); + void HandleBattlePayStartVasPurchase(WorldPackets::BattlePay::StartVasPurchase& startVasPurchase); + void HandleRequestCharacterGuildFollowInfo(WorldPackets::BattlePay::RequestCharacterGuildFollowInfo& request); + void HandleBattlePayDistributionAssignVas(WorldPackets::BattlePay::DistributionAssignVas& assign); + void HandleBattlePayStartPurchase(WorldPackets::BattlePay::StartPurchase& startPurchase); + void HandleBattlePayConfirmPurchaseResponse(WorldPackets::BattlePay::ConfirmPurchaseResponse& confirmPurchaseResponse); void Handle_EarlyProccess(WorldPackets::Null& null); // just mark packets processed in WorldSocket::ReadDataHandler void LogUnprocessedTail(WorldPacket const* packet); @@ -2035,6 +2063,20 @@ class TC_GAME_API WorldSession std::unordered_map> _battlenetResponseCallbacks; uint32 _battlenetRequestToken; + // Classic 1.60 in-game Store: the purchase waiting for the player's confirmation + struct ShopPendingPurchase + { + uint64 PurchaseID = 0; + uint32 ProductID = 0; + uint32 ServerToken = 0; + ObjectGuid Target; + int64 TimeCreated = 0; + uint32 TransferRealmAddress = 0; // realm transfer (character service window): destination realm + }; + Optional _shopPendingPurchase; + Optional> _hardcoreTransferValidated; // character, destination realm address of the token's check + void StartShopPurchase(uint32 clientToken, uint32 productId, ObjectGuid target, uint32 transferRealmAddress); + time_t _logoutTime; bool m_inQueue; // session wait in auth.queue ObjectGuid m_playerLoading; // code processed in LoginPlayer diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index ae4130b1f0..8e8ca3285d 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1554,6 +1554,9 @@ bool World::SetInitialWorldSettings() sObjectMgr->LoadCreatureClassicLevels(); sObjectMgr->LoadItemClassicBlock(); + TC_LOG_INFO("server.loading", "Loading Shop products..."); // must be after LoadItemTemplates + sObjectMgr->LoadShop(); + TC_LOG_INFO("server.loading", "Loading Equipment templates..."); // must be after LoadCreatureTemplates sObjectMgr->LoadEquipmentTemplates(); diff --git a/src/server/scripts/Custom/Classic/classic_script_loader.cpp b/src/server/scripts/Custom/Classic/classic_script_loader.cpp index 6e78587c3e..f1e2623edc 100644 --- a/src/server/scripts/Custom/Classic/classic_script_loader.cpp +++ b/src/server/scripts/Custom/Classic/classic_script_loader.cpp @@ -171,6 +171,7 @@ void AddSC_classic_deadmines(); void AddSC_classic_instance_deadmines(); void AddSC_classic_instance_ragefire_chasm(); void AddSC_classic_instance_ruins_of_lordaeron(); +void AddSC_classic_instance_hall_of_thanes(); void AddSC_classic_instance_the_stockade(); void AddSC_classic_moonglade(); void AddSC_classic_feralas(); @@ -205,6 +206,7 @@ void AddSC_classic_talents_warlock_druid(); void AddSC_classic_armory_commands(); void AddSC_classic_legacy_commands(); void AddSC_classic_discord_commands(); +void AddSC_classic_shop_commands(); void AddSC_classic_wetlands(); void AddSC_classic_westfall(); void AddSC_classic_western_plaguelands(); @@ -372,6 +374,7 @@ void AddClassicScripts() AddSC_classic_instance_deadmines(); AddSC_classic_instance_ragefire_chasm(); AddSC_classic_instance_ruins_of_lordaeron(); + AddSC_classic_instance_hall_of_thanes(); AddSC_classic_instance_the_stockade(); AddSC_classic_moonglade(); AddSC_classic_feralas(); @@ -406,6 +409,7 @@ void AddClassicScripts() AddSC_classic_armory_commands(); AddSC_classic_legacy_commands(); AddSC_classic_discord_commands(); + AddSC_classic_shop_commands(); AddSC_classic_wetlands(); AddSC_classic_westfall(); AddSC_classic_western_plaguelands(); diff --git a/src/server/scripts/Custom/Classic/instances/hall_of_thanes/classic_instance_hall_of_thanes.cpp b/src/server/scripts/Custom/Classic/instances/hall_of_thanes/classic_instance_hall_of_thanes.cpp new file mode 100644 index 0000000000..ccdbcdebb3 --- /dev/null +++ b/src/server/scripts/Custom/Classic/instances/hall_of_thanes/classic_instance_hall_of_thanes.cpp @@ -0,0 +1,178 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +// Classic 1.60 (Forever): The Hall of Thanes (map 3065), from the official dungeon sniff of 2026-10-12. The bosses run SmartAI, so +// the boss states come from ClassicDungeonEncounterTracker. Encounter to creature (ENCOUNTER_START / END next to the boss threat and +// kill packets): 3493 Faldrim Anvilmar, 3495 "Infurnus" is Magmatus, 3494 Plunder, 3496 Durgen Dirgehammer. +// Doors as the sniff showed them (GO state updates): +// - Faldrim's death opens the Portcullises 642024 and 642025 (out of Anvilmar's Rest) +// - Plunder's death opens the Iron Door 645389 (his hallway) +// - the Ancient Switch 673473 (Durgen's room) opens the Iron Doors 645391 and 645392 back to the entrance and the whole instance +// gets "The sound of heavy metal grinding upon stone echoes in the distance." (BG system message, no sender). Kept as a boss +// state without encounter so the doors stay open for doors loaded later. +// No door closed during a boss fight. The Vault Doors around Durgen's room are opened by players (no lock), not scripted. + +#include "ScriptMgr.h" +#include "ChatPackets.h" +#include "Creature.h" +#include "GameObject.h" +#include "GameObjectAI.h" +#include "InstanceScript.h" +#include "Map.h" +#include "Player.h" +#include "classic_dungeon_encounter_tracker.h" + +namespace +{ +constexpr uint32 CLASSIC_HOT_MAP_ID = 3065; +constexpr char const* CLASSIC_HOT_SWITCH_TEXT = "The sound of heavy metal grinding upon stone echoes in the distance."; + +enum ClassicHallOfThanesBosses : uint32 +{ + CHOT_ENC_FALDRIM = 0, + CHOT_ENC_MAGMATUS = 1, + CHOT_ENC_PLUNDER = 2, + CHOT_ENC_DURGEN = 3, + CHOT_ANCIENT_SWITCH = 4, // not an encounter: the switch that opens the way back + CHOT_MAX +}; + +enum ClassicHallOfThanesObjects : uint32 +{ + GO_HOT_PORTCULLIS_REST_1 = 642024, + GO_HOT_PORTCULLIS_REST_2 = 642025, + GO_HOT_IRON_DOOR_PLUNDER = 645389, + GO_HOT_IRON_DOOR_BACK_1 = 645391, + GO_HOT_IRON_DOOR_BACK_2 = 645392 +}; + +constexpr ClassicDungeonBossEntry ClassicHallOfThanesBossEntries[] = +{ + { CHOT_ENC_FALDRIM, 261306 }, // Faldrim Anvilmar + { CHOT_ENC_MAGMATUS, 261316 }, // Magmatus (encounter "Infurnus") + { CHOT_ENC_PLUNDER, 261311 }, // Plunder + { CHOT_ENC_DURGEN, 261319 } // Durgen Dirgehammer +}; + +constexpr DoorData ClassicHallOfThanesDoors[] = +{ + { GO_HOT_PORTCULLIS_REST_1, CHOT_ENC_FALDRIM, EncounterDoorBehavior::OpenWhenDone }, + { GO_HOT_PORTCULLIS_REST_2, CHOT_ENC_FALDRIM, EncounterDoorBehavior::OpenWhenDone }, + { GO_HOT_IRON_DOOR_PLUNDER, CHOT_ENC_PLUNDER, EncounterDoorBehavior::OpenWhenDone }, + { GO_HOT_IRON_DOOR_BACK_1, CHOT_ANCIENT_SWITCH, EncounterDoorBehavior::OpenWhenDone }, + { GO_HOT_IRON_DOOR_BACK_2, CHOT_ANCIENT_SWITCH, EncounterDoorBehavior::OpenWhenDone } +}; +} + +class classic_instance_hall_of_thanes : public InstanceMapScript +{ +public: + classic_instance_hall_of_thanes() : InstanceMapScript("classic_instance_hall_of_thanes", CLASSIC_HOT_MAP_ID) { } + + struct classic_instance_hall_of_thanes_InstanceScript : public InstanceScript + { + classic_instance_hall_of_thanes_InstanceScript(InstanceMap* map) : InstanceScript(map) + { + SetHeaders("CHOT"); + SetBossNumber(CHOT_MAX); + static constexpr DungeonEncounterData encounters[] = + { + { CHOT_ENC_FALDRIM, {{ 3493 }} }, + { CHOT_ENC_MAGMATUS, {{ 3495 }} }, + { CHOT_ENC_PLUNDER, {{ 3494 }} }, + { CHOT_ENC_DURGEN, {{ 3496 }} } + }; + LoadDungeonEncounterData(encounters); + LoadDoorData(ClassicHallOfThanesDoors); + } + + ClassicDungeonEncounterTracker _encounterTracker{ *this, ClassicHallOfThanesBossEntries }; + + void OnCreatureCreate(Creature* creature) override + { + InstanceScript::OnCreatureCreate(creature); + _encounterTracker.OnCreatureCreate(creature); + } + + void OnCreatureRemove(Creature* creature) override + { + InstanceScript::OnCreatureRemove(creature); + _encounterTracker.OnCreatureRemove(creature); + } + + void OnUnitDeath(Unit* unit) override + { + _encounterTracker.OnUnitDeath(unit); + } + + void Update(uint32 diff) override + { + _encounterTracker.Update(diff); + } + + void SetData(uint32 type, uint32 /*data*/) override + { + if (type != CHOT_ANCIENT_SWITCH || GetBossState(CHOT_ANCIENT_SWITCH) == DONE) + return; + + if (GetBossState(CHOT_ANCIENT_SWITCH) == TO_BE_DECIDED) + SetBossState(CHOT_ANCIENT_SWITCH, NOT_STARTED); + SetBossState(CHOT_ANCIENT_SWITCH, DONE); + + WorldPackets::Chat::Chat packet; + packet.Initialize(CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_UNIVERSAL, nullptr, nullptr, CLASSIC_HOT_SWITCH_TEXT); + instance->SendToPlayers(packet.Write()); + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new classic_instance_hall_of_thanes_InstanceScript(map); + } +}; + +// Ancient Switch (673473): sniff 2026-10-12, used once after Durgen died; the doors opened in the same second +class go_hall_of_thanes_ancient_switch : public GameObjectScript +{ +public: + go_hall_of_thanes_ancient_switch() : GameObjectScript("go_hall_of_thanes_ancient_switch") { } + + struct go_hall_of_thanes_ancient_switchAI : public GameObjectAI + { + go_hall_of_thanes_ancient_switchAI(GameObject* go) : GameObjectAI(go) { } + + bool OnGossipHello(Player* /*player*/) override + { + if (InstanceScript* instance = me->GetInstanceScript()) + instance->SetData(CHOT_ANCIENT_SWITCH, DONE); + return false; // the button itself works as usual + } + }; + + GameObjectAI* GetAI(GameObject* go) const override + { + if (go->GetMapId() != CLASSIC_HOT_MAP_ID) + return nullptr; + return new go_hall_of_thanes_ancient_switchAI(go); + } +}; + +void AddSC_classic_instance_hall_of_thanes() +{ + new classic_instance_hall_of_thanes(); + new go_hall_of_thanes_ancient_switch(); +} diff --git a/src/server/scripts/Custom/Classic/world/classic_shop_commands.cpp b/src/server/scripts/Custom/Classic/world/classic_shop_commands.cpp new file mode 100644 index 0000000000..87999a37fb --- /dev/null +++ b/src/server/scripts/Custom/Classic/world/classic_shop_commands.cpp @@ -0,0 +1,288 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +// In-game Store (TokenHandler.cpp) commands for the support site (contrib/support_site), run through Remote Access: +// .shop reload reload shop_group / shop_product / shop_product_action +// .shop goldlist take the gold from the character (online or not) and list it on the Gold Market +// .shop goldcancel remove a listing and mail its gold back to the seller +// Output lines start with "OK" or "ERROR" so the site can read them. + +#include "ScriptMgr.h" +#include "CharacterCache.h" +#include "Chat.h" +#include "ChatCommand.h" +#include "DatabaseEnv.h" +#include "Log.h" +#include "Mail.h" +#include "ObjectAccessor.h" +#include "ObjectMgr.h" +#include "Player.h" +#include "RBAC.h" +#include "StringFormat.h" +#include "WorldSession.h" + +using namespace Trinity::ChatCommands; + +namespace +{ +constexpr uint32 GoldMarketMaxGold = 200000; // the gold action is sent as int32 copper +constexpr uint32 GoldMarketMinPrice = 2; // the fee is at least 1 point +} + +class classic_shop_commandscript : public CommandScript +{ +public: + classic_shop_commandscript() : CommandScript("classic_shop_commandscript") { } + + std::span GetCommands() const override + { + static ChatCommandTable shopCommandTable = + { + { "reload", HandleReloadCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + { "points", HandlePointsCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + { "balance", HandleBalanceCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + { "boost", HandleBoostCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + { "goldlist", HandleGoldListCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + { "goldcancel", HandleGoldCancelCommand, rbac::RBAC_PERM_COMMAND_RELOAD, Console::Yes }, + }; + static ChatCommandTable commandTable = + { + { "shop", shopCommandTable }, + }; + return commandTable; + } + + static bool HandleReloadCommand(ChatHandler* handler) + { + sObjectMgr->LoadShop(); + handler->PSendSysMessage("OK shop reloaded: %u tabs, %u products", uint32(sObjectMgr->GetShopGroups().size()), uint32(sObjectMgr->GetShopProducts().size())); + return true; + } + + static uint32 GetPoints(uint32 accountId) + { + if (QueryResult result = LoginDatabase.PQuery("SELECT Points FROM account_shop_points WHERE AccountID = {}", accountId)) + return (*result)[0].GetUInt32(); + return 0; + } + + // .shop points [character]: add shop points to the character's account (negative takes them, not below 0) + static bool HandlePointsCommand(ChatHandler* handler, int32 amount, Optional player) + { + if (!player) + player = PlayerIdentifier::FromTargetOrSelf(handler); + if (!player) + { + handler->SendSysMessage("Usage: .shop points [character] (or target a player)"); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 accountId = sCharacterCache->GetCharacterAccountIdByGuid(player->GetGUID()); + if (!accountId) + { + handler->SendSysMessage("ERROR unknown character"); + handler->SetSentErrorMessage(true); + return false; + } + + LoginDatabase.DirectPExecute("INSERT INTO account_shop_points (AccountID, Points) VALUES ({0}, {1}) " + "ON DUPLICATE KEY UPDATE Points = GREATEST(0, CAST(Points AS SIGNED) + {2})", accountId, std::max(amount, 0), amount); + uint32 points = GetPoints(accountId); + + handler->PSendSysMessage("OK %s: %d points, account %u now has %u.", player->GetName().c_str(), amount, accountId, points); + if (Player* target = player->GetConnectedPlayer()) + if (target->GetSession() != handler->GetSession()) + ChatHandler(target->GetSession()).SendSysMessage(Trinity::StringFormat("Shop: you received {} points. You have {} points.", amount, points)); + TC_LOG_INFO("entities.player", "Shop: {} points for account {} ({}), now {}", amount, accountId, player->GetName(), points); + return true; + } + + // .shop boost [character] [type]: a character boost token for the character's account (type 6 = level 60) + static bool HandleBoostCommand(ChatHandler* handler, Optional player, Optional boostType) + { + if (!player) + player = PlayerIdentifier::FromTargetOrSelf(handler); + if (!player) + { + handler->SendSysMessage("Usage: .shop boost [character] [type] (or target a player)"); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 accountId = sCharacterCache->GetCharacterAccountIdByGuid(player->GetGUID()); + if (!accountId) + { + handler->SendSysMessage("ERROR unknown character"); + handler->SetSentErrorMessage(true); + return false; + } + + LoginDatabase.DirectPExecute("INSERT INTO account_boost_token (AccountID, BoostType, Source) VALUES ({}, {}, 'gm')", accountId, boostType.value_or(6)); + handler->PSendSysMessage("OK account %u of %s got a character boost token (type %u); it shows on the character screen.", + accountId, player->GetName().c_str(), boostType.value_or(6)); + return true; + } + + // .shop balance [character] + static bool HandleBalanceCommand(ChatHandler* handler, Optional player) + { + if (!player) + player = PlayerIdentifier::FromTargetOrSelf(handler); + if (!player) + { + handler->SendSysMessage("Usage: .shop balance [character] (or target a player)"); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 accountId = sCharacterCache->GetCharacterAccountIdByGuid(player->GetGUID()); + if (!accountId) + { + handler->SendSysMessage("ERROR unknown character"); + handler->SetSentErrorMessage(true); + return false; + } + + handler->PSendSysMessage("OK %s: account %u has %u shop points.", player->GetName().c_str(), accountId, GetPoints(accountId)); + return true; + } + + static bool HandleGoldListCommand(ChatHandler* handler, std::string name, uint32 gold, uint32 price) + { + if (!normalizePlayerName(name)) + { + handler->SendSysMessage("ERROR unknown character"); + return true; + } + + if (gold < 1 || gold > GoldMarketMaxGold || price < GoldMarketMinPrice) + { + handler->PSendSysMessage("ERROR the gold must be 1 to %u and the price at least %u points", GoldMarketMaxGold, GoldMarketMinPrice); + return true; + } + + CharacterCacheEntry const* character = sCharacterCache->GetCharacterCacheByName(name); + if (!character) + { + handler->SendSysMessage("ERROR unknown character"); + return true; + } + + // the player save uses prepared statements, which only the async connections have (a Direct* commit asserts): gold through the + // normal async save, the listing row synchronously so its id can be returned (commands run in the world thread, one at a time) + uint64 copper = uint64(gold) * GOLD; + if (Player* player = ObjectAccessor::FindConnectedPlayer(character->Guid)) + { + if (!player->HasEnoughMoney(copper)) + { + handler->SendSysMessage("ERROR the character does not have that much gold"); + return true; + } + player->ModifyMoney(-int64(copper)); + CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); + player->SaveInventoryAndGoldToDB(trans); + CharacterDatabase.CommitTransaction(trans); + ChatHandler(player->GetSession()).SendSysMessage(Trinity::StringFormat("Shop: {} gold was listed on the Gold Market.", gold)); + } + else + { + QueryResult result = CharacterDatabase.PQuery("SELECT money FROM characters WHERE guid = {}", character->Guid.GetCounter()); + if (!result || (*result)[0].GetUInt64() < copper) + { + handler->SendSysMessage("ERROR the character does not have that much gold"); + return true; + } + CharacterDatabase.DirectPExecute("UPDATE characters SET money = money - {} WHERE guid = {}", copper, character->Guid.GetCounter()); + } + + CharacterDatabase.DirectPExecute("INSERT INTO shop_gold_listing (SellerAccount, SellerGuid, Gold, Price) VALUES ({}, {}, {}, {})", + character->AccountId, character->Guid.GetCounter(), gold, price); + + uint32 listingId = 0; + if (QueryResult result = CharacterDatabase.PQuery("SELECT MAX(ID) FROM shop_gold_listing WHERE SellerGuid = {}", character->Guid.GetCounter())) + listingId = (*result)[0].GetUInt32(); + + TC_LOG_INFO("entities.player", "Shop: {} ({}) listed {} gold for {} points (listing {})", name, character->Guid.ToString(), gold, price, listingId); + handler->PSendSysMessage("OK %u", listingId); + return true; + } + + static bool HandleGoldCancelCommand(ChatHandler* handler, uint32 listingId) + { + QueryResult result = CharacterDatabase.PQuery("SELECT SellerGuid, Gold FROM shop_gold_listing WHERE ID = {}", listingId); + if (!result) + { + handler->SendSysMessage("ERROR no such listing (sold or removed already)"); + return true; + } + + uint64 sellerGuid = (*result)[0].GetUInt64(); + uint32 gold = (*result)[1].GetUInt32(); + + // the listing goes first (synchronously), so a second cancel or a purchase can not pay the gold out twice; the mail uses prepared + // statements and goes through the async connection + CharacterDatabase.DirectPExecute("DELETE FROM shop_gold_listing WHERE ID = {}", listingId); + if (sellerGuid) + { + ObjectGuid seller = ObjectGuid::Create(sellerGuid); + CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); + MailDraft("Gold Market", Trinity::StringFormat("Your Gold Market listing of {} gold was removed. Here is your gold.", gold)) + .AddMoney(uint64(gold) * GOLD) + .SendMailTo(trans, MailReceiver(ObjectAccessor::FindConnectedPlayer(seller), sellerGuid), MailSender(MAIL_NORMAL, UI64LIT(0), MAIL_STATIONERY_GM), MAIL_CHECK_MASK_NOT_RETURNABLE); + CharacterDatabase.CommitTransaction(trans); + } + + TC_LOG_INFO("entities.player", "Shop: Gold Market listing {} ({} gold) removed, gold mailed to {}", listingId, gold, sellerGuid); + handler->PSendSysMessage("OK %u", listingId); + return true; + } +}; + +// realm transfers arriving at this realm: at start and every minute +class classic_character_transfer_world : public WorldScript +{ +public: + classic_character_transfer_world() : WorldScript("classic_character_transfer_world") { } + + void OnStartup() override + { + // pvp talent rows of characters that do not exist (an aborted creation or load left them): a new character that gets their + // guid (creation, realm transfer) fails with a duplicate key. Character deletion itself removes them. + CharacterDatabase.DirectExecute("DELETE p FROM character_pvp_talent p LEFT JOIN characters c ON c.guid = p.guid WHERE c.guid IS NULL"); + + WorldSession::ProcessIncomingCharacterTransfers(); + } + + void OnUpdate(uint32 diff) override + { + _timer += diff; + if (_timer < 60 * IN_MILLISECONDS) + return; + _timer = 0; + WorldSession::ProcessIncomingCharacterTransfers(); + } + +private: + uint32 _timer = 0; +}; + +void AddSC_classic_shop_commands() +{ + new classic_shop_commandscript(); + new classic_character_transfer_world(); +} diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 433b2f781e..d630e6c23d 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -4509,6 +4509,34 @@ Classic.ClientMainGroupInsertIndex = 315 Classic.OfficialFeatureFlags = 1 +# Classic.Shop.Enabled +# Description: In-game Store (work in progress). 0 answers like the official server (store has nothing for sale); +# 1 sends a test product. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Classic.Shop.Enabled = 0 + +# Classic.Shop.GoldMarketFee +# Description: Percent of the price in shop points kept back from the seller when a Gold Market listing sells. +# Default: 10 + +Classic.Shop.GoldMarketFee = 10 + +# Classic.Shop.BoostGold +# Description: Gold mailed with a character boost (character screen boost button), with the world.shop_boost_item gear. +# Default: 250 + +Classic.Shop.BoostGold = 250 + +# Classic.Shop.VasTest +# Description: Character services work in progress: send a test Hardcore Character Transfer token to the character +# screen. Purchases of character services are refused for now. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Classic.Shop.VasTest = 0 + # # Discord.Channel.Enable # Description: In-game chat channel of the Discord bot (contrib/discord_bot): players join it at login (unless they left