Files
mod-playerbots/data/sql
avirar 3a4e8e729b Allow bots to enter all TBC dungeons (rep/keys/quest attunements) (#1014)
Update will allow any adequately leveled bot to queue for all random and specific TBC dungeons. Normal and Heroic modes that require attunement or keys will be accessible by bots.

InitReputation: Level 70+ Bots will receive Honored rank for all the required factions needed for Heroic keys to function. I've placed the calls to InitRep before InitMounts, I feel we can do something with that in the future. Randomised rep values might allow bots to obtain other mounts?
InitKeyring: All bots receive all non-rep required keys (Shattered Halls Key, Shadow Labyrinth Key, Key to the Arcatraz), and bots with the required rep (Honored) get the other keys.
InitAttunementQuests: Level 60+ bots complete the Caverns of Time and Magister's Terrace attunement quests.
Updated acore_playerbots SQL; playerbots_dungeon_suggestion_definition; max_level increased to 73 (from 70) for all TBC Heroics and Magister's Terrace nomal. Allows more level appropriate bots to join.
2025-02-26 15:55:16 +01:00
..

NEW MODULE - SQL BEST PRACTICES

Create a new table

Example:

CREATE TABLE IF NOT EXISTS `table`(
  `id` int(11) unsigned NOT NULL,
  `column` smallint(6) unsigned,
  `active` BOOLEAN DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Boolean datatype in mysql: Use TinyInt(1) or Boolean (this is the same thing)

bit(1) can also work, but it may require a syntax like b'(0) and b'(1) when inserting (not sure).

If there are multiple booleans in the same table, bit(1) is better, otherwise it's the same result.

Rules

  • Use InnoDB as engine for dynamic tables (most likely in the auth and characters databases).
  • Use MyISAM for read-only tables (in world database), but if you're not sure, just use innoDB.
  • Use utf8 as charset.

Resources

https://www.w3schools.com/sql/sql_datatypes.asp