mangos-zero - Read the Docs · 2019-04-02 · mangos-zero, Release 0.2.0 mangos-zeroallows your to...

455
mangos-zero Release 0.2.0 September 04, 2016

Transcript of mangos-zero - Read the Docs · 2019-04-02 · mangos-zero, Release 0.2.0 mangos-zeroallows your to...

mangos-zeroRelease 0.2.0

September 04, 2016

Contents

1 Introduction 31.1 About This Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Installation Guide 52.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Database Guide 73.1 Database Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 File Format Guide 3054.1 File Format Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

5 Contributing 4295.1 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

i

ii

mangos-zero, Release 0.2.0

mangos-zero allows your to run your own server instance of World of Warcraft version 1.12 also known as vanillaWoW. The code is open source, and made available on BitBucket.

Note: This documentation for mangos-zero is work in progress as of July 23rd 2014.

Help us, and fill in the blanks, fork us and submit pull requests.

Contents 1

mangos-zero, Release 0.2.0

2 Contents

CHAPTER 1

Introduction

Learn more about mangos-zero, what this project is about and what we provide.

1.1 About This Project

This is the documentation for the mangos-zero server for World of Warcraft version 1.12 also known as vanilla WoW.

Wait what? I thought World of Warcraft was always being updated and patched?

True, but we at mangos-zero believe it is simply awesome to have the original game preserved as it was. If you arebig on nostalgia or just missed out on the early days of World of Warcraft, stay with us as vanilla WoW is right here.

3

mangos-zero, Release 0.2.0

The chapters in this documentation will teach you all there is to know about running your own vanilla WoW server,even describing how you can build upon it and develop your own customizations.

1.1.1 The MaNGOS Project

Ever since 2005 you have the option to play old game content from the World of Warcraft because the MaNGOSproject (and others) have released their server as Open Source to the public.

As of now, the MaNGOS project has been split up. If you look for other expansions such as The Burning Crusade orWrath of the Lich King, you should pay a visit to the CMaNGOS project which provides maintained server projectsfor both World of Warcraft expansions.

1.1.2 The mangos-zero Project

As of December 2013 this project has been my personal - as in me, Daniel S. Reichenbach - pet project. I createdforks of the MaNGOS and ScriptDev2 repositories and published my bitbucket project where you can grab all code,and - of course - this documentation, too.

The Team

Currently (July 2014) there is no real team behind this project, it is just me. Of course, I do accept contributions in theform of pull requests or issue reports but I am not actively seeking developers.

I have had my fair share of trouble with MaNGOS and the numerous forks, due to most of them focussing on shortterm results instead of working on things that will result in long term benefits for users and developers.

The Goals

Coming from a professional development background, I intend to turn mangos-zero and thus what is left of vanillaWoW into a project of which I can be proud of and which you - the user - can fully enjoy.

My guiding principles are:

• make it easy to use. Getting the software, building and installing, and using it should be easy as having a pieceof cake.

• have awesome documentation and preserve knowledge. The WoW emulation scene often tends to keep secretsand avoids documentation. This results in forums seeing the same questions over and over ever since 2005. Hereyou will not see this. If a question is asked, it will be solved and documented for all users.

Also I intend to publish every background information I have. This includes things such as protocol informationfor client / server communication, a full run-down on database structures and usage, or even practical guides onhow to use scripting in mangos-zero.

• produce good code and stick with it. Good code does follow best practices, is readable, documented and thuseasy to use for the new developer in town. I do not want to see you looking at the code and having to ask 20questions, one should be sufficient to let you use and benefit from the projects’ code.

If all this is still not enough, I recommend taking a look at the minifesto which I intend to follow with every changeand update I make for this project.

4 Chapter 1. Introduction

CHAPTER 2

Installation Guide

A complete guide to installing mangos-zero.

2.1 Installation

This section will teach you how to install mangos-zero on various operating systems, and how to configure it.

Warning: Basic knowledge of system administration and using compilers is required.

2.1.1 Requirements

mangos-zero is based on a few Open Source libraries which provide the basics for us. This chapter introduces eachof them, and describes for what they are used.

2.1.2 Linux Installation

mangos-zero supports Linux by default, as it is our development platform of choice. Currently development is doneon Debian 7, Ubuntu 12.04 and Ubuntu 14.04. If you use a different Linux brand, you may have to use other namesfor packages and will - of course - have to use a different package manager.

2.1.3 Windows Installation

mangos-zero can be built and run on any Windows version newer than Windows 7, using the free Visual StudioExpress editions or the commercial editions.

2.1.4 Configuration

This section describes the configuration of the various servers and tools part of mangos-zero.

• Requirements

• Linux

• Windows

• Configuration

5

mangos-zero, Release 0.2.0

• Requirements

• Linux

• Windows

• Configuration

6 Chapter 2. Installation Guide

CHAPTER 3

Database Guide

A complete guide to conquering the mangos-zero databases.

3.1 Database Guide

This section will teach you all there is to know about the mangos-zero databases.

3.1.1 Overview

This documentation is part of an effort to recreate the original World of Warcraft content from scratch while makingsure each bit of content is valid for version 1.12.x; compatibility with the mangos-zero server, and our scripts isensured.

Development process

In order to develop a database which everyone can enjoy, we have defined a few processes and rules for contributingto our project. If you intend to submit pull requests and/or patches, please familiarize yourself with these rules priorto submitting your contributions.

• Content Research

• Content Updates

• Style Guide

Database structure

This includes the structure for the character, realm list, world and script library databases.

• Realm list database: the authentication and realm list server, where you configure users, available world servers,and also can ban abusive users, and IP addresses.

• World server database: the world server’s content source. This is where creatures, objects, quests, items, etc.are defined.

• Character database: the place where a player’s data for all characters are stored.

• Script library database: the storage space the the script library. Holds texts, dialogues and waypoints for anyscripted action.

7

mangos-zero, Release 0.2.0

3.1.2 Roadmap

The database is developed following a well defined roadmap. Here you will be able to find out what we are workingon, and what is coming up next. Please note that the roadmap is only listed detailed for the current month, changesplanned for later dates are just listed with their topics, excluding any further details.

Introduction

Developing a content database from scratch is not an easy task, and thus we do rely on a pre-defined roadmap to buildand release content for our project.

At first glance, game content for vanilla WoW may look small when compared to the expansions. But as soon as youlook below the surface, that theory does not hold up. Vanilla WoW did not only consist of creatures, quests, items andholiday events, it also had many events related to quests, random world events; there have been groups for creaturesand objects and many more features to consider.

Finally, we decided to follow the same process which Blizzard Entertainment followed during the World of Warcraftbeta: we will develop and release content based on level range.

Rationale

Developing and releasing content based on level ranges comes with a few benefits and solves a few issues we hadwhen we initially considered rebuilding the database from scratch:

• developing based on level ranges is better than building by zones: instead of having content available for specificzones and thus selected races in the early stages, a level based development process will result in having contentfor both factions at the same time.

• it will lead to developing the dungeon content, and content such as world events level based, too. This meansour future users and testers can enjoy the full range of content instead of partial content.

A list of region levels is available.

Milestones

The following table shows which level ranges we consider canonical for each of our release milestones.

Level range Milestone Release date1-10 Mortar combat 2014-08-3110-20 No awesome name yet. Not defined yet.20-25 No awesome name yet. Not defined yet.25-30 No awesome name yet. Not defined yet.30-35 No awesome name yet. Not defined yet.35-40 No awesome name yet. Not defined yet.40-45 No awesome name yet. Not defined yet.45-50 No awesome name yet. Not defined yet.50-55 No awesome name yet. Not defined yet.55-59 No awesome name yet. Not defined yet.60 No awesome name yet. Not defined yet.

3.1.3 Contributing

This section will help you getting started with database development by guiding you through the rules and exampleswhich we have defined for submitting proper contributions to the project.

8 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Content Research

In order to populate the database with clean content, each update begins with a research process, which you will getto know here.

Introduction

Since the original release of World of Warcraft was in November 2004 for US players and February 2005 for EUplayers, most original documentation and sources of information provided by Blizzard Entertainment or by the playercommunity is gone.

Thankfully, a very active player base, a few game database sites and a few other resources remain available to this day.Which these are and how you can and should use them is the focus of this document.

Available resources

There are several different types of resources available:

• game database sites: these sites did use several methods to record game content, either via storing game datafrom within the games user interface in Lua files, or via gathering the game’s cache files, commonly known asWDB files. Some even used a combination of both to cross-reference and verify game data.

• fan sites: fan sites usually gather anything posted about the game and post it including their own view pointson game updates. While these may not be resources for data, they may provide insight on how certain featuresworked during their release.

• official sites: during the early days of the game, Blizzard Entertainment ran dedicated websites for World ofWarcraft, which covered game features and updates. Sadly the original sites are not available any more and onlylittle is left on the current site.

• web archives: the wayback machine has been running for quite a few years, and allows us to look at old websites,archived versions of the site types described above. Most of the old sites long gone are still accessible there.

• game guides, books: BradyGames has released several books on each game expansion. In common these booksare of good quality, since BradyGames has used data provided by Blizzard Entertainment to populate the book’stables.

• cached game data: on rare occasions there are WDB files available created by the game. These can be parsed toextract some basic and some advanced game data.

Ranking resources

Sadly not all available resources are of equal value. Some contain incomplete data, others already contain data forgame content for expansions of the game, and some may even contain wrong content.

Thus we provide a quick run-down of how each available resource is to be valued, and which information should bevalued “more” valid than others.

Resource list, books

These books by BradyGames can be considered authoritative since they do provide original game data:

• World of Warcraft Official Strategy Guide

• World of Warcraft Master Guide, Second Edition <World of Warcraft Master Guide, Second Edition

3.1. Database Guide 9

mangos-zero, Release 0.2.0

• World of Warcraft Battle Chest Guide

• World of Warcraft: Dungeon Companion

Please note that the Strategy Guide covers World of Warcraft version 1.0, which was the last version before the game’srelease version 1.1. Using this as a base, it is possible to find out when content was added.

The Master Guide, the Battle Chest Guide and the Dungeon Companion cover content for the game’s release version1.12, thus providing us with a clear view on which content was available in the last branch of vanilla WoW.

It is important to note that none of these books covers extended stats for creatures, quests, etc.; only the basics arecovered.

Thus it should be considered that these books at least provide a view on what content actually existed and what didnot exist during vanilla WoW.

Resource list, game databases

Ever since the inception of World of Warcraft, people have tried to gather game content in online database to make iteasier for other players to explore and enjoy the game. Some are gone, others still exist. This section will show youthose still in existence.

• Wowhead: ever since 2006, Wowhead gathers game data both via uploaded WDB files and gathering in-gamedata with the client’s Lua interface. The most interesting feature of Wowhead still is the comments section forgame data. Usually you will be able to lookup creatures, quests, items, game objects and spells, and can use thecomments combined with the data displayed to find out more on game data.

• Wowhead archive site: With the release of the Cataclym expansion, Wowhead moved old game data for everyexpansion up to Wrath of the Lich King

• including The Burning Crusade - into their archive site. In many cases the archive site allows you to view gamedata, in an older state, and thus can be used to verify older data.

• WowPeek: WowPeek was targeted at The Burning Crusade, and gathered game data via WDB files and in-gamedata via the client’s Lua interface. While not as comprehensive as Wowhead, it still has benefits, and may beused to cross-reference data from the Wowhead archive site.

• Sigrie: MMO-Champion started a game database of its’ own with the Wrath of the Lich King, mainly to reducereliance on Wowhead for linking game data in their news posts. What Sigrie excels in, is completeness. WhileWowhead usually only offers game objects, that are somehow connected to quests, Sigrie simply imported allvia WDB files. This is very useful to find missing game objects, and also missing creatures.

• WowDB: with Cataclysm MMO-Champion wanted to do something different, and improve the integration oftheir game content site with the Curse network. To this day, WoWDB still is maintained and offers valuabledata. Sadly it is not much of use for anything preceding the Cataclysm.

Resource list, fan sites

Resource list, archived sites

Style Guide

Since we want to ensure a consistent quality for each database content upgrade, this style guide will show you, whichsteps have to be taken to create an good update.

10 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Introduction

When developing an update, it is important to account for style. Style ensures that other users can read and understandyour contributing and even improve it.

Preparing an update

Creating an update

Submitting an update

Content Updates

A content update is defined as a set of SQL queries which insert an atomic unit of game content which just works.

Introduction

Any content update starts with a healthy dose of research. Once your research is complete, you should create a newissue on the issue tracker.

Documenting the update

For contributing to our project, it is considered mandatory to create a new issue for each update.

Currently we support five issue components:

• Creatures

• Games objects

• Items

• Quests

• Events

Selecting the component and the release version for which the issue should be valid should be considered carefully.Here is a few examples:

1. You want to add the quest Rite of Vision to the database, thus you would create an issue named “Quest: Rite ofVision” - the prefix should be identical to the component for easier sorting.

2. Now you document the quest template, involved creatures, movements, scripts, etc. in your issue.

3. Once you’re finished with documentation, add a comment to your issue, with a request for review. One or moredevelopers will be reviewing your issue, and - if possible - add further documentation, or provide some hints forimprovements or praise, well, the later one of course if you did an awesome job.

4. Once your ticket has been reviewed and documentation is considered final by one or more developers, youshould fork the database repository and submit a pull request.

When crafting your issue, feel free to attach images, add links to relevant sites, or even to YouTube videos for thecontent in question. Anything that provides proof for the content being correct is welcome.

3.1. Database Guide 11

mangos-zero, Release 0.2.0

Building an update

Submitting an update

Region levels

Since we develop content based on level ranges, the following tables provide you with a list of these. Each level rangematches with a milestone in our roadmap.

Eastern Kingdoms

Region Level range PvP status NotesElwynn Forest 1-10 Alliance Human StartingDun Morogh 1-10 Alliance Dwarf/Gnome StartingTirisfal Glades 1-10 Horde Undead StartingLoch Modan 10-20 Alliance Dwarf favouredSilverpine Forest 10-20 Horde Undead favouredWestfall 10-20 Alliance Human favouredRedridge Mountains 15-25 Contested Alliance favouredDuskwood 18-30 Contested Alliance favouredHillsbrad Foothills 20-30 ContestedWetlands 20-30 Contested Alliance favouredAlterac Mountains 30-40 ContestedArathi Highlands 30-40 ContestedStranglethorn Vale 30-45 ContestedBadlands 35-45 ContestedSwamp of Sorrows 35-45 ContestedThe Hinterlands 40-50 ContestedSearing Gorge 43-50 ContestedThe Blasted Lands 45-55 ContestedBurning Steppes 50-58 ContestedWestern Plaguelands 51-58 ContestedEastern Plaguelands 53-60 Contested

12 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Kalimdor

Region Level range PvP status NotesDurotar 1-10 Horde Orc/Troll StartingMulgore 1-10 Horde Tauren StartingTeldrassil 1-10 Alliance Night Elf StartingDarkshore 10-20 Alliance Night Elf favouredThe Barrens 10-25 Horde Horde favouredStonetalon Mountains 15-27 Contested Horde favouredAshenvale Forest 18-30 Contested Alliance favouredThousand Needles 25-35 Contested Horde favouredDesolace 30-40 Contested Horde favouredDustwallow Marsh 35-45 ContestedFeralas 40-50 ContestedTanaris Desert 40-50 ContestedAzshara 45-55 ContestedFelwood 48-55 ContestedUn’Goro Crater 48-55 ContestedSilithus 55-60 ContestedWinterspring 55-60 Contested

Instances

Name Level range PvP status NotesRagefire Chasm 13 - 18 HordeWailing Caverns 17 - 24Deadmines 17 - 26Shadowfang Keep 22 - 30Blackfathom Deeps 24 - 32Stormwind Stockades 24 - 32 AllianceGnomeregan 29 - 38Razorfen Kraul 29 - 38Scarlet Monastery 34 - 45Razorfen Downs 37 - 46Uldaman 41 - 51Zul’Farak 44 - 54Maraudon 46 - 55Sunken Temple 45 - 55Blackrock Depths 52 - 60Lower Blackrock Spire 55 - 60Dire Maul - East 55 - 60Stratholme 58 - 60Scholomance 58 - 60Dire Maul - West 55 - 60Dire Maul - North 55 - 60

3.1. Database Guide 13

mangos-zero, Release 0.2.0

Raids

Name Level range PvP status NotesUpper Blackrock Spire 55 - 60Onyxia’s Lair 60Zul’Gurub 56 - 60 20 playersMolten Core 60Blackwing Lair 60Ruins of Ahn’Qiraj 60Temple of Ahn’Qiraj 60Naxxramas 60

Battlegrounds

Name Level range PvP status NotesWarsong Gulch 10 - 60 10 per factionArathi Basin 30 - 60 15 per factionAlterac Valley 51 - 60 40 per faction

If you have suggestions for topics we should cover here, please file an issue.

3.1.4 Character database

The character database contains user created content, including character and pet data and the characters progressthrough game content.

Parts of the database are responsible for saving the current state of the world, so one might say, instead of a characterdatabase, this should rather be considered as world state database.

“auction” table

The auction table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI 0houseid int(11) unsigned NO 0itemguid int(11) unsigned NO 0item_template int(11) unsigned NO 0item_count int(11) unsigned NO 0item_randompropertyid int(11) NO 0itemowner int(11) unsigned NO 0buyoutprice int(11) NO 0time bigint(40) unsigned NO 0buyguid int(11) unsigned NO 0lastbid int(11) NO 0startbid int(11) NO 0deposit int(11) NO 0

14 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

id

houseid

itemguid

item_template

item_count

item_randompropertyid

itemowner

buyoutprice

time

buyguid

lastbid

startbid

deposit

“bugreport” table

The bugreport table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) NO PRI NULL auto_incrementtype longtext NO NULLcontent longtext NO NULL

Fields

id

3.1. Database Guide 15

mangos-zero, Release 0.2.0

type

content

“character_action” table

The character_action table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0button tinyint(3) unsigned NO PRI 0action int(11) unsigned NO 0type tinyint(3) unsigned NO 0

Fields

guid

button

action

type

“character_aura” table

The character_aura table holds TODO

16 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0caster_guid bigint(20) unsigned NO PRI 0item_guid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0stackcount int(11) unsigned NO 1remaincharges int(11) unsigned NO 0basepoints0 int(11) NO 0basepoints1 int(11) NO 0basepoints2 int(11) NO 0periodictime0 int(11) unsigned NO 0periodictime1 int(11) unsigned NO 0periodictime2 int(11) unsigned NO 0maxduration int(11) NO 0remaintime int(11) NO 0effIndexMask int(11) unsigned NO 0

Fields

guid

caster_guid

item_guid

spell

stackcount

remaincharges

basepoints0

basepoints1

basepoints2

periodictime0

periodictime1

periodictime2

3.1. Database Guide 17

mangos-zero, Release 0.2.0

maxduration

remaintime

effIndexMask

“character_battleground_data” table

The character_battleground_data table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0instance_id int(11) unsigned NO 0team int(11) unsigned NO 0join_x float NO 0join_y float NO 0join_z float NO 0join_o float NO 0join_map int(11) NO 0

Fields

guid

instance_id

team

join_x

join_y

join_z

join_o

join_map

“character_db_version” table

The character_db_version table holds TODO

18 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrarequired_z1794_s1350_11716_09_characters_auction bit(1) YES NULL

Fields

required_z1794_s1350_11716_09_characters_auction

“character_gifts” table

The character_gifts table holds TODO

Table structure

Field Type Null Key Default Extraguid int(20) unsigned NO MUL 0item_guid int(11) unsigned NO PRI 0entry int(20) unsigned NO 0flags int(20) unsigned NO 0

Fields

guid

item_guid

entry

flags

“character_homebind” table

The character_homebind table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0map int(11) unsigned NO 0zone int(11) unsigned NO 0position_x float NO 0position_y float NO 0position_z float NO 0

3.1. Database Guide 19

mangos-zero, Release 0.2.0

Fields

guid

map

zone

position_x

position_y

position_z

“character_honor_cp” table

The character_honor_cp table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO MUL 0victim_type tinyint(3) unsigned NO 4victim int(11) unsigned NO 0honor float NO 0date int(11) unsigned NO 0type tinyint(3) unsigned NO 0

Fields

guid

victim_type

victim

honor

date

type

20 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“character_instance” table

The character_instance table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0instance int(11) unsigned NO PRI 0permanent tinyint(1) unsigned NO 0

Fields

guid

instance

permanent

“character_inventory” table

The character_inventory table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO MUL 0bag int(11) unsigned NO 0slot tinyint(3) unsigned NO 0item int(11) unsigned NO PRI 0item_template int(11) unsigned NO 0

Fields

guid

bag

slot

item

item_template

3.1. Database Guide 21

mangos-zero, Release 0.2.0

“character_pet” table

The character_pet table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI 0entry int(11) unsigned NO 0owner int(11) unsigned NO MUL 0modelid int(11) unsigned YES 0CreatedBySpell int(11) unsigned NO 0PetType tinyint(3) unsigned NO 0level int(11) unsigned NO 1exp int(11) unsigned NO 0Reactstate tinyint(1) unsigned NO 0loyaltypoints int(11) NO 0loyalty int(11) unsigned NO 0trainpoint int(11) NO 0name varchar(100) YES Petrenamed tinyint(1) unsigned NO 0slot int(11) unsigned NO 0curhealth int(11) unsigned NO 1curmana int(11) unsigned NO 0curhappiness int(11) unsigned NO 0savetime bigint(20) unsigned NO 0resettalents_cost int(11) unsigned NO 0resettalents_time bigint(20) unsigned NO 0abdata longtext YES NULLteachspelldata longtext YES NULL

Fields

id

entry

owner

modelid

CreatedBySpell

PetType

level

22 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

exp

Reactstate

loyaltypoints

loyalty

trainpoint

name

renamed

slot

curhealth

curmana

curhappiness

savetime

resettalents_cost

resettalents_time

abdata

teachspelldata

“character_queststatus” table

The character_queststatus table holds TODO

3.1. Database Guide 23

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0quest int(11) unsigned NO PRI 0status int(11) unsigned NO 0rewarded tinyint(1) unsigned NO 0explored tinyint(1) unsigned NO 0timer bigint(20) unsigned NO 0mobcount1 int(11) unsigned NO 0mobcount2 int(11) unsigned NO 0mobcount3 int(11) unsigned NO 0mobcount4 int(11) unsigned NO 0itemcount1 int(11) unsigned NO 0itemcount2 int(11) unsigned NO 0itemcount3 int(11) unsigned NO 0itemcount4 int(11) unsigned NO 0

Fields

guid

quest

status

rewarded

explored

timer

mobcount1

mobcount2

mobcount3

mobcount4

itemcount1

itemcount2

24 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

itemcount3

itemcount4

“character_reputation” table

The character_reputation table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0faction int(11) unsigned NO PRI 0standing int(11) NO 0flags int(11) NO 0

Fields

guid

faction

standing

flags

“character_skills” table

The character_skills table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI NULLskill mediumint(9) unsigned NO PRI NULLvalue mediumint(9) unsigned NO NULLmax mediumint(9) unsigned NO NULL

Fields

guid

skill

3.1. Database Guide 25

mangos-zero, Release 0.2.0

value

max

“character_social” table

The character_social table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0friend int(11) unsigned NO PRI 0flags tinyint(1) unsigned NO PRI 0

Fields

guid

friend

flags

“character_spell_cooldown” table

The character_spell_cooldown table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0item int(11) unsigned NO 0time bigint(20) unsigned NO 0

Fields

guid

spell

item

time

26 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“character_spell” table

The character_spell table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0active tinyint(3) unsigned NO 1disabled tinyint(3) unsigned NO 0

Fields

guid

spell

active

disabled

“characters” table

The characters table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0account int(11) unsigned NO MUL 0name varchar(12) NO MULrace tinyint(3) unsigned NO 0class tinyint(3) unsigned NO 0gender tinyint(3) unsigned NO 0level tinyint(3) unsigned NO 0xp int(10) unsigned NO 0money int(10) unsigned NO 0playerBytes int(10) unsigned NO 0playerBytes2 int(10) unsigned NO 0playerFlags int(10) unsigned NO 0position_x float NO 0position_y float NO 0position_z float NO 0map int(11) unsigned NO 0orientation float NO 0

Continued on next page

3.1. Database Guide 27

mangos-zero, Release 0.2.0

Table 3.1 – continued from previous pageField Type Null Key Default Extrataximask longtext YES NULLonline tinyint(3) unsigned NO MUL 0cinematic tinyint(3) unsigned NO 0totaltime int(11) unsigned NO 0leveltime int(11) unsigned NO 0logout_time bigint(20) unsigned NO 0is_logout_resting tinyint(3) unsigned NO 0rest_bonus float NO 0resettalents_cost int(11) unsigned NO 0resettalents_time bigint(20) unsigned NO 0trans_x float NO 0trans_y float NO 0trans_z float NO 0trans_o float NO 0transguid bigint(20) unsigned NO 0extra_flags int(11) unsigned NO 0stable_slots tinyint(1) unsigned NO 0at_login int(11) unsigned NO 0zone int(11) unsigned NO 0death_expire_time bigint(20) unsigned NO 0taxi_path text YES NULLhonor_highest_rank int(11) unsigned NO 0honor_standing int(11) unsigned NO 0stored_honor_rating float NO 0stored_dishonorable_kills int(11) NO 0stored_honorable_kills int(11) NO 0watchedFaction int(10) unsigned NO 0drunk smallint(5) unsigned NO 0health int(10) unsigned NO 0power1 int(10) unsigned NO 0power2 int(10) unsigned NO 0power3 int(10) unsigned NO 0power4 int(10) unsigned NO 0power5 int(10) unsigned NO 0exploredZones longtext YES NULLequipmentCache longtext YES NULLammoId int(10) unsigned NO 0actionBars tinyint(3) unsigned NO 0deleteInfos_Account int(11) unsigned YES NULLdeleteInfos_Name varchar(12) YES NULLdeleteDate bigint(20) unsigned YES NULL

Fields

guid

account

name

28 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

race

class

gender

level

xp

money

playerBytes

playerBytes2

playerFlags

position_x

position_y

position_z

map

orientation

taximask

online

cinematic

totaltime

leveltime

logout_time

is_logout_resting

3.1. Database Guide 29

mangos-zero, Release 0.2.0

rest_bonus

resettalents_cost

resettalents_time

trans_x

trans_y

trans_z

trans_o

transguid

extra_flags

stable_slots

at_login

zone

death_expire_time

taxi_path

honor_highest_rank

honor_standing

stored_honor_rating

stored_dishonorable_kills

stored_honorable_kills

watchedFaction

drunk

30 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

health

power1

power2

power3

power4

power5

exploredZones

equipmentCache

ammoId

actionBars

deleteInfos_Account

deleteInfos_Name

deleteDate

“character_stats” table

The character_stats table holds TODO

3.1. Database Guide 31

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0maxhealth int(10) unsigned NO 0maxpower1 int(10) unsigned NO 0maxpower2 int(10) unsigned NO 0maxpower3 int(10) unsigned NO 0maxpower4 int(10) unsigned NO 0maxpower5 int(10) unsigned NO 0maxpower6 int(10) unsigned NO 0maxpower7 int(10) unsigned NO 0strength int(10) unsigned NO 0agility int(10) unsigned NO 0stamina int(10) unsigned NO 0intellect int(10) unsigned NO 0spirit int(10) unsigned NO 0armor int(10) unsigned NO 0resHoly int(10) unsigned NO 0resFire int(10) unsigned NO 0resNature int(10) unsigned NO 0resFrost int(10) unsigned NO 0resShadow int(10) unsigned NO 0resArcane int(10) unsigned NO 0blockPct float unsigned NO 0dodgePct float unsigned NO 0parryPct float unsigned NO 0critPct float unsigned NO 0rangedCritPct float unsigned NO 0attackPower int(10) unsigned NO 0rangedAttackPower int(10) unsigned NO 0

Fields

guid

maxhealth

maxpower1

maxpower2

maxpower3

maxpower4

maxpower5

32 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

maxpower6

maxpower7

strength

agility

stamina

intellect

spirit

armor

resHoly

resFire

resNature

resFrost

resShadow

resArcane

blockPct

dodgePct

parryPct

critPct

rangedCritPct

attackPower

rangedAttackPower

3.1. Database Guide 33

mangos-zero, Release 0.2.0

“character_ticket” table

The character_ticket table holds TODO

Table structure

Field Type Null Key Default Extraticket_id int(11)

unsignedNO PRI NULL auto_increment

guid int(11)unsigned

NO 0

ticket_text text YES NULLresponse_text text YES NULLticket_lastchange timestamp NO CUR-

RENT_TIMESTAMPon updateCURRENT_TIMESTAMP

Fields

ticket_id

guid

ticket_text

response_text

ticket_lastchange

“character_tutorial” table

The character_tutorial table holds TODO

Table structure

Field Type Null Key Default Extraaccount bigint(20) unsigned NO PRI NULL auto_incrementtut0 int(11) unsigned NO 0tut1 int(11) unsigned NO 0tut2 int(11) unsigned NO 0tut3 int(11) unsigned NO 0tut4 int(11) unsigned NO 0tut5 int(11) unsigned NO 0tut6 int(11) unsigned NO 0tut7 int(11) unsigned NO 0

34 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

account

tut0

tut1

tut2

tut3

tut4

tut5

tut6

tut7

“corpse” table

The corpse table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0player int(11) unsigned NO MUL 0position_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0map int(11) unsigned NO 0time bigint(20) unsigned NO MUL 0corpse_type tinyint(3) unsigned NO MUL 0instance int(11) unsigned NO MUL 0

Fields

guid

player

3.1. Database Guide 35

mangos-zero, Release 0.2.0

position_x

position_y

position_z

orientation

map

time

corpse_type

instance

“creature_respawn” table

The creature_respawn table holds TODO

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0respawntime bigint(20) unsigned NO 0instance mediumint(8) unsigned NO PRI 0

Fields

guid

respawntime

instance

“game_event_status” table

The game_event_status table holds TODO

Table structure

Field Type Null Key Default Extraevent smallint(6) unsigned NO PRI 0

36 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

event

“gameobject_respawn” table

The gameobject_respawn table holds TODO

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0respawntime bigint(20) unsigned NO 0instance mediumint(8) unsigned NO PRI 0

Fields

guid

respawntime

instance

“group_instance” table

The group_instance table holds TODO

Table structure

Field Type Null Key Default ExtraleaderGuid int(11) unsigned NO PRI 0instance int(11) unsigned NO PRI 0permanent tinyint(1) unsigned NO 0

Fields

leaderGuid

instance

permanent

“group_member” table

The group_member table holds TODO

3.1. Database Guide 37

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default ExtragroupId int(11) unsigned NO PRI NULLmemberGuid int(11) unsigned NO PRI NULLassistant tinyint(1) unsigned NO NULLsubgroup smallint(6) unsigned NO NULL

Fields

groupId

memberGuid

assistant

subgroup

“groups” table

The groups table holds TODO

Table structure

Field Type Null Key Default ExtragroupId int(11) unsigned NO PRI NULLleaderGuid int(11) unsigned NO UNI NULLmainTank int(11) unsigned NO NULLmainAssistant int(11) unsigned NO NULLlootMethod tinyint(4) unsigned NO NULLlooterGuid int(11) unsigned NO NULLlootThreshold tinyint(4) unsigned NO NULLicon1 int(11) unsigned NO NULLicon2 int(11) unsigned NO NULLicon3 int(11) unsigned NO NULLicon4 int(11) unsigned NO NULLicon5 int(11) unsigned NO NULLicon6 int(11) unsigned NO NULLicon7 int(11) unsigned NO NULLicon8 int(11) unsigned NO NULLisRaid tinyint(1) unsigned NO NULL

Fields

groupId

leaderGuid

38 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

mainTank

mainAssistant

lootMethod

looterGuid

lootThreshold

icon1

icon2

icon3

icon4

icon5

icon6

icon7

icon8

isRaid

“guild_eventlog” table

The guild_eventlog table holds TODO

Table structure

Field Type Null Key Default Extraguildid int(11) unsigned NO PRI NULLLogGuid int(11) unsigned NO PRI NULLEventType tinyint(1) unsigned NO NULLPlayerGuid1 int(11) unsigned NO MUL NULLPlayerGuid2 int(11) unsigned NO MUL NULLNewRank tinyint(2) unsigned NO NULLTimeStamp bigint(20) unsigned NO NULL

3.1. Database Guide 39

mangos-zero, Release 0.2.0

Fields

guildid

LogGuid

EventType

PlayerGuid1

PlayerGuid2

NewRank

TimeStamp

“guild_member” table

The guild_member table holds TODO

Table structure

Field Type Null Key Default Extraguildid int(6) unsigned NO MUL 0guid int(11) unsigned NO PRI 0rank tinyint(2) unsigned NO 0pnote varchar(255) NOoffnote varchar(255) NO

Fields

guildid

guid

rank

pnote

offnote

“guild_rank” table

The guild_rank table holds TODO

40 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguildid int(6) unsigned NO PRI 0rid int(11) unsigned NO PRI NULLrname varchar(255) NOrights int(3) unsigned NO 0

Fields

guildid

rid

rname

rights

“guild” table

The guild table holds TODO

Table structure

Field Type Null Key Default Extraguildid int(6) unsigned NO PRI 0name varchar(255) NOleaderguid int(6) unsigned NO 0EmblemStyle int(5) NO 0EmblemColor int(5) NO 0BorderStyle int(5) NO 0BorderColor int(5) NO 0BackgroundColor int(5) NO 0info text NO NULLmotd varchar(255) NOcreatedate bigint(20) unsigned NO 0

Fields

guildid

name

leaderguid

3.1. Database Guide 41

mangos-zero, Release 0.2.0

EmblemStyle

EmblemColor

BorderStyle

BorderColor

BackgroundColor

info

motd

createdate

“instance_reset” table

The instance_reset table holds TODO

Table structure

Field Type Null Key Default Extramapid int(11) unsigned NO PRI 0resettime bigint(40) unsigned NO 0

Fields

mapid

resettime

“instance” table

The instance table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI 0map int(11) unsigned NO MUL 0resettime bigint(40) unsigned NO MUL 0data longtext YES NULL

42 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

id

map

resettime

data

“item_instance” table

The item_instance table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0owner_guid int(11) unsigned NO MUL 0data longtext YES NULL

Fields

guid

owner_guid

data

“item_loot” table

The item_loot table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0owner_guid int(11) unsigned NO MUL 0itemid int(11) unsigned NO PRI 0amount int(11) unsigned NO 0property int(11) NO 0

Fields

guid

3.1. Database Guide 43

mangos-zero, Release 0.2.0

owner_guid

itemid

amount

property

“item_text” table

The item_text table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI 0text longtext YES NULL

Fields

id

text

“mail_items” table

The mail_items table holds TODO

Table structure

Field Type Null Key Default Extramail_id int(11) NO PRI 0item_guid int(11) NO PRI 0item_template int(11) NO 0receiver int(11) unsigned NO MUL 0

Fields

mail_id

item_guid

item_template

44 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

receiver

“mail” table

The mail table holds TODO

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI 0messageType tinyint(3) unsigned NO 0stationery tinyint(3) NO 41mailTemplateId mediumint(8) unsigned NO 0sender int(11) unsigned NO 0receiver int(11) unsigned NO MUL 0subject longtext YES NULLitemTextId int(11) unsigned NO 0has_items tinyint(3) unsigned NO 0expire_time bigint(40) unsigned NO 0deliver_time bigint(40) unsigned NO 0money int(11) unsigned NO 0cod int(11) unsigned NO 0checked tinyint(3) unsigned NO 0

Fields

id

messageType

stationery

mailTemplateId

sender

receiver

subject

itemTextId

has_items

expire_time

3.1. Database Guide 45

mangos-zero, Release 0.2.0

deliver_time

money

cod

checked

“pet_aura” table

The pet_aura table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0caster_guid bigint(20) unsigned NO PRI 0item_guid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0stackcount int(11) unsigned NO 1remaincharges int(11) unsigned NO 0basepoints0 int(11) NO 0basepoints1 int(11) NO 0basepoints2 int(11) NO 0periodictime0 int(11) unsigned NO 0periodictime1 int(11) unsigned NO 0periodictime2 int(11) unsigned NO 0maxduration int(11) NO 0remaintime int(11) NO 0effIndexMask int(11) unsigned NO 0

Fields

guid

caster_guid

item_guid

spell

stackcount

remaincharges

46 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

basepoints0

basepoints1

basepoints2

periodictime0

periodictime1

periodictime2

maxduration

remaintime

effIndexMask

“petition” table

The petition table holds TODO

Table structure

Field Type Null Key Default Extraownerguid int(10) unsigned NO PRI NULLpetitionguid int(10) unsigned YES 0name varchar(255) NO

Fields

ownerguid

petitionguid

name

“petition_sign” table

The petition_sign table holds TODO

3.1. Database Guide 47

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraownerguid int(10) unsigned NO MUL NULLpetitionguid int(11) unsigned NO PRI 0playerguid int(11) unsigned NO PRI 0player_account int(11) unsigned NO 0

Fields

ownerguid

petitionguid

playerguid

player_account

“pet_spell_cooldown” table

The pet_spell_cooldown table holds TODO

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0time bigint(20) unsigned NO 0

Fields

guid

spell

time

“pet_spell” table

The pet_spell table holds TODO

48 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(11) unsigned NO PRI 0spell int(11) unsigned NO PRI 0active int(11) unsigned NO 0

Fields

guid

spell

active

“pvpstats_battlegrounds” table

The pvpstats_battlegrounds table holds TODO

Table structure

Field Type Null Key Default Extraid bigint(20) unsigned NO PRI 0winner_team tinyint(4) NObracket_id tinyint(3) unsigned NOtype tinyint(3) unsigned NOdate datetime NO

Fields

id

winner_team

bracket_id

type

date

“pvpstats_players” table

The pvpstats_players table holds TODO

3.1. Database Guide 49

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrabattleground_id bigint(20) unsigned NO PRI 0player_guid int(10) unsigned NOscore_killing_blows mediumint(8) unsigned NOscore_deaths mediumint(8) unsigned NOscore_honorable_kills mediumint(8) unsigned NOscore_bonus_honor mediumint(8) unsigned NOscore_damage_done mediumint(8) unsigned NOscore_healing_done mediumint(8) unsigned NOattr_1 mediumint(8) unsigned NO 0attr_2 mediumint(8) unsigned NO 0attr_3 mediumint(8) unsigned NO 0attr_4 mediumint(8) unsigned NO 0attr_5 mediumint(8) unsigned NO 0

Fields

battleground_id

player_guid

score_killing_blows

score_deaths

score_honorable_kills

score_bonus_honor

score_damage_done

score_healing_done

attr_1

attr_2

attr_3

attr_4

attr_5

50 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“saved_variables” table

The saved_variables table holds TODO

Table structure

Field Type Null Key Default ExtraNextMaintenanceDate int(11) unsigned NO 0cleaning_flags int(11) unsigned NO 0

Fields

NextMaintenanceDate

cleaning_flags

“world” table

The world table holds TODO

Table structure

Field Type Null Key Default Extramap int(11) unsigned NO PRI 0data longtext YES NULL

Fields

map

data

3.1.5 Realm list database

The ream list database is used to store user accounts, active and inactive realms, realm statistics and bans for IPaddresses and user accounts.

“account” table

The account table holds information on all accounts created.

3.1. Database Guide 51

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI NULL auto_incrementusername varchar(32) NO UNIsha_pass_hash varchar(40) NOgmlevel tinyint(3) unsigned NO MUL 0sessionkey longtext YES NULLv longtext YES NULLs longtext YES NULLemail text YES NULLjoindate timestamp NO CURRENT_TIMESTAMPlast_ip varchar(30) NO 0.0.0.0failed_logins int(11) unsigned NO 0locked tinyint(3) unsigned NO 0last_login timestamp NO 0000-00-00 00:00:00active_realm_id int(11) unsigned NO 0expansion tinyint(3) unsigned NO 0mutetime bigint(40) unsigned NO 0locale tinyint(3) unsigned NO 0

Fields

Descriptions for each field with their meaning, usage and relations are available below.

id The unique identifier for an account.

username The unique username for an account.

sha_pass_hash This field contains the encrypted password. The encryption is SHA1 and is in the following format:username:password.

The SQL to create the password (or to compare with the current hash) is:

SELECT`username`,SHA1(CONCAT(UPPER(`username`), ':', UPPER('password'))),`sha_pass_hash`

FROM `account`;

gmlevel The access level for an account.

Valid values are:

• 0: Player

• 1: Moderator

• 2: Gamemaster

• 3: Administrator

Additionally an account level of 4 is available, but it only applies to access control within the world server console.

52 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

sessionkey TODO

v TODO

s TODO

email A well-formed, unique email address for the account.

joindate The date when the account was created.

last_ip A valid IP address which was last used to connect to the realm list.

failed_logins The amount of failed logins for this account. Monitoring this field may help spotting users who try togain access to accounts which are not their own, or who have forgotten their passwords.

locked This is a boolean field, which will lock an account to the IP address recorded in the last_ip field when setto 1. If set to 0, a user may log in from any IP address and following logins with also update the last_ip field.

last_login The date when the account was last logged in.

active_realm_id This references the realmlist tables unique ID of the realm server on which the account is currentlyactive. This will allow the game client to connect to the realm the account was active on at the last login.

expansion The field controls to which expansion’s content a user has access. By default this is set to 0, allowingaccess to vanilla WoW content. In mangos-zero, other values can be ignored, since there is no expansion.

mutetime The time, in Unix time, when the account will be unmuted. To see when mute will be expired you canuse this query:

SELECT `username`, FROM_UNIXTIME(`mutetime`) FROM `account`;

locale The locale used by the client logged into this account. If multiple locale data has been configured and addedto the world servers, the world servers will return the proper locale strings to the client.

• 0: English

• 1: Korean

• 2: French

• 3: German

• 4: Chinese

• 5: Taiwanese

• 6: Spanish - Spain

• 7: Spanish - Latin America

3.1. Database Guide 53

mangos-zero, Release 0.2.0

“account_banned” table

The account_banned table holds information on all accounts which have been banned from logging in.

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI NULLbandate bigint(40) NO PRI 0unbandate bigint(40) NO 0bannedby varchar(50) NO NULLbanreason varchar(255) NO NULLactive tinyint(4) NO 1

Fields

Descriptions for each field with their meaning, usage and relations are available below.

id The account of the user banned. This references the unique key of the account table.

bandate The date on which the IP address has been banned.

unbandate The date on which the IP address will be unbanned. If not set, the IP address will be banned indefinitely.

bannedby The account name of the user who banned the IP address. This references the account tables usernamefield.

banreason A short comment describing the reason for the IP address ban.

active Describes if a ban is currently active, or not.

• 0: ban is inactive,

• 1: ban is active

“ip_banned” table

The ip_banned table holds information on all IP addresses which have been banned from logging in.

Table structure

Field Type Null Key Default Extraip varchar(32) NO PRI 0.0.0.0bandate bigint(40) NO PRI NULLunbandate bigint(40) NO NULLbannedby varchar(50) NO [Console]banreason varchar(255) NO no reason

54 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

Descriptions for each field with their meaning, usage and relations are available below.

ip A valid IP address which is blocked from connecting to the realm list server and thus from connecting to worldservers, too.

bandate The date on which the IP address has been banned. This is saved as a Unix timestamp.

unbandate The date on which the IP address will be unbanned. If not set, the IP address will be banned indefinitely.This is saved as a Unix timestamp.

bannedby The account name of the user who banned the IP address. This references the account tables usernamefield.

banreason A short comment describing the reason for the IP address ban.

“realmcharacters” table

The realmcharacters table holds information on how many characters an account has on a specific realm.

Table structure

Field Type Null Key Default Extrarealmid int(11) unsigned NO PRI 0acctid int(11) unsigned NO PRI NULLnumchars tinyint(3) unsigned NO 0

Fields

Descriptions for each field with their meaning, usage and relations are available below.

realmid This references the realmlist tables unique ID of the realm server for which the entry is valid.

acctid This references the account tables unique ID of the user account for which the entry is valid.

numchars This field contains the number of characters stored on a realm for the account.

“realmd_db_version” table

The realmd_db_version identifies the realm list data store to the realm server by providing a bit field with arevision number/name combination as name.

3.1. Database Guide 55

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrarequired_z2426_01_realmd_relations bit(1) YES NULL

Fields

Descriptions for each field with their meaning, usage and relations are available below.

required_z2426_01_realmd_relations This field is used to indicate the last database structure update applied. Eachapplied update will renamed the field, in order to allow users to select the required database upgrade query from theprovided upgrade queries.

“realmlist” table

The realmlist table holds information on all registered world servers.

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI NULL auto_incrementname varchar(32) NO UNIaddress varchar(32) NO 127.0.0.1port int(11) NO 8085icon tinyint(3) unsigned NO 0realmflags tinyint(3) unsigned NO 2timezone tinyint(3) unsigned NO 0allowedSecurityLevel tinyint(3) unsigned NO 0population float unsigned NO 0realmbuilds varchar(64) NO

Fields

Descriptions for each field with their meaning, usage and relations are available below.

id The unique identifier for a realm server.

name The name to be displayed in the realm selection list.

address A valid IP address at which the world server is accessible. This can be a private IP address, like192.168.0.1, but also a public IP address if your world server is publicly accessible.

The realm list server will redirect connections after logging in and selecting a realm to this IP address.

Please note, that the IP address configured here has to match with the IP address you have configured in the worldserver configuration file.

56 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

port A valid port number on which this realm server listens to connections.

icon The type of realm server.

Valid values are:

• 0: Normal

• 1: PvP

• 6: RP

• 8: RP PvP

realmflags

Realm flags allow the users to highlight realms for certain situations.

• 2: Marks the realm as offline

• 4: Shows the realms supported version in realm list

• 32: Highlight realm for new players

• 64: Marks realm as recommended

timezone The realm time-zone, it will be displayed in the tabs of the realm list.

Valid values are:

• 1: United States (default)

• 2: Korea

• 3: English

• 3: German

• 3: French

• 4: Taiwan

• 5: China

• 99: Test Server

• 101: QA Server

allowedSecurityLevel The minimum account gmlevel required for accounts to log in to this realm. Changingthis value will automatically update the visible in-game realm list, but the realm server must be restarted for it to takeeffect.

population This field is automatically updated at regular intervals and will have the current population.

The formula to calculate the value in this field is:

𝑝𝑙𝑎𝑦𝑒𝑟𝐶𝑜𝑢𝑛𝑡/𝑚𝑎𝑥𝑃 𝑙𝑎𝑦𝑒𝑟𝐶𝑜𝑢𝑛𝑡 * 2

In the realm list in-game, the thresholds for low, medium and high population are 0.5, 1.0 and 2.0 respectively.

3.1. Database Guide 57

mangos-zero, Release 0.2.0

realmbuilds Accepted Client version for the realm, in form of comma separated value.

“uptime” table

The uptime table holds information on how long a specific (registered) world server has been up and running.

Table structure

Field Type Null Key Default Extrarealmid int(11) unsigned NO PRI NULLstarttime bigint(20) unsigned NO PRI 0startstring varchar(64) NOuptime bigint(20) unsigned NO 0maxplayers smallint(5) unsigned NO 0

Fields

Descriptions for each field with their meaning, usage and relations are available below.

realmid This references the realmlist tables unique ID of the realm server for which the entry is valid.

starttime The time when the server was started, in Unix time.

startstring The time when the server was started, in string format. This does not include the current time zone.

uptime The uptime of the server, in seconds.

maxplayers The maximum number of players connected.

3.1.6 Script library database

The script library database contains game content used by the script library.

“custom_texts” table

The custom_texts table holds custom text strings, sounds, and emotes used in scripted events.

58 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) NO PRI NULLcontent_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULLsound mediumint(8) unsigned NO 0type tinyint(3) unsigned NO 0language tinyint(3) unsigned NO 0emote smallint(5) unsigned NO 0comment text YES NULL

Fields

entry The unique identifier of the script text entry. Identifiers here have to match with the identifier set in the stringusing the text.

Note: Identifiers use a fixed format of -1<map-identifier><three-digit-counter>.

content_default The default text to be displayed in English.

content_loc1 Korean localization of content_default.

content_loc2 French localization of content_default.

content_loc3 German localization of content_default.

content_loc4 Chinese localization of content_default.

content_loc5 Taiwanese localization of content_default.

content_loc6 Spanish Spain localization of content_default.

content_loc7 Spanish Latin America localization of content_default.

content_loc8 Russian localization of content_default.

3.1. Database Guide 59

mangos-zero, Release 0.2.0

sound If a sound file should be played, this references an entry in the SoundEntries.dbc table.

type Selects one of various text emote types to be used for the script text. The following tables shows available textemote types.

Value Description0 Say1 Yell2 Text emote3 Boss emote4 Whisper5 Boss whisper6 Zone-wide yell

language A language identifier. The value has to match with a language identifier defined in Languages.dbc.

emote An emote identifier. The value has to match with a emote identifier defined in Emotes.dbc.

comment This documents the script text. Currently no rules have been defined for the format of the comment. Itshould help identifying who and why does perform the emote.

“gossip_texts” table

The gossip_texts table holds gossip texts assigned to scripted creatures.

Table structure

Field Type Null Key Default Extraentry mediumint(8) NO PRI NULLcontent_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULLcomment text YES NULL

Fields

entry The unique identifier of the gossip text entry. Identifiers here have to match with the identifier set in the stringusing the text.

Note: Identifiers use a fixed format of -3<map-identifier><three-digit-counter>.

60 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

content_default The default text to be displayed in English.

content_loc1 Korean localization of content_default.

content_loc2 French localization of content_default.

content_loc3 German localization of content_default.

content_loc4 Chinese localization of content_default.

content_loc5 Taiwanese localization of content_default.

content_loc6 Spanish Spain localization of content_default.

content_loc7 Spanish Latin America localization of content_default.

content_loc8 Russian localization of content_default.

comment Comments should always reflect where a gossip text will be used. Usually a creature’s name to which thegossip is added should be mentioned, and the variable given to the gossip in the script using it.

“script_texts” table

The script_texts table holds text strings, sounds, and emotes used in scripted events.

Table structure

Field Type Null Key Default Extraentry mediumint(8) NO PRI NULLcontent_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULLsound mediumint(8) unsigned NO 0type tinyint(3) unsigned NO 0language tinyint(3) unsigned NO 0emote smallint(5) unsigned NO 0comment text YES NULL

3.1. Database Guide 61

mangos-zero, Release 0.2.0

Fields

entry The unique identifier of the script text entry. Identifiers here have to match with the identifier set in the stringusing the text.

Note: Identifiers use a fixed format of -1<map-identifier><three-digit-counter>.

content_default The default text to be displayed in English.

content_loc1

Korean localization of content_default.

content_loc2 French localization of content_default.

content_loc3 German localization of content_default.

content_loc4 Chinese localization of content_default.

content_loc5 Taiwanese localization of content_default.

content_loc6 Spanish Spain localization of content_default.

content_loc7 Spanish Latin America localization of content_default.

content_loc8 Russian localization of content_default.

sound If a sound file should be played, this references an entry in the SoundEntries.dbc table.

type Selects one of various text emote types to be used for the script text. The following tables shows available textemote types.

Value Description0 Say1 Yell2 Text emote3 Boss emote4 Whisper5 Boss whisper6 Zone-wide yell

language A language identifier. The value has to match with a language identifier defined in Languages.dbc.

emote An emote identifier. The value has to match with a emote identifier defined in Emotes.dbc.

62 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

comment This documents the script text. Currently no rules have been defined for the format of the comment. Itshould help identifying who and why does perform the emote.

“script_waypoints” table

The script_waypoints table holds waypoint definitions for escort quests.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0pointid mediumint(8) unsigned NO PRI 0location_x float NO 0location_y float NO 0location_z float NO 0waittime int(10) unsigned NO 0point_comment text YES NULL

Fields

entry This references the creature for which the waypoint script is meant to be executed and references the identifierin the creature_template table.

pointid An index count for all waypoints attached to a script. Starts with 1 and increments by one.

location_x The X position for the script’s waypoint.

location_y The Y position for the script’s waypoint.

location_z The Z position for the script’s waypoint.

waittime If the creature should wait at the movement point, set this to the time in milliseconds. Otherwise set tozero for the creature to immediately proceed to the next movement point.

point_comment A common rules is to add comments to any waypoint where something special is happening. Thismeans: do not comment every point, but comment those where an action is executed, e.g. a text emote, a questcompletion is activated.

“sd2_db_version” table

The sd2_db_version table holds version information for the script library database to help users identify whichrelease they have installed.

3.1. Database Guide 63

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraversion varchar(255) NO

Fields

version A string describing the version of the script library database.

3.1.7 World server database

The world server database contains game content, specifically content templates, their relations and specific settingsfor individual game content.

“areatrigger_involvedrelation” table

The areatrigger_involvedrelation table holds connections between triggers and quests.

If there is a record in the table for a quest, the quest will not be completed until the player activates the areatriger. Thequest is not necessarily finished after that, but that one condition of the quest is satisfied. If the only condition of thequest is to explore an area, then the quest will be complete.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO 0

Fields

id

An areatrigger identifier. The value has to match with a areatrigger identifier defined in AreaTrigger.dbc.

quest

This references the “quest_template” table tables unique ID for which the entry is valid.

“areatrigger_teleport” table

The areatrigger_teleport table holds information which areatrigger teleports characters and the requirementsto execute the teleport.

64 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0name text YES NULLrequired_level tinyint(3) unsigned NO 0required_item mediumint(8) unsigned NO 0required_item2 mediumint(8) unsigned NO 0required_quest_done int(11) unsigned NO 0target_map smallint(5) unsigned NO 0target_position_x float NO 0target_position_y float NO 0target_position_z float NO 0target_orientation float NO 0

Fields

id

An areatrigger identifier. The value has to match with a areatrigger identifier defined in AreaTrigger.dbc.

name

The name for the areatrigger. This is only used for documentation purposes to help identifying triggers.

required_level

The minimum level required to activate the trigger.

required_item

Item required to activate the trigger. This references the “item_template” table tables unique ID for which the entry isvalid.

required_item2

Another item required to activate the trigger. This references the “item_template” table tables unique ID for which theentry is valid.

required_quest_done

Quest required to be completed to activate the trigger. This references the “quest_template” table tables unique ID forwhich the entry is valid.

target_map

The target map’s identifier. The value has to match with a map identifier defined in Map.dbc.

3.1. Database Guide 65

mangos-zero, Release 0.2.0

target_position_x

The X position on the target map.

target_position_y

The Y position on the target map.

target_position_z

The Z position on the target map.

target_orientation

The orientation for the character on the target map. This is measured in radians, 0 is north on the mini-map and pi issouth on the mini-map etc.

“battleground_events” table

The battleground_events table holds definitions of battleground events.

Table structure

Field Type Null Key Default Extramap smallint(5) NO PRI NULLevent1 tinyint(3) unsigned NO PRI NULLevent2 tinyint(3) unsigned NO PRI NULLdescription varchar(255) NO NULL

Fields

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

event1

The identifier for the event node in the battleground. Event nodes usually are defined in the battleground’s script.

event2

The state of the event node. Node status is defined differently in every battleground script.

Note: If you update battleground scripts and make changes to node status values ensure that you provide databaseupdate scripts which update the battleground events accordingly.

66 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

description

A description for the battleground event. This is only used for documentation purposes to help identifying events.

“battleground_template” table

The battleground_template table holds information on requirements for each battleground which have to bemet in order to start a battle.

• Battlegrounds are set to run in tiers. A tier is a fixed level range set differently for every battleground. A tier isusually 9 levels, i.e. 51-60

• Participating players have to be from the same tier.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI NULLMinPlayersPerTeam smallint(5) unsigned NO 0MaxPlayersPerTeam smallint(5) unsigned NO 0MinLvl tinyint(3) unsigned NO 0MaxLvl tinyint(3) unsigned NO 0AllianceStartLoc mediumint(8) unsigned NO NULLAllianceStartO float NO NULLHordeStartLoc mediumint(8) unsigned NO NULLHordeStartO float NO NULL

Fields

id

A unique identifier for the battleground. The following list provides all valid identifiers.

Value Description1 Alterac Valley2 Warsong Gulch3 Arathi Basin

MinPlayersPerTeam

This field defines the minimum number of characters required to join from each faction in order to start a battle.

MaxPlayersPerTeam

This field defines the maximum number of characters allowed to join from each faction in order to start a battle. If setto 0, the server will use the value from Map.dbc.

3.1. Database Guide 67

mangos-zero, Release 0.2.0

MinLvl

The minimum level required to enter the battleground. If set to 0, the server will use the value from Map.dbc.

MaxLvl

The maximum level allowed to enter the battleground. If set to 0, the server will use the value from Map.dbc.

AllianceStartLoc

The location where Alliance characters initially will spawn. This references a safe location value from WorldSafe-Locs.dbc.

AllianceStartO

The orientation used for Alliance players when spawn on the initial location. The orientation is measured in radianswhere 0 is north on the mini-map and pi is south on the mini-map.

HordeStartLoc

The location where Horde characters initially will spawn. This references a safe location value from WorldSafe-Locs.dbc.

HordeStartO

The orientation used for Horde players when spawn on the initial location. The orientation is measured in radianswhere 0 is north on the mini-map and pi is south on the mini-map.

“battlemaster_entry” table

The battlemaster_entry table holds informations on creatures that can start battlegrounds.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0bg_template mediumint(8) unsigned NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

68 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

bg_template

This references the “battleground_template” table tables unique ID for which the entry is valid.

“command” table

The command table holds help and security information for commands. This table does NOT create new commands,it only sets / overrides security and provides help.

Table structure

Field Type Null Key Default Extraname varchar(50) NO PRIsecurity tinyint(3) unsigned NO 0help longtext YES NULL

Fields

name

A unique name for the command.

security

The security level required to use the command. This references the “account” table tables gmlevel key.

help

The help text displayed by the .help command.

“conditions” table

The conditions table holds restrictions which can be applied to game data. This e.g. includes quests, loot, dia-logues, or even scripts.

Table structure

Field Type Null Key Default Extracondition_entry mediumint(8) unsigned NO PRI NULL auto_incrementtype tinyint(3) NO MUL 0value1 mediumint(8) unsigned NO 0value2 mediumint(8) unsigned NO 0

Fields

Descriptions for each field with their meaning, usage and relations are available below.

3.1. Database Guide 69

mangos-zero, Release 0.2.0

condition_entry

The unique identifier for a condition.

type

The type of condition. The table below lists all types.

ID Type Description-3 CONDITION_NOT Used to evaluate if another condition is NOT true.-2 CONDITION_OR Used to evaluate if condition OR condition is true.-1 CONDITION_AND Used to evaluate if condition AND condition is true.0 CONDITION_NONE This condition is not used at all.1 CONDITION_AURA Checks target currently has the specified aura on him/her.2 CONDITION_ITEM Checks if the player has the required amount (value2) of items in his/hers inventory.3 CONDITION_ITEM_EQUIPPED Checks if the player has the specified item equipped.4 CONDITION_AREAID Checks if the player is within the specified area.5 CONDITION_REPUTATION_RANK_MIN Checks if the player has the minimum required reputation rank with a specific faction.6 CONDITION_TEAM Checks what team the target is a member of.7 CONDITION_SKILL Checks if the player has the required minimum skill value of the specified skill.8 CONDITION_QUESTREWARDED Checks if the player has been rewarded for the specified quest.9 CONDITION_QUESTTAKEN Checks if the player has taken the quest (as in has it in his/hers quest log.)10 CONDITION_AD_COMMISSION_AURA TODO11 CONDITION_NO_AURA Checks if the target DOES NOT currently have the specified aura on him/her.12 CONDITION_ACTIVE_GAME_EVENT Checks if a game event is currently active.13 CONDITION_AREA_FLAG Checks if area_flag is present in current area (if area_flag set != 0) AND if not_have_flag is not present in current area (if not_have_flag != 0)14 CONDITION_RACE_CLASS Checks if the target is a certain race AND/OR class.15 CONDITION_LEVEL Checks the targets level.16 CONDITION_NOITEM Checks if the player DOES NOT have the required amount (value2) of items in his/hers inventory.17 CONDITION_SPELL Checks if the target has or hasn’t (value2) the specified spell.18 CONDITION_INSTANCE_SCRIPT TODO19 CONDITION_QUESTAVAILABLE Checks if the specified quest is available (can start it) for the player.20 CONDITION_RESERVED_1 Reserved for later usage21 CONDITION_RESERVED_2 Reserved for later usage22 CONDITION_QUEST_NONE Checks if the player has NOT taken the quest AND has NOT been rewarded for the quest.23 CONDITION_ITEM_WITH_BANK Checks if the player has the required amount (value2) of items in his/hers inventory OR bank.24 CONDITION_NOITEM_WITH_BANK Checks if the player DOES NOT have count (value2) of items in his/hers inventory OR bank.25 CONDITION_NOT_ACTIVE_GAME_EVENT Checks if a game event is currently NOT active.26 CONDITION_ACTIVE_HOLIDAY Checks if a holiday is active27 CONDITION_NOT_ACTIVE_HOLIDAY Checks if a holiday is not active28 CONDITION_LEARNABLE_ABILITY Checks if the player can learn ability (using minimum skill value from SkillLineAbility.dbc.) If the player has spell or has item (when defined) the condition will evaluate to false.29 CONDITION_SKILL_BELOW TODO30 CONDITION_REPUTATION_RANK_MAX Checks if the player has a higher reputation rank than specified a faction.31 CONDITION_RESERVED_3 Reserved for later usage32 CONDITION_SOURCE_AURA Checks if the source of the condition (like looted npc) has an aura.33 CONDITION_LAST_WAYPOINT Checks the waypoint-state of the source of the condition.34 CONDITION_RESERVED_4 Reserved for later usage35 CONDITION_GENDER Checks the gender of a player.36 CONDITION_DEAD_OR_AWAY Checks if a player, a player’s group, all players in an instance, or a creature is dead or left the map.

70 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

value1

The value of this field depends on what type of condition is used.

value2

The value of this field depends on what type of condition is used.

Condition type value1 value2CONDITION_NOT Reference to another condition_entry 0CONDITION_OR Reference to another condition_entry Reference to another condition_entryCONDITION_AND Reference to another condition_entry Reference to another condition_entryCONDITION_NONE 0 0CONDITION_AURA Spell.dbc ID Spell effect index to aura effect.CONDITION_ITEM :doc‘item-template‘ ID count (number of items required)CONDITION_ITEM_EQUIPPED :doc‘item-template‘ ID 0CONDITION_AREAID AreaTable.dbc ID 0CONDITION_REPUTATION_RANK_MIN Faction.dbc ID Reputation rank (defined in SharedDefines.h, enum ReputationRank)CONDITION_TEAM Team ID: 469 for Alliance, 67 for Horde 0CONDITION_SKILL SkillLine.dbc ID Skill valueCONDITION_QUESTREWARDED “quest_template” table ID 0CONDITION_QUESTTAKEN “quest_template” table ID 0, 1 or 2 (0 any state, 1 if quest incomplete, 2 if quest completed).CONDITION_AD_COMMISSION_AURA 0 0CONDITION_NO_AURA Spell.dbc ID Spell effect index to aura effect.CONDITION_ACTIVE_GAME_EVENT “game_event” table ID 0CONDITION_AREA_FLAG Area flag Unwanted area flagCONDITION_RACE_CLASS ChrRaces.dbc mask ChrClasses.dbc maskCONDITION_LEVEL Character level 0, 1 or 2 (0: equal to, 1: equal or higher than, 2: equal or less than)CONDITION_NOITEM :doc‘item-template‘ ID Count (number of items)CONDITION_SPELL Spell.dbc ID 0 or 1 (0: has spell, 1: hasn’t spell)CONDITION_INSTANCE_SCRIPT TODO TODOCONDITION_QUESTAVAILABLE “quest_template” table ID 0CONDITION_RESERVED_1 Reserved for later usage 0CONDITION_RESERVED_2 Reserved for later usage 0CONDITION_QUEST_NONE “quest_template” table ID 0CONDITION_ITEM_WITH_BANK :doc‘item-template‘ ID Count (number of items required)CONDITION_NOITEM_WITH_BANK :doc‘item-template‘ ID Count (number of items required)CONDITION_NOT_ACTIVE_GAME_EVENT “game_event” table ID 0CONDITION_ACTIVE_HOLIDAY Holiday ID 0CONDITION_NOT_ACTIVE_HOLIDAY Holiday ID 0CONDITION_LEARNABLE_ABILITY Spell.dbc ID 0 or :doc‘item-template‘ ID (item entry can be used if you want to check if the player has one (1) item in his/hers inventory or bank)CONDITION_SKILL_BELOW SkillLine.dbc ID Skill valueCONDITION_REPUTATION_RANK_MAX Faction.dbc ID Reputation rank (defined in SharedDefines.h, enum ReputationRank)CONDITION_RESERVED_3 Reserved for later usage 0CONDITION_SOURCE_AURA Spell.dbc ID Spell effect index to aura effectCONDITION_LAST_WAYPOINT Waypoint ID 0: exact, 1: wp <= waypointId, 2: wp > waypointIdCONDITION_RESERVED_4 Reserved for later usage 0CONDITION_GENDER 0: male, 1: female, 2: none 0CONDITION_DEAD_OR_AWAY 0: player, 1: group, 2: instance, 3: creature 0 or range

3.1. Database Guide 71

mangos-zero, Release 0.2.0

“creature_addon” table

The creature_addon table holds definitions which modify a creature entrie’s visuals, behaviour and state.

Addons in this table will overwrite existing addons for the creature’s template entry.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0mount mediumint(8) unsigned NO 0bytes1 int(10) unsigned NO 0b2_0_sheath tinyint(3) unsigned NO 0b2_1_flags tinyint(3) unsigned NO 0emote int(10) unsigned NO 0moveflags int(10) unsigned NO 0auras text YES NULL

Fields

guid

This references the “creature” table tables unique ID for which the entry is valid.

mount

A display model identifier used as mount for the creature_template. This references the “creature_model_info” tabletables unique ID for which this entry is valid.

bytes1

TODO

b2_0_sheath

Defines the sheath state of the creature_template.

Value State0 All weapons sheathed1 Melee weapon unsheathed2 Ranged weapon unsheathed

b2_1_flags

TODO

72 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

emote

An emote identifier. The value has to match with an emote identifier defined in Emotes.dbc.

moveflags

The flag controls how a creature_template will be animated while moving.

Value Movement animation0x00000000 MOVEFLAG_NONE0x00000001 MOVEFLAG_FORWARD0x00000002 MOVEFLAG_BACKWARD0x00000004 MOVEFLAG_STRAFE_LEFT0x00000008 MOVEFLAG_STRAFE_RIGHT0x00000010 MOVEFLAG_TURN_LEFT0x00000020 MOVEFLAG_TURN_RIGHT0x00000040 MOVEFLAG_PITCH_UP0x00000080 MOVEFLAG_PITCH_DOWN0x00000100 MOVEFLAG_WALK_MODE0x00000400 MOVEFLAG_LEVITATING0x00000800 MOVEFLAG_ROOT0x00002000 MOVEFLAG_FALLING0x00004000 MOVEFLAG_FALLINGFAR0x00200000 MOVEFLAG_SWIMMING0x00400000 MOVEFLAG_ASCENDING0x00800000 MOVEFLAG_CAN_FLY0x01000000 MOVEFLAG_FLYING0x02000000 MOVEFLAG_ONTRANSPORT0x04000000 MOVEFLAG_SPLINE_ELEVATION0x08000000 MOVEFLAG_SPLINE_ENABLED0x10000000 MOVEFLAG_WATERWALKING0x20000000 MOVEFLAG_SAFE_FALL0x40000000 MOVEFLAG_HOVER

auras

Allows to attach auras to a creature_template entry. This includes visual auras and spell effects. The field is a stringcontaining a spell identifier defined in Spell.dbc with an index to the spell effect.

Multiple spells can be concatenated. Spells and effect indexes are separated by space characters.

Examples

Value Result‘16380 0’ Makes the creature_template invisible‘18950 0 18950 1’ Makes the creature_template detect invisible creatures and players

“creature_ai_scripts” table

The creature_ai_scripts table holds a simple set of scripts for each creature template allowing creatures toperform extended actions beyond simple spell casts.

3.1. Database Guide 73

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI NULL auto_incrementcreature_id int(11) unsigned NO 0event_type tinyint(5) unsigned NO 0event_inverse_phase_mask int(11) NO 0event_chance int(3) unsigned NO 100event_flags int(3) unsigned NO 0event_param1 int(11) NO 0event_param2 int(11) NO 0event_param3 int(11) NO 0event_param4 int(11) NO 0action1_type tinyint(5) unsigned NO 0action1_param1 int(11) NO 0action1_param2 int(11) NO 0action1_param3 int(11) NO 0action2_type tinyint(5) unsigned NO 0action2_param1 int(11) NO 0action2_param2 int(11) NO 0action2_param3 int(11) NO 0action3_type tinyint(5) unsigned NO 0action3_param1 int(11) NO 0action3_param2 int(11) NO 0action3_param3 int(11) NO 0comment varchar(255) NO

Fields

id

The unique identifier for the AI script entry. To ease development, it has been defined that the identifier always equalscreature_template.entry * 100.

creature_id

This references the “creature_template” table tables unique ID for which the entry is valid.

event_type

The event type determines when to perform an action and also modifies which of the parameters are used and whatthey mean. The following table shows all available event types:

Value Type Parameters Description0 EVENT_T_TIMER_IN_COMBAT InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4), EXPIRES ONLY IN COMBAT.1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4), EXPIRES ONLY OUT OF COMBAT BUT NOT DURING EVADE.2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when the NPC’s HP% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4) If Event Conditions Are Still Met.3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires when the NPC’s Mana% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4) If Event Conditions Are Still Met.

Continued on next page

74 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.4 – continued from previous pageValue Type Parameters Description4 EVENT_T_AGGRO NONE Expires ONLY upon the NPC’s INITIAL Aggro at the Start of Combat (Does NOT Repeat) and Only Resets on Spawn or Evade.5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon Killing a Player. Will Repeat Check between (Param1) and (Param2). This Event Will Not Trigger Again Until Repeat Timer Expires6 EVENT_T_DEATH NONE Expires on the NPC’s Death. (This Triggers At The Moment The NPC Dies)7 EVENT_T_EVADE NONE Expires at the moment the Creature EnterEvadeMode() and Exits Combat.8 EVENT_T_SPELLHIT SpellID, School, RepeatMin, RepeatMax Expires upon Spell Hit of the NPC. When (param1) is set, it is the specific Spell ID used as the trigger. With (param2) specified, the expiration is limited to specific spell schools (-1 for all) and Spell ID value is ignored. Will repeat Event Conditions Check between every (Param3) and (Param4). Only A Spell ID or Spell School may be Specified but NOT both.9 EVENT_T_RANGE MinDist, MaxDist, RepeatMin, RepeatMax Expires when the Highest Threat Target Distance is Greater than (Param1) and Less than (Param2). Will repeat between every (Param3) and (Param4) if Event Conditions Are Still Met.10 EVENT_T_OOC_LOS NoHostile, MaxRnage, RepeatMin, RepeatMax Expires when a unit moves within distance (MaxAllowedRange) of the NPC. If (Param1) is 0 it will expire only when unit is hostile, If (Param1) is 1 it will expire only when unit is friendly. This depends generally on faction relations. Will repeat every (Param3) and (Param4). Does NOT expire when the NPC is in combat.11 EVENT_T_SPAWNED Condition, CondValue1 Expires on initial spawn and respawn of the NPC (Useful for setting Ranged Movement/Summoning Pets/Applying Buffs).12 EVENT_T_TARGET_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when current target’s HP% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4)If Event Conditions Are Still Met.13 EVENT_T_TARGET_CASTING RepeatMin, RepeatMax Expires when the current target is casting a spell. Will repeat every (Param1) and (Param2) If Event Conditions Are Still Met.14 EVENT_T_FRIENDLY_HP HPDeficit, Radius, RepeatMin, RepeatMax Expires when a friendly unit in (Radius) has at least (Param1) HP points missing. Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.15 EVENT_T_FRIENDLY_IS_CC DispelType, Radius, RepeatMin, RepeatMax Expires when a friendly unit is crowd controlled within the given Radius (Param2). Will repeat every (Param3) and (Param4).16 EVENT_T_FRIENDLY_MISSING_BUFF SpellId, Radius, RepeatMin, RepeatMax Expires when a friendly unit is missing aura(s) given by a spell (Param1) within Radius (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.17 EVENT_T_SUMMONED_UNIT CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (Param1) is spawned (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).18 EVENT_T_TARGET_MANA ManaMax%, ManaMin%, RepeatMin, RepeatMax Expires when current target’s Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.19 EVENT_T_QUEST_ACCEPT QuestID20 EVENT_T_QUEST_COMPLETE21 EVENT_T_REACHED_HOME NONE Expires when a creature reaches it’s home (spawn) location after evade. This is commonly used for NPC’s who Stealth once reaching their Spawn Location22 EVENT_T_RECEIVE_EMOTE EmoteId, Condition, CondValue1, CondValue2 Expires when a creature receives an emote with emote text id (“enum TextEmotes” from SharedDefines.h in Mangos Source) in (Param1). Conditions can be defined (Param2) with optional values (Param3,Param4), see (enum ConditionType) in ObjectMgr.h (Mangos Source).23 EVENT_T_AURA Param1 = SpellID, Param2 = Number of time stacked, Param3/4 Repeat Min/Max Expires when a creature has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.24 EVENT_T_TARGET_AURA Param1 = SpellID, Param2 = Number of time stacked, Param3/4 Repeat Min/Max Expires when a target unit has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4) If Event Conditions Are Still Met.25 EVENT_T_SUMMONED_JUST_DIED CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (Param1) is die (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).26 EVENT_T_SUMMONED_JUST_DESPAWN CreatureId, RepeatMin, RepeatMax Expires before creature with entry = (Param1) is despawn (Param1 = 0 means all spawns). Will repeat every (Param2) and (Param3).27 EVENT_T_MISSING_AURA Param1 = SpellID, Param2 = Number of time stacked expected, Param3/4 Repeat Min/Max Expires when a creature not has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4).28 EVENT_T_TARGET_MISSING_AURA Param1 = SpellID, Param2 = Number of time stacked expected, Param3/4 Repeat Min/Max Expires when a target unit not has spell (Param1) auras applied in a stack greater or equal to value provided in (Param2). Will repeat every (Param3) and (Param4).29 EVENT_T_TIMER_GENERIC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4).30 EVENT_T_RECEIVE_AI_EVENT AIEventType, Sender-Entry, unused, unused Expires when the creature receives an AIEvent of type (Param1), sent by creature (Param2 != 0). If (Param2 = 0) then sent by any creature

Time parameters are measured in milliseconds.

Note: Events will not repeat until the creature exits combat or unless EFLAG_REPEATABLE is set. Some eventssuch as EVENT_T_AGGRO, EVENT_T_DEATH, EVENT_T_SPAWNED and EVENT_T_EVADE cannot repeat.

event_inverse_phase_mask

TODO: Document me.

event_chance

The chance for this event to happen. Values have to be between 1 and 100.

event_flags

Event flags allow you to modify how events are executed.

3.1. Database Guide 75

mangos-zero, Release 0.2.0

Value Type Description1 EFLAG_REPEATABLE Event repeats (Does not repeat if this flag is not set)2 EFLAG_RESERVED_1 Unused4 EFLAG_RESERVED_2 Unused8 EFLAG_RESERVED_3 Unused16 EFLAG_RESERVED_4 Unused32 EFLAG_RANDOM_ACTION At event occur execute one random action from event actions instead all

actions.64 EFLAG_RESERVED_6 Unused128 EFLAG_DEBUG_ONLY Event only occurs in debug builds

event_param1

Depends on event_type. See the list of event types above.

event_param2

Depends on event_type. See the list of event types above.

event_param3

Depends on event_type. See the list of event types above.

event_param4

Depends on event_type. See the list of event types above.

action1_type

The action type defines what kind of action should be taken and depending on the action taken, different parametersare requried to perform the action. The following table lists all available actions including their parameters.

Value Type Parameters0 ACTION_T_NONE No action1 ACTION_T_TEXT TextId1, optionally -TextId2, optionally -TextId3(if -TextId2 exist). If more than just -TextId1 is defined, randomize. Neg$2 ACTION_T_SET_FACTION FactionId (or 0 for default)3 ACTION_T_MORPH_TO_ENTRY_OR_MODEL Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)4 ACTION_T_SOUND SoundId5 ACTION_T_EMOTE EmoteId6 ACTION_T_RANDOM_SAY UNUSED7 ACTION_T_RANDOM_YELL UNUSED8 ACTION_T_RANDOM_TEXTEMOTE UNUSED9 ACTION_T_RANDOM_SOUND SoundId1, SoundId2, SoundId3 (-1 in any field means no output if randomed that field)10 ACTION_T_RANDOM_EMOTE EmoteId1, EmoteId2, EmoteId3 (-1 in any field means no output if randomed that field)11 ACTION_T_CAST SpellId, Target, CastFlags12 ACTION_T_SUMMON CreatureID, Target, Duration in ms13 ACTION_T_THREAT_SINGLE_PCT Threat%, Target

Continued on next page

76 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.5 – continued from previous pageValue Type Parameters14 ACTION_T_THREAT_ALL_PCT Threat%15 ACTION_T_QUEST_EVENT QuestID, Target16 ACTION_T_CAST_EVENT QuestID, SpellId, Target - must be removed as hack?17 ACTION_T_SET_UNIT_FIELD Field_Number, Value, Target18 ACTION_T_SET_UNIT_FLAG Flags (may be more than one field OR’d together), Target19 ACTION_T_REMOVE_UNIT_FLAG Flags (may be more than one field OR’d together), Target20 ACTION_T_AUTO_ATTACK AllowAttackState (0 = stop attack, anything else means continue attacking)21 ACTION_T_COMBAT_MOVEMENT AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)22 ACTION_T_SET_PHASE Phase23 ACTION_T_INC_PHASE Value (may be negative to decrement phase, should not be 0)24 ACTION_T_EVADE No Params25 ACTION_T_FLEE_FOR_ASSIST No Params26 ACTION_T_QUEST_EVENT_ALL QuestID27 ACTION_T_CAST_EVENT_ALL CreatureId, SpellId28 ACTION_T_REMOVEAURASFROMSPELL Target, Spellid29 ACTION_T_RANGED_MOVEMENT Distance, Angle30 ACTION_T_RANDOM_PHASE PhaseId1, PhaseId2, PhaseId331 ACTION_T_RANDOM_PHASE_RANGE PhaseMin, PhaseMax32 ACTION_T_SUMMON_ID CreatureId, Target, SpawnId33 ACTION_T_KILLED_MONSTER CreatureId, Target34 ACTION_T_SET_INST_DATA Field, Data35 ACTION_T_SET_INST_DATA64 Field, Target36 ACTION_T_UPDATE_TEMPLATE Entry, Team37 ACTION_T_DIE No Params38 ACTION_T_ZONE_COMBAT_PULSE No Params39 ACTION_T_CALL_FOR_HELP Radius40 ACTION_T_SET_SHEATH Sheath (0-passive,1-melee,2-ranged)41 ACTION_T_FORCE_DESPAWN Delay (0-instant despawn)42 ACTION_T_SET_INVINCIBILITY_HP_LEVEL MinHpValue, format(0-flat,1-percent from max health)43 ACTION_T_MOUNT_TO_ENTRY_OR_MODEL Creature_template entry(param1) OR ModelId (param2) (or 0 for both to unmount)44 ACTION_T_CHANCED_TEXT Chance to display the text, TextId1, optionally TextId2. If more than just -TextId1 is defined, randomize. Negative values.45 ACTION_T_THROW_AI_EVENT EventType, Radius, unused46 ACTION_T_SET_THROW_MASK EventTypeMask, unused, unused47 ACTION_T_SUMMON_UNIQUE CreatureID, Target, SummonID

action1_param1

See action1_type for a list of parameters required for a specific action.

action1_param2

See action1_type for a list of parameters required for a specific action.

action1_param3

See action1_type for a list of parameters required for a specific action.

3.1. Database Guide 77

mangos-zero, Release 0.2.0

action2_type

See action1_type for a list of available actions.

action2_param1

See action1_type for a list of parameters required for a specific action.

action2_param2

See action1_type for a list of parameters required for a specific action.

action2_param3

See action1_type for a list of parameters required for a specific action.

action3_type

See action1_type for a list of available actions.

action3_param1

See action1_type for a list of parameters required for a specific action.

action3_param2

See action1_type for a list of parameters required for a specific action.

action3_param3

See action1_type for a list of parameters required for a specific action.

comment

Documents what an event script is supposed to do. It has been defined that comments should use the form: ‘Crea-ture/GameObject name - Cast Spellname’.

“creature_ai_summons” table

The creature_ai_summons table holds information supporting summons executed by creatures through AIscripts.

78 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid int(11) unsigned NO PRI NULL auto_incrementposition_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0spawntimesecs int(11) unsigned NO 120comment varchar(255) NO

Fields

id

This references the third action parameter in the “creature_ai_scripts” table tables entry with a summon action as-signed.

position_x

The X position for the creature to be spawn.

position_y

The Y position for the creature to be spawn.

position_z

The Z position for the creature to be spawn.

orientation

The orientation for the creature to be spawn.

spawntimesecs

The despawn timer for the summoned creature.

comment

Documents what kind of creature will be summoned. Currently it is common to use the summoned creature’s “crea-ture_template” table entry value to describe what is summoned.

3.1. Database Guide 79

mangos-zero, Release 0.2.0

“creature_ai_texts” table

The creature_ai_texts table holds all texts used by creature scripts defined in creature_ai_scripts.

The texts are used for creature say/yell/emote actions and may be combined with emotes.

Table structure

Field Type Null Key Default Extraentry mediumint(8) NO PRI NULLcontent_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULLsound mediumint(8) unsigned NO 0type tinyint(3) unsigned NO 0language tinyint(3) unsigned NO 0emote smallint(5) unsigned NO 0comment text YES NULL

Fields

entry

This references a script using an action of the type ACTION_T_TEXT in the “creature_ai_scripts” table tables entry.

Note: IDs use the negative versions of the referenced action’s ID.

content_default

Contains the text presented in the default language English. Strings may contain special variables which are replacedwith creature or character data. The following table lists available variables.

Value Description%s Creature name$n Character name$r Character race$c Character class

content_loc1

Korean localization of content_default.

80 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

content_loc2

French localization of content_default.

content_loc3

German localization of content_default.

content_loc4

Chinese localization of content_default.

content_loc5

Taiwanese localization of content_default.

content_loc6

Spanish Spain localization of content_default.

content_loc7

Spanish Latin America localization of content_default.

content_loc8

Russian localization of content_default.

sound

A sound identifier. The value has to match with a sound identifier defined in SoundEntries.dbc.

type

The type of message to display. The following table lists all valid types.

Value Description0 Say1 Yell2 Text emote3 Boss emote4 Whisper5 Boss whisper

3.1. Database Guide 81

mangos-zero, Release 0.2.0

language

A language identifier. The value has to match with a language identifier defined in Languages.dbc.

emote

An emote identifier. The value has to match with a emote identifier defined in Emotes.dbc.

comment

This documents the creature text. Currently no rules have been defined for the format of the comment. It should helpidentifying who and why does perform the emote.

“creature_battleground” table

The creature_battleground table holds information on creatures spawns which are used in battlegrounds.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULLevent1 tinyint(3) unsigned NO NULLevent2 tinyint(3) unsigned NO NULL

Fields

guid

This references the “creature” table tables unique guid for which the entry is valid.

event1

The identifier for the event node in the battleground. Event nodes usually are defined in the battleground’s script.

Nodes are locations in a battleground where characters of each faction can perform actions, such as capturing a towerin Alterac Valley, or taking control over the stables in Arathi Basin.

event2

The state of the event node. Node status is defined differently in every battleground script.

Node events can occur for every node and usually describe changes due to character interaction. E.g. if stables inArathi Basin are taken over by Alliance, the stables note state would become Alliance controlled. Similar node statesexist for every battleground note.

Note: If you update battleground scripts and make changes to node status values ensure that you provide databaseupdate scripts which update the battleground events accordingly.

82 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“creature_equip_template_raw” table

The creature_equip_template_raw table holds information in items that creatures should wear.

Deprecated since version 1.0.0: this table is deprecated. Do not use it, as it will be removed in a future update and isjust here to ease transition to the new creature_equip_template table.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0equipmodel1 mediumint(8) unsigned NO 0equipmodel2 mediumint(8) unsigned NO 0equipmodel3 mediumint(8) unsigned NO 0equipinfo1 int(10) unsigned NO 0equipinfo2 int(10) unsigned NO 0equipinfo3 int(10) unsigned NO 0equipslot1 int(11) NO 0equipslot2 int(11) NO 0equipslot3 int(11) NO 0

“creature_equip_template” table

The creature_equip_template table holds information in items that creatures should wear.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0equipentry1 mediumint(8) unsigned NO 0equipentry2 mediumint(8) unsigned NO 0equipentry3 mediumint(8) unsigned NO 0

Fields

entry

The unique identifier for the equipment template.

equipentry1

The item the creature should wear in the right hand.

equipentry2

The item the creature should wear in the left hand.

3.1. Database Guide 83

mangos-zero, Release 0.2.0

equipentry3

The ranged item the creature should wear.

“creature_involvedrelation” table

The creature_involvedrelation table holds connections between creatures and quests. Links made heredefine that a creature should end a quest.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO PRI 0

Fields

id

This references the “creature_template” table tables unique ID for which the entry is valid.

quest

This references the “quest_template” table tables unique ID for which the entry is valid.

“creature_linking” table

The creature_linking table holds details how creatures linked to a master creature should act in combat andnon-combat situations.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULLmaster_guid int(10) unsigned NO NULLflag mediumint(8) unsigned NO NULL

Fields

guid

This references the “creature” table tables unique ID for which the entry is valid. This is a creature spawn bound tothe master creature.

84 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

master_guid

This references the “creature” table tables unique ID for which the entry is valid. This is the master creature whichdefines behaviour for the linked creature.

flag

This flag determines how a linked creature will act, when the master is changing it’s combat state. Flags providesupport for combat state, non combat state and life state.

The following flags determine the behaviour if the master is in combat state.

Value Name Description1 FLAG_AGGRO_ON_AGGRO the slave aggroes when the master aggroes2 FLAG_TO_AGGRO_ON_AGGRO the master aggroes when the slave aggroes4 FLAG_RESPAWN_ON_EVADE the slave respawns when the master evades8 FLAG_TO_RESPAWN_ON_EVADE the master respawns when the slave evades4096 FLAG_DESPAWN_ON_EVADE the slave despawn after the master evade16 FLAG_DESPAWN_ON_DEATH the slave despawns when the master dies32 FLAG_SELFKILL_ON_DEATH the slave goes suicide when the master dies64 FLAG_RESPAWN_ON_DEATH the slave respawn when the master dies128 FLAG_RESPAWN_ON_RESPAWN the slave respawns on master respawn256 FLAG_DESPAWN_ON_RESPAWN the slave despawns on master respawn

The following flags determine the behaviour if the master is out of combat state.

Value Name Description512 FLAG_FOLLOW the slave follows the master

The following flags determine the behaviour for any combat state.

Value Name Description1024 FLAG_CANT_SPAWN_IF_BOSS_DEAD the slave cannot respawn while boss is dead2048 FLAG_CANT_SPAWN_IF_BOSS_ALIVE the slave cannot respawn while boss is alive

“creature_linking_template” table

The creature_linking_template table holds details how creature templates linked to a master creature tem-plate should act in combat and non-combat situations.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0map smallint(5) unsigned NO PRI 0master_entry mediumint(8) unsigned NO 0flag mediumint(8) unsigned NO 0search_range mediumint(8) unsigned NO 0

3.1. Database Guide 85

mangos-zero, Release 0.2.0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid. This is a creature templatebound to the master creature template.

map

A map identifier. The value has to match with a map identifier defined in Map.dbc. This is the map where creaturetemplates are located.

master_entry

This references the “creature_template” table tables unique ID for which the entry is valid. This is the master creaturetemplate which defines behaviour for the linked creature template.

flag

This flag determines how a linked creature will act, when the master is changing it’s combat state. Flags providesupport for combat state, non combat state and life state.

The following flags determine the behaviour if the master is in combat state.

Value Name Description1 FLAG_AGGRO_ON_AGGRO the slave aggroes when the master aggroes2 FLAG_TO_AGGRO_ON_AGGRO the master aggroes when the slave aggroes4 FLAG_RESPAWN_ON_EVADE the slave respawns when the master evades8 FLAG_TO_RESPAWN_ON_EVADE the master respawns when the slave evades4096 FLAG_DESPAWN_ON_EVADE the slave despawn after the master evade16 FLAG_DESPAWN_ON_DEATH the slave despawns when the master dies32 FLAG_SELFKILL_ON_DEATH the slave goes suicide when the master dies64 FLAG_RESPAWN_ON_DEATH the slave respawn when the master dies128 FLAG_RESPAWN_ON_RESPAWN the slave respawns on master respawn256 FLAG_DESPAWN_ON_RESPAWN the slave despawns on master respawn

The following flags determine the behaviour if the master is out of combat state.

Value Name Description512 FLAG_FOLLOW the slave follows the master

The following flags determine the behaviour for any combat state.

Value Name Description1024 FLAG_CANT_SPAWN_IF_BOSS_DEAD the slave cannot respawn while boss is dead2048 FLAG_CANT_SPAWN_IF_BOSS_ALIVE the slave cannot respawn while boss is alive

search_range

This fields allows to set a range within the creature should look for it’s master.

86 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“creature_loot_template” table

The creature_loot_template table holds definitions on items dropped by creatures templates.

Note: When talking about loot, we do not talk about money dropped by creature templates.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

3.1. Database Guide 87

mangos-zero, Release 0.2.0

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“creature_model_info” table

The creature_model_info table holds all models of mobs, their gender and other information that are modelrelated. This means that when a creature uses another model, this information will change as well.

Table structure

Field Type Null Key Default Extramodelid mediumint(8) unsigned NO PRI 0bounding_radius float NO 0combat_reach float NO 0gender tinyint(3) unsigned NO 2modelid_other_gender mediumint(8) unsigned NO 0modelid_other_team mediumint(8) unsigned NO 0

Fields

modelid

A display model identifier. The value has to match with a model identifier defined in CreatureDisplayInfo.dbc.

88 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

bounding_radius

This is the distance the creature stands from the player to attack him while in melee.

combat_reach

This is the maximum distance the creature can reach the player in ranged attack.

gender

Gender of the creature

Value Gender0 Male1 Female2 None

modelid_other_gender

If the model information entry is set to male or female, this references the “creature_model_info” table tables uniqueID for the entry of the other gender’s model information.

modelid_other_team

If the model information entry has different display information for the other faction, this references the “crea-ture_model_info” table tables unique ID for the entry of the other faction’s model information.

“creature_movement” table

The creature_movement table holds informations on paths for spawned creature entries and allows to definebehaviour along the movement path.

Note: Movement definitions here will overwrite any movement defined for the creature template.

3.1. Database Guide 89

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid int(10) unsigned NO PRI NULLpoint mediumint(8) unsigned NO PRI 0position_x float NO 0position_y float NO 0position_z float NO 0waittime int(10) unsigned NO 0script_id mediumint(8) unsigned NO 0textid1 int(11) NO 0textid2 int(11) NO 0textid3 int(11) NO 0textid4 int(11) NO 0textid5 int(11) NO 0emote mediumint(8) unsigned NO 0spell mediumint(8) unsigned NO 0wpguid int(11) NO 0orientation float NO 0model1 mediumint(9) NO 0model2 mediumint(9) NO 0

Fields

id

This references the “creature” table tables unique ID for which the entry is valid.

point

An index count for all movement points attached to a creature spawn. Starts with 1 and increments by one.

position_x

The X position for the creature’s movement point.

position_y

The Y position for the creature’s movement point.

position_z

The Z position for the creature’s movement point.

90 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

waittime

If the creature should wait at the movement point, set this to the time in milliseconds. Otherwise set to zero for thecreature to immediately proceed to the next movement point.

script_id

If a script should be executed, this references the “dbscripts_on_creature_movement” table tables unique ID for whichthe entry is valid. If not, set the value to zero.

textid1

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid2

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid3

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid4

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid5

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

emote

An emote identifier. The value has to match with an emote identifier defined in Emotes.dbc.

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This refers to a spell whichshould be cast on this waypoint.

3.1. Database Guide 91

mangos-zero, Release 0.2.0

wpguid

A unique identifier for this waypoint.

orientation

The orientation for the creature’s movement point. Measured in radians, where 0 is north on the mini-map and pi issouth on the mini-map.

model1

A display model identifier activated on the waypoint. This references the “creature_model_info” table tables uniqueID for which this entry is valid.

model2

An alternative display model identifier activated on the waypoint. This references the “creature_model_info” tabletables unique ID for which this entry is valid.

“creature_movement_template” table

The creature_movement_template table holds informations on paths for creature_template entries andallows to define behaviour along the movement path.

Template movement is usually applied to creature templates spawned by scripts, or for templates which are uniqueand have only one spawn.

Note: Movement attached to a creature template will be applied to all spawns of this template, unless there is a uniquemovement defined for the creature entry.

92 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLpoint mediumint(8) unsigned NO PRI 0position_x float NO 0position_y float NO 0position_z float NO 0waittime int(10) unsigned NO 0script_id mediumint(8) unsigned NO 0textid1 int(11) NO 0textid2 int(11) NO 0textid3 int(11) NO 0textid4 int(11) NO 0textid5 int(11) NO 0emote mediumint(8) unsigned NO 0spell mediumint(8) unsigned NO 0wpguid int(11) NO 0orientation float NO 0model1 mediumint(9) NO 0model2 mediumint(9) NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

point

An index count for all movement points attached to a creature spawn. Starts with 1 and increments by one.

position_x

The X position for the creature’s movement point.

position_y

The Y position for the creature’s movement point.

position_z

The Z position for the creature’s movement point.

3.1. Database Guide 93

mangos-zero, Release 0.2.0

waittime

If the creature should wait at the movement point, set this to the time in milliseconds. Otherwise set to zero for thecreature to immediately proceed to the next movement point.

script_id

If a script should be executed, this references the “dbscripts_on_creature_movement” table tables unique ID for whichthe entry is valid. If not, set the value to zero.

textid1

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid2

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid3

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid4

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

textid5

If a text should be emoted, this references the “db_script_string” table tables unique ID for which the entry is valid. Ifnot, set the value to zero.

emote

An emote identifier. The value has to match with an emote identifier defined in Emotes.dbc.

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This refers to a spell whichshould be cast on this waypoint.

94 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

wpguid

A unique identifier for this waypoint.

orientation

The orientation for the creature’s movement point. Measured in radians, 0 is north on the mini-map and pi is southon the mini-map.

model1

A display model identifier activated on the waypoint. This references the “creature_model_info” table tables uniqueID for which this entry is valid.

model2

An alternative display model identifier activated on the waypoint. This references the “creature_model_info” tabletables unique ID for which this entry is valid.

“creature_onkill_reputation” table

The creature_onkill_reputation table holds information on reputation awarded to characters when killingthe creature.

Note: Reputation is awarded only on creature_template level, but not for individual spawns.

Table structure

Field Type Null Key Default Extracreature_id mediumint(8) unsigned NO PRI 0RewOnKillRepFaction1 smallint(6) NO 0RewOnKillRepFaction2 smallint(6) NO 0MaxStanding1 tinyint(4) NO 0IsTeamAward1 tinyint(4) NO 0RewOnKillRepValue1 mediumint(9) NO 0MaxStanding2 tinyint(4) NO 0IsTeamAward2 tinyint(4) NO 0RewOnKillRepValue2 mediumint(9) NO 0TeamDependent tinyint(3) unsigned NO 0

Fields

creature_id

This references the “creature_template” table tables unique ID for which the entry is valid.

3.1. Database Guide 95

mangos-zero, Release 0.2.0

RewOnKillRepFaction1

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is the default faction for which reputation will be gained. If the reputation awarded is faction specific, this is thefaction Alliance characters will gain reputation for.

RewOnKillRepFaction2

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc. Ifthe reputation awarded is faction specific, this is the faction Horde characters will gain reputation for.

MaxStanding1

The maximum standing up to which a creature will award reputation towards RewOnKillRepFaction1. Thefollowing table lists valid entries for the maximum standing.

Value Standing0 Hated1 Hostile2 Unfriendly3 Neutral4 Friendly5 Honored6 Revered7 Exalted

IsTeamAward1

Decides if characters will gain reputation only for RewOnKillRepFaction2, or for the faction’s group, too. Ifgroup faction is granted, this is half of the value of RewOnKillRepValue1.

RewOnKillRepValue1

The reputation value characters will gain from RewOnKillRepFaction1.

MaxStanding2

The maximum standing up to which a creature will award reputation towards RewOnKillRepFaction2. Thefollowing table lists valid entries for the maximum standing.

Value Standing0 Hated1 Hostile2 Unfriendly3 Neutral4 Friendly5 Honored6 Revered7 Exalted

96 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

IsTeamAward2

Decides if characters will gain reputation only for RewOnKillRepFaction2, or for the faction’s group, too. Ifgroup faction is granted, this is half of the value of RewOnKillRepValue2.

RewOnKillRepValue2

The reputation value characters will gain from RewOnKillRepFaction2.

TeamDependent

This field decides if a reputation entry will be awarded for all character factions, or if different factions applied toAlliance and Horde characters.

Value Description0 Reputation will be awarded to both Alliance and Horde from RewOnKillRepFaction1 and

RewOnKillRepFaction21 Reputation will be awarded to Alliance from RewOnKillRepFaction1 and to Horde from

RewOnKillRepFaction2

“creature_questrelation” table

The creature_questrelation table holds connections between creatures and quests. Links made here definethat a creature should start a quest.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO PRI 0

Fields

id

This references the “creature_template” table tables unique ID for which the entry is valid.

quest

This references the “quest_template” table tables unique ID for which the entry is valid.

“creature” table

The creature table holds spawns of creature_template entries.

3.1. Database Guide 97

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULL auto_incrementid mediumint(8) unsigned NO MUL 0map smallint(5) unsigned NO MUL 0modelid mediumint(8) unsigned NO 0equipment_id mediumint(9) NO 0position_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0spawntimesecs int(10) unsigned NO 120spawndist float NO 5currentwaypoint mediumint(8) unsigned NO 0curhealth int(10) unsigned NO 1curmana int(10) unsigned NO 0DeathState tinyint(3) unsigned NO 0MovementType tinyint(3) unsigned NO 0

Fields

guid

The unique identifier of the creature spawn.

id

This references the “creature_template” table tables unique ID for which the entry is valid.

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

modelid

A display model identifier. This references the “creature_model_info” table tables unique ID for which this entry isvalid.

equipment_id

This references the “creature_equip_template” table tables unique ID for which the entry is valid.

position_x

The X position for the creatures initial position.

98 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

position_y

The Y position for the creatures initial position.

position_z

The Z position for the creatures initial position.

orientation

The orientation for the creatures initial position.

spawntimesecs

The respawn time for the creature, defined in seconds till respawn.

spawndist

The maximum distance that the creature should spawn from its spawn point. If the creature is set to random movement,this defines a radius in which the creature may move.

currentwaypoint

The current waypoint, on which the creature resides. If waypoints are defined, this references the “crea-ture_movement” table tables point field for which the entry is valid.

curhealth

The current health that the creature has.

curmana

The current mana that the creature has.

DeathState

Defines if the creature spawn is alive or dead.

Value State0 Alive1 Dead

Note: Dead creatures can not have gossip dialogues, unless you explicitly set the dynamic flag for corpses on the“creature_template” table.

3.1. Database Guide 99

mangos-zero, Release 0.2.0

MovementType

The movement type defines what a creature spawn will behave like after spawning.

Value Behaviour0 Idle on spawn point1 Random movement within spawndist radius2 Waypoint movement

“creature_template_addon” table

The creature_template_addon table holds definitions which modify a creature_template entries visu-als, behaviour and state.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0mount mediumint(8) unsigned NO 0bytes1 int(10) unsigned NO 0b2_0_sheath tinyint(3) unsigned NO 0b2_1_flags tinyint(3) unsigned NO 0emote mediumint(8) unsigned NO 0moveflags int(10) unsigned NO 0auras text YES NULL

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

mount

A display model identifier used as mount for the creature_template. This references the “creature_model_info” tabletables unique ID for which this entry is valid.

bytes1

TODO

b2_0_sheath

Defines the sheath state of the creature_template.

Value State0 All weapons sheathed1 Melee weapon unsheathed2 Ranged weapon unsheathed

100 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

b2_1_flags

TODO

emote

An emote identifier. The value has to match with an emote identifier defined in Emotes.dbc.

moveflags

The flag controls how a creature_template will be animated while moving.

Value Movement animation0x00000000 MOVEFLAG_NONE0x00000001 MOVEFLAG_FORWARD0x00000002 MOVEFLAG_BACKWARD0x00000004 MOVEFLAG_STRAFE_LEFT0x00000008 MOVEFLAG_STRAFE_RIGHT0x00000010 MOVEFLAG_TURN_LEFT0x00000020 MOVEFLAG_TURN_RIGHT0x00000040 MOVEFLAG_PITCH_UP0x00000080 MOVEFLAG_PITCH_DOWN0x00000100 MOVEFLAG_WALK_MODE0x00000400 MOVEFLAG_LEVITATING0x00000800 MOVEFLAG_ROOT0x00002000 MOVEFLAG_FALLING0x00004000 MOVEFLAG_FALLINGFAR0x00200000 MOVEFLAG_SWIMMING0x00400000 MOVEFLAG_ASCENDING0x00800000 MOVEFLAG_CAN_FLY0x01000000 MOVEFLAG_FLYING0x02000000 MOVEFLAG_ONTRANSPORT0x04000000 MOVEFLAG_SPLINE_ELEVATION0x08000000 MOVEFLAG_SPLINE_ENABLED0x10000000 MOVEFLAG_WATERWALKING0x20000000 MOVEFLAG_SAFE_FALL0x40000000 MOVEFLAG_HOVER

auras

Allows to attach auras to a creature_template entry. This includes visual auras and spell effects. The field is a stringcontaining a spell identifier defined in Spell.dbc with an index to the spell effect.

Multiple spells can be concatenated. Spells and effect indexes are separated by space characters.

Examples

Value Result‘16380 0’ Makes the creature_template invisible‘18950 0 18950 1’ Makes the creature_template detect invisible creatures and players

3.1. Database Guide 101

mangos-zero, Release 0.2.0

“creature_template_classlevelstats” table

The creature_template_classlevelstats table holds definitions which modify acreature_template entries state based on class and level.

Table structure

Field Type Null Key Default ExtraLevel tinyint(4) NOClass tinyint(4) NOBaseHealthExp0 mediumint(8) unsigned NO 1BaseMana mediumint(8) unsigned NO 0BaseDamageExp0 float NO 0BaseMeleeAttackPower float NO 0BaseRangedAttackPower float NO 0BaseArmor mediumint(8) unsigned NO 0

Fields

Level

Creature level for the stats. Could Be MinLevel or MaxLevel or both, could Be Same if the creature only has asingle level.

Class

A creature’s class. The following table describes the available classes.

Value Name Description1 Warrior Has increased health and no mana2 Paladin Has increased health and low mana4 Rogue Has increased damage, but lower armor8 Mage Has low health, but increased mana

BaseHealthExp0

Base health value for expansion 0 aka. vanilla WoW.

BaseMana

Base mana value for any creature of this level and class.

BaseDamageExp0

Base damage value for expansion 0 aka. vanilla WoW.

102 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

BaseMeleeAttackPower

Base melee attack power that has been factored for low level creatures.

Tip: This is raw base value to be used for all melee damage calculations.

BaseRangedAttackPower

Base ranged attack power.

Tip: This is raw base value to be used for all ranged damage calculations.

BaseArmor

Base armor value for any creature of this level and class.

“creature_template” table

The creature_template table holds information on every creature that exists in the game.

Table structure

Field Type Null Key Default ExtraEntry mediumint(8) unsigned NO PRI 0Name char(100) NO 0SubName char(100) YES NULLMinLevel tinyint(3) unsigned NO 1MaxLevel tinyint(3) unsigned NO 1ModelId1 mediumint(8) unsigned NO 0ModelId2 mediumint(8) unsigned NO 0FactionAlliance smallint(5) unsigned NO 0FactionHorde smallint(5) unsigned NO 0Scale float NO 1Family tinyint(4) NO 0CreatureType tinyint(3) unsigned NO 0InhabitType tinyint(3) unsigned NO 3RegenerateStats tinyint(3) unsigned NO 3RacialLeader tinyint(3) unsigned NO 0NpcFlags int(10) unsigned NO 0UnitFlags int(10) unsigned NO 0DynamicFlags int(10) unsigned NO 0ExtraFlags int(10) unsigned NO 0CreatureTypeFlags int(10) unsigned NO 0SpeedWalk float NO 1SpeedRun float NO 1.14286

Continued on next page

3.1. Database Guide 103

mangos-zero, Release 0.2.0

Table 3.6 – continued from previous pageField Type Null Key Default ExtraUnitClass tinyint(3) unsigned NO 0Rank tinyint(3) unsigned NO 0HealthMultiplier float NO 1PowerMultiplier float NO 1DamageMultiplier float NO 1DamageVariance float NO 1ArmorMultiplier float NO 1ExperienceMultiplier float NO 1MinLevelHealth int(10) unsigned NO 0MaxLevelHealth int(10) unsigned NO 0MinLevelMana int(10) unsigned NO 0MaxLevelMana int(10) unsigned NO 0MinMeleeDmg float NO 0MaxMeleeDmg float NO 0MinRangedDmg float NO 0MaxRangedDmg float NO 0Armor mediumint(8) unsigned NO 0MeleeAttackPower int(10) unsigned NO 0RangedAttackPower smallint(5) unsigned NO 0MeleeBaseAttackTime int(10) unsigned NO 0RangedBaseAttackTime int(10) unsigned NO 0DamageSchool tinyint(4) NO 0MinLootGold mediumint(8) unsigned NO 0MaxLootGold mediumint(8) unsigned NO 0LootId mediumint(8) unsigned NO 0PickpocketLootId mediumint(8) unsigned NO 0SkinningLootId mediumint(8) unsigned NO 0KillCredit1 int(11) unsigned NO 0KillCredit2 int(11) unsigned NO 0MechanicImmuneMask int(10) unsigned NO 0ResistanceHoly smallint(5) NO 0ResistanceFire smallint(5) NO 0ResistanceNature smallint(5) NO 0ResistanceFrost smallint(5) NO 0ResistanceShadow smallint(5) NO 0ResistanceArcane smallint(5) NO 0PetSpellDataId mediumint(8) unsigned NO 0MovementType tinyint(3) unsigned YES 0TrainerType tinyint(4) NO 0TrainerSpell mediumint(8) unsigned NO 0TrainerClass tinyint(3) unsigned NO 0TrainerRace tinyint(3) unsigned NO 0TrainerTemplateId mediumint(8) unsigned NO 0VendorTemplateId mediumint(8) unsigned NO 0GossipMenuId mediumint(8) unsigned NO 0EquipmentTemplateId mediumint(8) unsigned NO 0Civilian tinyint(3) unsigned NO 0AIName char(64) YES NULLScriptName char(64) YES NULL

104 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

Entry

The unique identifier of the creature template entry.

Name

The creature’s name that will be displayed.

SubName

An optional tag, which will be shown below the creature’s name.

MinLevel

The minimum level of the creature if the creature has a level range.

MaxLevel

The maximum level of the creature if the creature has a level range. When added to world, a level in chosen in thespecified level range.

ModelId1

A display model identifier for the creature_template. This references the “creature_model_info” table tables uniqueID for which this entry is valid.

ModelId2

A display model identifier for the creature_template. This references the “creature_model_info” table tables uniqueID for which this entry is valid.

FactionAlliance

A faction for creatures on the Alliance side. The value has to match with a faction template identifier defined inFactionTemplate.dbc.

Note: This field also controls the creature family assistance mechanic. Only creatures with the same faction willassist each other.

3.1. Database Guide 105

mangos-zero, Release 0.2.0

FactionHorde

A faction for creatures on the Horde side. The value has to match with a faction template identifier defined in Faction-Template.dbc.

Note: This field also controls the creature family assistance mechanic. Only creatures with the same faction willassist each other.

Scale

If non-zero, this field defines how the size of the model appears in game. If zero, it will use default model size takenfrom CreatureDisplayInfo.dbc.

Family

The creature’s family is set for all creature’s with a type of 1, aka. beasts.

Value Description Value Description1 Wolf 16 Voidwalker2 Cat 17 Succubus3 Spider 19 Doomguard4 Bear 20 Scorpid5 Boar 21 Turtle6 Crocolisk 23 Imp7 Carrion Bird 24 Bat8 Crab 25 Hyena9 Gorilla 26 Owl11 Raptor 27 Wind Serpent12 Tallstrider 28 Remote Control15 Felhunter

Note: It has to be evaluated if creatures of type 3 (Demons) should have their family set, as there are creature familiesdefined for these. Also, remote control family would probably be having a type of 9 since these are mechanical.

CreatureType

The type of the creature. The following table provides a list of valid values. The values are taken from Creature-Type.dbc.

106 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Value Name1 Beast2 Dragonkin3 Demon4 Elemental5 Giant6 Undead7 Humanoid8 Critter9 Mechanical10 Not specified11 Totem

InhabitType

The inhabit type defines where a creature can move and attack and thus also influences when a creature will rest.

Value Behaviour1 Ground movement only2 Water movement only3 Ground and water movement4 Air movement

RegenerateStats

Controls if a creature template should regenerate it’s health or not.

Value Description0 No regeneration1 Regenerate health2 Regenerate power

RacialLeader

Determines if a creature template is a racial leader. Racial leaders will grant increased honor points upon death.

Value Description0 Normal creature1 Racial leader

NpcFlags

This field is used to flag a creature_template with the features it should support. Since this is a bit field, multiple flagscan be combined as needed. A list of supported flags is provided below.

3.1. Database Guide 107

mangos-zero, Release 0.2.0

Value Description Comments0 None1 Gossip2 Questgiver4 Vendor8 Flightmaster16 Trainer32 Spirithealer64 Spiritguide128 Innkeeper256 Banker512 Petitioner1024 Tabarddesigner2048 Battlemaster4096 Auctioneer8192 Stablemaster16384 Repair536870912 Outdoor PvP Custom

UnitFlags

Unit flags are used to signal creature template states. The following table contains a list of known values.

TODO: since this field is a 32bit sized byte mask, there is a lot to figure out.

Value Description0 Default1 Unknown2 Not attackable4 Movement disable8 Attackable16 Rename in progress32 Resting64 Unknown128 Not attackable136 Not PvP enabled256 Unknown512 Unknown1024 Animation frozen2048 Unknown4096 PvP enabled8192 Mounted16386 Unknown32768 Unknown65536 Unknown131072 Unknown262144 Rotation disabled524288 In combat1048576 Unknown2097152 Unknown4194304 Unknown

Continued on next page

108 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.7 – continued from previous pageValue Description8388608 Unknown16777216 Unknown33554432 Unknown67108864 Unknown134217728 Unknown

DynamicFlags

Dynamic flags are used to control the visual appearance of a creature template. The following table provides a list ofvalid values. Multiple flags may be combined.

Value Description Comments0 None1 Lootable2 Track unit4 Other tagger Makes creature name tag appear grey8 Rooted16 Specialinfo Show basic creature stats in tooltip32 Dead Make creature appear dead without tag64 Tapped by all threat list

ExtraFlags

The extra flags allow to modify special behaviour for a creature_template. The following table contains a list ofcombinable flags.

Value Type Description0 NONE Default: do nothing.1 INSTANCE_BIND Bounds killer’s party to the instance2 CIVILIAN Makes creature ignore aggro4 NO_PARRY Prohibits from parrying8 NO_PARRY_HASTEN Parries do not speed up its next attack16 NO_BLOCK Prohibits from blocking32 NO_CRUSH Prohibits from dealing crushing blows64 NO_XP_AT_KILL Creature rewards no XP at kill128 INVISIBLE Creature invisible for player, e.g triggers256 NOT_TAUNTABLE Creature is immune to taunts512 AGGRO_ZONE Sets itself in combat with zone on aggro1024 GUARD Is zone guard and death will be announced2048 NO_TALKTO_CREDIT Does not give quest credit (temporary)

CreatureTypeFlags

Type flags seem to control what actions a player can perform towards a creature template.

SpeedWalk

Controls how fast the creature can move in walking mode.

3.1. Database Guide 109

mangos-zero, Release 0.2.0

SpeedRun

Controls how fast the creature can move in running mode.

UnitClass

A creature’s class. The following table describes the available classes.

Value Name Description1 Warrior Has increased health and no mana2 Paladin Has increased health and low mana4 Rogue Has increased damage, but lower armor8 Mage Has low health, but increased mana

Note: Depending on the creature’s class, you have to make sure that the mana values are set properly. E.g. a Warrioror Rogue will not have mana set.

Rank

The rank of a creature determines which border the game client will draw around the creature tooltip in the userinterface. The following table lists all valid values:

Value Name Description0 Normal Default type1 Elite Increased health, damage, better loot2 Rare elite Like Elite but with increased respawn time3 World boss Highest rank, best loot, highest respawn time4 Rare Increased respawn time, better loot

HealthMultiplier

Setting this value to a value smaller or larger than 1 will modify the creature template’s health by this factor.

PowerMultiplier

Setting this value to a value smaller or larger than 1 will modify the creature template’s power by this factor.

DamageMultiplier

Setting this value to a value smaller or larger than 1 will modify the creature template’s damage by this factor.

DamageVariance

TODO

110 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ArmorMultiplier

Setting this value to a value smaller or larger than 1 will modify the creature template’s armor by this factor.

ExperienceMultiplier

Setting this value to a value smaller or larger than 1 will modify experience gained from the creature template by thisfactor.

MinLevelHealth

The minimum health of the creature if the creature has variable health.

MaxLevelHealth

The maximum health of the creature if the creature has a variable health. When added to world, the health value ischosen in proportion to the level chosen.

MinLevelMana

The miminum mana of the creature if the creature has variable mana.

MaxLevelMana

The maximum mana of the creature if the creature has variable mana. When added to world, the mana value is chosenin proportion to the level chosen.

MinMeleeDmg

Minimum damage the creature deals in melee combat. This field is combined with the attackpower field to calculatethe damage.

MaxMeleeDmg

Maximum damage the creature deals in melee combat. This field is combined with the attackpower field to calculatethe damage.

MinRangedDmg

Minimum damage the creature deals in ranged combat. This field is combined with the ranged attackpower field tocalculate the damage.

MaxRangedDmg

Maximum damage the creature deals in ranged combat. This field is combined with the ranged attackpower field tocalculate the damage.

3.1. Database Guide 111

mangos-zero, Release 0.2.0

Armor

The armor value of the creature. It controls how much damage reduction the creature gets from physical attacks.

MeleeAttackPower

The attack power for the creature’s melee attacks. This field along with MinMeleeDmg and MaxMeleeDmg dictatehow much the creature will hit for. The formula for applying correct damages is as follows:

UPDATE `creature_template` SET`MinMeleeDmg` = <#1>,`MaxMeleeDmg` = <#2>,`MeleeAttackPower` = ROUND((`MinMeleeDmg` + `MaxMeleeDmg`) / 4 * 7),`MinMeleeDmg` = ROUND(`MinMeleeDmg` - `MeleeAttackPower` / 7),`MaxMeleeDmg` = ROUND(`MaxMeleeDmg` - `MeleeAttackPower` / 7)

WHERE `Entry` = ...

In the query above, substitute <#1> with the minimum damage you want the creature to deal and <#2> with themaximum damage you want the creature to deal.

Note: You might want to double check the calculated values after the query has run because a large difference betweenMinMeleeDmg and MaxMeleeDmg can cause MinMeleeDmg to become a negative value.

RangedAttackPower

The attack power for the creature’s ranged attacks.

MeleeBaseAttackTime

A creature’s melee attack time in milliseconds.

RangedBaseAttackTime

A creature’s ranged attack time in milliseconds.

DamageSchool

A damage school for melee combat. The following table provides a list of valid values.

Value Description0 Normal damage1 Holy damage2 Fire damage3 Nature damage4 Frost damage5 Shadow damage6 Arcane damage

112 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

MinLootGold

Minimum money the creature drops when killed, in copper.

MaxLootGold

Maximum money the creature drops when killed, in copper.

LootId

The field adds loot to a creature template and references the “creature_loot_template” table tables unique ID for whichthe entry is valid.

PickpocketLootId

The field adds pickpocketing loot to a creature template and references the “pickpocketing_loot_template” table tablesunique ID for which the entry is valid.

SkinningLootId

The field adds skinning loot to a creature template and references the “skinning_loot_template” table tables unique IDfor which the entry is valid.

KillCredit1

If killing a creature should credit towards a different creature_template, this should be set to the creaturetemplate’s identifier.

KillCredit2

If killing a creature should credit towards a different creature_template, this should be set to the creaturetemplate’s identifier.

MechanicImmuneMask

This mask can be used to make creatures immune to spell mechanics. Multiple immunities can be combined.

3.1. Database Guide 113

mangos-zero, Release 0.2.0

Value Type Value Type0 NONE 32768 BANDAGE1 CHARM 65536 POLYMORPH2 CONFUSED 131072 BANISH4 DISARM 262144 SHIELD8 DISTRACT 524288 SHACKLE16 FEAR 1048576 MOUNT32 FUMBLE 2097152 PERSUADE64 ROOT 4194304 TURN128 PACIFY 8388608 HORROR256 SILENCE 16777216 INVULNERABILITY512 SLEEP 33554432 INTERRUPT1024 SNARE 67108864 DAZE2048 STUN 134217728 DISCOVERY4096 FREEZE 268435456 IMMUNE_SHIELD8192 KNOCKOUT 536870912 SAPPED16384 BLEED

Note: In theory this should somehow relate to SpellMechanic.dbc and the immunities list there, but it does not match.TODO

ResistanceHoly

Holy resistance.

ResistanceFire

Fire resistance.

ResistanceNature

Nature resistance.

ResistanceFrost

Frost resistance.

ResistanceShadow

Shadow resistance.

ResistanceArcane

Arcane resistance.

114 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

PetSpellDataId

ID that displays what spells the pet has in the client.

MovementType

The movement type defines what a creature spawn will behave like after spawning.

Value Behaviour0 Idle on spawn point1 Random movement within spawndist radius2 Waypoint movement

TrainerType

For creature templates set to be trainers, this details what kind of trainer the creature is. The following table providesa list of valid trainer types.

Value Type0 Class1 Mounts2 Trade skills3 Pets

TrainerSpell

If set to a valid spell identifier from Spell.dbc, this will restrict access to a profession trainer so that the player needsto already have access to the spell to access the trainer.

TrainerClass

The value of this field will restrict access to class and/or pet trainers, if set to a value corresponding with the classidentifiers from ChrClasses.dbc.

Value Description1 Warrior2 Paladin3 Hunter4 Rogue5 Priest7 Shaman8 Mage9 Warlock11 Druid

Note: Pet trainers should always use the Hunter class identifier 3.

3.1. Database Guide 115

mangos-zero, Release 0.2.0

TrainerRace

This field allows to restrict a riding trainer to a specific race. Players not from that race will require exalted repu-tation with the trainers race before being able to buy from him. Values in this field correspond with the content ofChrRaces.dbc.

TrainerTemplateId

This field adds a training spells to a creature template and references the “npc_trainer_template” table tables uniqueID for which the entry is valid.

VendorTemplateId

This field adds a vendor items to a creature template and references the “npc_vendor_template” table tables unique IDfor which the entry is valid.

GossipMenuId

This references the “gossip_menu” table tables unique ID for which the entry is valid, if the creature_template shouldhave a gossip dialogue.

EquipmentTemplateId

The field adds equipment to a creature template and references the “creature_equip_template” table tables unique IDfor which the entry is valid.

Civilian

Marking a creature template as civilian will prevent it from aggroing and may influence the honor points gainednegatively.

Value Description0 No civilian1 Civilian

AIName

This string determines which built-in AI script will be used for the creature template. By default and empty string willlead to the creature doing nothing. The following table lists all valid entries.

Value DescriptionNullAI Do nothing. Same as empty string.AggressorAI Creature attacks when entering aggro radius.ReactorAI Creature attacks only if aggroed by spell.GuardAI Creature is a zone guard.PetAI Creature is a pet.TotemAI Creature casts spell from spell1.EventAI Creature uses event based AI.

116 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ScriptName

To assign a script from the script library to the creature_template, set this string to the script’s exported name.

“creature_template_spells” table

The creature_template_spells table holds information on the spells to which a creature_template has access.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLspell1 mediumint(8) unsigned NO NULLspell2 mediumint(8) unsigned NO 0spell3 mediumint(8) unsigned NO 0spell4 mediumint(8) unsigned NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

spell1

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

spell2

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

spell3

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

spell4

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

“dbscripts_on_creature_death” table

The dbscripts_on_creature_death table holds scripts which are executed upon a creature’s death.

3.1. Database Guide 117

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry int(10) unsigned NO 0search_radius int(10) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

This references the “creature_template” table tables unique ID for which the entry is valid.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done

Continued on next page

118 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.8 – continued from previous pageValue Command Description8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

3.1. Database Guide 119

mangos-zero, Release 0.2.0

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

120 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“dbscripts_on_creature_movement” table

The dbscripts_on_creature_movement table holds holds scripts which are executed upon creature move-ment.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

3.1. Database Guide 121

mangos-zero, Release 0.2.0

Fields

id

This references the column script_id of the “creature_movement” table table.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature

Continued on next page

122 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.9 – continued from previous pageValue Command Description30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

3.1. Database Guide 123

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

124 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

comments

A comment describing the purpose of the script.

“dbscripts_on_event” table

The dbscripts_on_event table holds holds scripts which are executed upon event activation or when a spell witha SPELL_EFFECT_SEND_EVENT is triggered.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

This references the parameter for a spell with a SPELL_EFFECT_SEND_EVENT effect set.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

3.1. Database Guide 125

mangos-zero, Release 0.2.0

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

126 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

3.1. Database Guide 127

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“dbscripts_on_gossip” table

The dbscripts_on_gossip table holds holds scripts which are executed upon gossip option usage.

128 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

This references the column script_id of the “gossip_menu_option” table table.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done

Continued on next page

3.1. Database Guide 129

mangos-zero, Release 0.2.0

Table 3.11 – continued from previous pageValue Command Description8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

130 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

3.1. Database Guide 131

mangos-zero, Release 0.2.0

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“dbscripts_on_go_template_use” table

The dbscripts_on_go_template_use table holds holds scripts which are executed upon game object templateusage.

Note: This only includes game objects which are buttons.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry int(10) unsigned NO 0search_radius int(10) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

132 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

id

This references the “gameobject_template” table tables unique ID for which the entry is valid.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature

Continued on next page

3.1. Database Guide 133

mangos-zero, Release 0.2.0

Table 3.12 – continued from previous pageValue Command Description30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

134 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

3.1. Database Guide 135

mangos-zero, Release 0.2.0

comments

A comment describing the purpose of the script.

“dbscripts_on_go_use” table

The dbscripts_on_go_use table holds holds scripts which are executed upon game object usage.

Note: This only includes game objects which are buttons.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

This references the “gameobject” table tables unique ID for which the entry is valid.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

136 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

3.1. Database Guide 137

mangos-zero, Release 0.2.0

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

138 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“dbscripts_on_quest_end” table

The dbscripts_on_quest_end table holds holds scripts which are executed upon a quest’s completion.

3.1. Database Guide 139

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

This references the CompleteScript column of a “quest_template” table table entry.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done

Continued on next page

140 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.14 – continued from previous pageValue Command Description8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

3.1. Database Guide 141

mangos-zero, Release 0.2.0

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

142 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“dbscripts_on_quest_start” table

The dbscripts_on_quest_start table holds holds scripts which are executed upon accepting a quest.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

3.1. Database Guide 143

mangos-zero, Release 0.2.0

Fields

id

This references the StartScript column of a “quest_template” table table entry.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature

Continued on next page

144 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.15 – continued from previous pageValue Command Description30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

3.1. Database Guide 145

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

146 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

comments

A comment describing the purpose of the script.

“dbscripts_on_spell” table

The dbscripts_on_spell table holds holds scripts which are executed upon casting a spell.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO 0delay int(10) unsigned NO 0command mediumint(8) unsigned NO 0datalong mediumint(8) unsigned NO 0datalong2 int(10) unsigned NO 0buddy_entry mediumint(8) unsigned NO 0search_radius mediumint(8) unsigned NO 0data_flags tinyint(3) unsigned NO 0dataint int(11) NO 0dataint2 int(11) NO 0dataint3 int(11) NO 0dataint4 int(11) NO 0x float NO 0y float NO 0z float NO 0o float NO 0comments varchar(255) NO NULL

Fields

id

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

delay

The delay in seconds to apply before starting the script command. Setting the value to 0 will instantly execute thecommand.

Note: Delay is accumulated over all events with identical id values.

command

The action to execute once the delay defined has been reached. The following list shows all available actions.

3.1. Database Guide 147

mangos-zero, Release 0.2.0

Value Command Description0 SCRIPT_COMMAND_TALK Creature will send a text emote (say, yell, whisper)1 SCRIPT_COMMAND_EMOTE Creature/character will play an emote2 SCRIPT_COMMAND_FIELD_SET Modifies a character variable3 SCRIPT_COMMAND_MOVE_TO Moves a creature to a new location4 SCRIPT_COMMAND_FLAG_SET Turns on bits on character variable5 SCRIPT_COMMAND_FLAG_REMOVE Turns off bits on character variable6 SCRIPT_COMMAND_TELEPORT_TO Teleports a character to a new location7 SCRIPT_COMMAND_QUEST_EXPLORED Marks a quest exploration requirement as done8 SCRIPT_COMMAND_KILL_CREDIT Marks a quest kill requirement as done9 SCRIPT_COMMAND_RESPAWN_GAMEOBJECT Respawns a despawned game object10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE Summons one/multiple temporary creature(s)11 SCRIPT_COMMAND_OPEN_DOOR Opens a game object of type 0 (aka. a door)12 SCRIPT_COMMAND_CLOSE_DOOR Closes a game object of type 0 (aka. a door)13 SCRIPT_COMMAND_ACTIVATE_OBJECT Uses a game object14 SCRIPT_COMMAND_REMOVE_AURA Removes an aura using a spell15 SCRIPT_COMMAND_CAST_SPELL Cast a spell16 SCRIPT_COMMAND_PLAY_SOUND Play a sound entry17 SCRIPT_COMMAND_CREATE_ITEM Create an item18 SCRIPT_COMMAND_DESPAWN_SELF Despawns a creature using an optional delay19 SCRIPT_COMMAND_PLAY_MOVIE Play a move for the targeted character20 SCRIPT_COMMAND_MOVEMENT Change the movement type of a creature21 SCRIPT_COMMAND_SET_ACTIVEOBJECT Set a creature as active object22 SCRIPT_COMMAND_SET_FACTION Change the faction of a creature23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL Changes a creature model displayed24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL Mounts a creature with the given model25 SCRIPT_COMMAND_SET_RUN Let a creature walk or run26 SCRIPT_COMMAND_ATTACK_START Makes a creature attack within a given radius27 SCRIPT_COMMAND_GO_LOCK_STATE Changes the lock/interaction state of a game object28 SCRIPT_COMMAND_STAND_STATE Changes the stand state of a creature29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS Change the npcflag settings of a creature30 SCRIPT_COMMAND_SEND_TAXI_PATH Puts a character on a given taxi path31 SCRIPT_COMMAND_TERMINATE_SCRIPT Stops script execution on a creature if it meets a condition32 SCRIPT_COMMAND_PAUSE_WAYPOINTS Pause or continue waypoint movement of a creature33 SCRIPT_COMMAND_RESERVED_1 Reserved for later usage34 SCRIPT_COMMAND_TERMINATE_COND Stops script execution if a condition is met35 SCRIPT_COMMAND_TURN_TO Change a creature orientation towards a target

datalong

A multi-purpose field storing raw data as unsigned integer value.

datalong2

A multi-purpose field storing raw data as unsigned integer value.

buddy_entry

If the command used has a buddy entry, this references either an entry in the “gameobject_template” table or “crea-ture_template” table table.

148 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

search_radius

The range in which the buddy’s entry will be search for.

Note: If data_flags has SCRIPT_FLAG_BUDDY_BY_GUID set, this references an entry in the “gameobject”table or “creature” table table.

data_flags

Holds a flag or a combination for flags for the script command. The following table contains all valid flags

Value Name1 SCRIPT_FLAG_BUDDY_AS_TARGET2 SCRIPT_FLAG_REVERSE_DIRECTION4 SCRIPT_FLAG_SOURCE_TARGETS_SELF8 SCRIPT_FLAG_COMMAND_ADDITIONAL16 SCRIPT_FLAG_BUDDY_BY_GUID32 SCRIPT_FLAG_BUDDY_IS_PET

dataint

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint2

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint3

A multi-purpose data field storing signed integer values.

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

dataint4

A multi-purpose data field storing signed integer values.

3.1. Database Guide 149

mangos-zero, Release 0.2.0

Note: Currently these fields are only used as text identifiers for the SCRIPT_COMMAND_TALK andSCRIPT_COMMAND_TERMINATE_SCRIPT commands.

x

A X position on the map which the command needs.

y

A Y position on the map which the command needs.

z

A Z position on the map which the command needs.

o

An orientation on the map which the command needs.

comments

A comment describing the purpose of the script.

“db_script_string” table

The db_script_string table holds all texts used by creature scripts defined for templates.

The texts are used for creature say/yell/emote actions and may be combined with emotes.

150 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry int(11) unsigned NO PRI 0content_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULLsound mediumint(8) unsigned NO 0type tinyint(3) unsigned NO 0language tinyint(3) unsigned NO 0emote smallint(5) unsigned NO 0comment text YES NULL

Fields

entry

The unique identifier of the script string entry.

Note: Entries in this table have to use an ID range from 2000000000 to 2000010000.

content_default

The English translation.

content_loc1

Korean localization of content_default.

content_loc2

French localization of content_default.

content_loc3

German localization of content_default.

content_loc4

Chinese localization of content_default.

3.1. Database Guide 151

mangos-zero, Release 0.2.0

content_loc5

Taiwanese localization of content_default.

content_loc6

Spanish Spain localization of content_default.

content_loc7

Spanish Latin America localization of content_default.

content_loc8

Russian localization of content_default.

sound

A sound identifier. The value has to match with a sound identifier defined in SoundEntries.dbc.

The type of message to display. The following table lists all valid types.

Value Description0 Say1 Yell2 Text emote3 Boss emote4 Whisper5 Boss whisper6 Zone-wide yell

language

A language identifier. The value has to match with a language identifier defined in Languages.dbc.

emote

An emote identifier. The value has to match with a emote identifier defined in Emotes.dbc.

comment

This documents the script text. Currently no rules have been defined for the format of the comment. It should helpidentifying who and why does perform the emote.

“db_version” table

The db_version identifies the realm server data store to the mangos-zero server by prodiving a bit field with arevision number/name combination as name.

152 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraversion varchar(120) YES PRI NULLcreature_ai_version varchar(120) YES NULLrequired_z2483_xxxxx_02_mangos_string bit(1) YES NULL

Fields

Descriptions for each field with their meaning, usage and relations are available below.

version

A version string, describing the release version of the database content.

creature_ai_version

A version string, describing the release version of the scripted creature AI.

required_z2483_xxxxx_02_mangos_string

This field is used to indicate the last database structure update applied. Each applied update will renamed the field, inorder to allow users to select the required database upgrade query from the provided upgrade queries.

“disenchant_loot_template” table

The disenchant_loot_template table holds definitions on items dropped by disenchanting an item.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references the “item_template” table tables unique ID for which the entry is valid.

3.1. Database Guide 153

mangos-zero, Release 0.2.0

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

154 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“exploration_basexp” table

The exploration_basexp table holds definitions for experience rewarded upon exploring zones.

Table structure

Field Type Null Key Default Extralevel tinyint(4) NO PRI 0basexp mediumint(9) NO 0

Fields

level

The character level.

basexp

The experience rewarded at the specified level.

“fishing_loot_template” table

The fishing_loot_template table holds definitions on items dropped by fishing in specific zones.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

A zone identifier. The value has to match with a zone identifier defined in AreaTable.dbc.

Note: Junk loot to be distributed when fishing with low skill in a zone may be added by using an entry identifier of 0.

3.1. Database Guide 155

mangos-zero, Release 0.2.0

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

156 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“game_event_creature_data” table

The game_event_creature_data table holds modifiers for creature entries spawned during agame_event.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0entry_id mediumint(8) unsigned NO 0modelid mediumint(8) unsigned NO 0equipment_id mediumint(8) unsigned NO 0spell_start mediumint(8) unsigned NO 0spell_end mediumint(8) unsigned NO 0event smallint(5) unsigned NO PRI 0

Fields

guid

This references the “creature” table tables unique ID for which the entry is valid.

entry_id

TODO

modelid

A display model identifier. This references the “creature_model_info” table tables unique ID for which this entry isvalid.

Note: Set to 0 if only the equipment should be changed.

equipment_id

This references the “creature_equip_template” table tables unique ID for which the entry is valid.

Note: Set to 0 if only the model should be changed.

spell_start

If set to a valid spell identifier from Spell.dbc, this will cause the create to cast the spell upon applying the modifica-tions.

3.1. Database Guide 157

mangos-zero, Release 0.2.0

spell_end

If set to a valid spell identifier from Spell.dbc, this will cause the create to cast the spell upon removing the modifica-tions.

event

This references the “game_event” table tables unique ID for which the entry is valid.

“game_event_creature” table

The game_event_creature table holds lists of creature entries to be spawned during game events.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULLevent smallint(6) NO 0

Fields

guid

This references the “creature” table tables unique ID for which the entry is valid.

event

This references the “game_event” table tables unique ID for which the entry is valid.

“game_event_gameobject” table

The game_event_gameobject table holds lists of gameobject entries to be spawned during game events.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULLevent smallint(6) NO 0

Fields

guid

This references the “gameobject” table tables unique ID for which the entry is valid.

158 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

event

This references the “game_event” table tables unique ID for which the entry is valid.

“game_event_mail” table

The game_event_mail table holds definitions for mails send out during game events and conditions for when tosend the mail.

Table structure

Field Type Null Key Default Extraevent smallint(6) NO PRI 0raceMask mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO PRI 0mailTemplateId mediumint(8) unsigned NO 0senderEntry mediumint(8) unsigned NO 0

Fields

event

This references the “game_event” table tables unique ID for which the entry is valid.

raceMask

A bit-mask corresponding to races that should get the mail. The value has to match with races defined in ChrRaces.dbc.

quest

This references the “quest_template” table tables entry if the mail is related to a quest.

mailTemplateId

This references an entry from the MailTemplate.dbc table.

senderEntry

This references the “creature_template” table entry to be used as sender for the mail.

“game_event_quest” table

The game_event_quest table holds definitions for quests which should only be available during an active gameevent.

3.1. Database Guide 159

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraquest mediumint(8) unsigned NO PRI 0event smallint(5) unsigned NO PRI 0

Fields

quest

This references the “quest_template” table tables entry which should be restricted to the referenced game event.

event

This references the “game_event” table tables unique ID for which the entry is valid.

“game_event” table

The game_event table holds definitions for in-game events, both holiday related and normal events.

Note: Game events are not necessarily events related to events introduced by patches (e.g. The Ahn’Qiraj opening).Game events include things such as the Stockades riots, or the Pyrewood Village event for the Worgen curse.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLstart_time timestamp NO 0000-00-00 00:00:00end_time timestamp NO 0000-00-00 00:00:00occurence bigint(20) unsigned NO 86400length bigint(20) unsigned NO 43200holiday mediumint(8) unsigned NO 0description varchar(255) YES NULL

Fields

entry

The unique identifier for the game event.

start_time

A timestamp for the start date and time of the event. Try to keep start time related to the official World of Warcraftrelease on November 23rd 2004.

160 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

end_time

A timestamp for the end date and time of the event. Try to keep start time related to the official World of Warcraftrelease on November 23rd 2004.

occurence

Defines the time span between occurrences of the game event. The time span is measured in minutes.

• 1440 minutes for a day,

• 2880 minutes for two days,

• etc.

length

Defines the length of an event. The time is measured in minutes, and needs to be lower than the value set foroccurence.

Note: If length is > occurence, an event would never stop.

holiday

If an event is related to an official in-game world event such as Winter Veil, etc. this contains the unique identifier asknown by the game client.

description

Describe the game event. If possible specify name, location, and schedule in the comment.

“game_graveyard_zone” table

The game_graveyard_zone table holds information on which graveyard a dead character should appear, depend-ing on where he dies and what faction he belongs to.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0ghost_zone mediumint(8) unsigned NO PRI 0faction smallint(5) unsigned NO 0

3.1. Database Guide 161

mangos-zero, Release 0.2.0

Fields

id

A graveyard identifier. The value has to match with a location identifier defined in WorldSafeLocs.dbc.

ghost_zone

A zone identifier. The value has to match with a zone identifier defined in AreaTable.dbc.

faction

The faction for which this graveyard should be used. This references a faction entry from the Faction.dbc table.

Value Faction0 Any faction67 Horde only469 Alliance only

“gameobject_battleground” table

The gameobject_battleground table holds information on game object spawns which are used in battle-grounds.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULLevent1 tinyint(3) unsigned NO NULLevent2 tinyint(3) unsigned NO NULL

Fields

guid

This references the “gameobject” table tables unique ID for which the entry is valid.

event1

The identifier for the event node in the battleground. Event nodes usually are defined in the battleground’s script.

Nodes are locations in a battleground where characters of each faction can perform actions, such as capturing a towerin Alterac Valley, or taking control over the stables in Arathi Basin.

162 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

event2

The state of the event node. Node status is defined differently in every battleground script.

Node events can occur for every node and usually describe changes due to character interaction. E.g. if stables inArathi Basin are taken over by Alliance, the stables note state would become Alliance controlled. Similar node statesexist for every battleground note.

Note: If you update battleground scripts and make changes to node status values ensure that you provide databaseupdate scripts which update the battleground events accordingly.

“gameobject_involvedrelation” table

The gameobject_involvedrelation table holds holds connections between game objects and quests. Linksmade here define that a creature should end a quest.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO PRI 0

Fields

id

This references the “gameobject_template” table tables unique ID for which the entry is valid.

Note: Game object templates need to be of type quest giver.

quest

This references the “quest_template” table tables unique ID for which the entry is valid.

“gameobject_loot_template” table

The gameobject_loot_template table holds definitions on items dropped by game object templates.

3.1. Database Guide 163

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references the “gameobject_template” table tables unique ID for which the entry is valid.

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

164 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“gameobject_questrelation” table

The gameobject_questrelation table holds connections between game objects and quests. Links made heredefine that a creature should start a quest.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0quest mediumint(8) unsigned NO PRI 0

Fields

id

This references the “gameobject_template” table tables unique ID for which the entry is valid.

Note: Game object templates need to be of type quest giver.

quest

This references the “quest_template” table tables unique ID for which the entry is valid.

“gameobject” table

The gameobject table holds spawns of gameobject_template entries.

3.1. Database Guide 165

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI NULL auto_incrementid mediumint(8) unsigned NO MUL 0map smallint(5) unsigned NO MUL 0position_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0rotation0 float NO 0rotation1 float NO 0rotation2 float NO 0rotation3 float NO 0spawntimesecs int(11) NO 0animprogress tinyint(3) unsigned NO 0state tinyint(3) unsigned NO 0

Fields

guid

The unique identifier of the game object spawn.

id

This references the “gameobject_template” table tables unique ID for which the entry is valid.

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

position_x

The X position for the game objects initial position.

position_y

The Y position for the game objects initial position.

position_z

The Z position for the game objects initial position.

orientation

The orientation for the game objects initial position.

166 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

rotation0

TODO

rotation1

TODO

rotation2

TODO

rotation3

TODO

spawntimesecs

The respawn time for the game object, defined in seconds till respawn.

Note: Using a negative spawn time will lead to the object being despawned until spawned by a script. It will thendespawn after the time specified here.

animprogress

TODO

Note: Set to 100 for game objects of type chest.

state

This field is only used for game objects which are doors, or chests, and will signal their initial state.

• if set to 0, the door/chest is opened,

• if set to 1, the door/chest is closed.

“gameobject_template” table

The gameobject_template table holds information on every object that exists in the game.

Table structure

3.1. Database Guide 167

mangos-zero, Release 0.2.0

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0type tinyint(3) unsigned NO 0displayId mediumint(8) unsigned NO 0name varchar(100) NOfaction smallint(5) unsigned NO 0flags int(10) unsigned NO 0size float NO 1data0 int(10) unsigned NO 0data1 int(10) unsigned NO 0data2 int(10) unsigned NO 0data3 int(10) unsigned NO 0data4 int(10) unsigned NO 0data5 int(10) unsigned NO 0data6 int(10) unsigned NO 0data7 int(10) unsigned NO 0data8 int(10) unsigned NO 0data9 int(10) unsigned NO 0data10 int(10) unsigned NO 0data11 int(10) unsigned NO 0data12 int(10) unsigned NO 0data13 int(10) unsigned NO 0data14 int(10) unsigned NO 0data15 int(10) unsigned NO 0data16 int(10) unsigned NO 0data17 int(10) unsigned NO 0data18 int(10) unsigned NO 0data19 int(10) unsigned NO 0data20 int(10) unsigned NO 0data21 int(10) unsigned NO 0data22 int(10) unsigned NO 0data23 int(10) unsigned NO 0mingold mediumint(8) unsigned NO 0maxgold mediumint(8) unsigned NO 0ScriptName varchar(64) NO

Fields

entry

The unique identifier of the game object template entry.

type

The type of game object. The value determines which functionality a game object offers, and which data columnsneed to be used. The following list provides a list of valid types.

168 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Value Description Value Description0 Door 16 Duel arbiter1 Button 17 Fishing node2 Quest giver 18 Summoning ritual3 Chest 19 Mailbox4 Binder 20 Auction house5 Generic 21 Guard post6 Trap 22 Spell caster7 Chair 23 Meeting stone8 Spell focus 24 Flag stand9 Text 25 Fishing hole10 Goober 26 Flag drop11 Transport 27 Mini game12 Area damage 28 Lottery kiosk13 Camera 29 Capture point14 Map object 30 Aura generator15 Mo transport

displayId

A display model identifier for the gameobject_template. This references an entry in the GameObjectDisplayInfo.dbctable.

name

The game object’s name that will be displayed.

faction

A faction for the game object. The value has to match with a faction template identifier defined in FactionTemplate.dbc.

flags

The value set here determines how characters can interact with a game object. Multiple values can be combined. Thefollowing table lists allowed flags.

Value Name Description1 GO_FLAG_IN_USE Disables interaction while animated2 GO_FLAG_LOCKED Locks a game object, and requires key, spell, event, etc. to be opened4 GO_FLAG_INTERACT_COND Not targetable, can not interact (condition required to interact)8 GO_FLAG_TRANSPORT Object can transport (elevator, boat, car)16 GO_FLAG_NO_INTERACT Players can not interact with game object (e.g. removed during

events)32 GO_FLAG_NODESPAWN Prevents despawning, typically for game objects only changing

states64 GO_FLAG_TRIGGERED Used for summoned game objects. Triggered by spell or other events

3.1. Database Guide 169

mangos-zero, Release 0.2.0

size

This field defines how the size of the game object’s model appears in game.

data0-23

Since the values of these fields depends on the setting of the type column, the following tables will show the use ofdata columns for each type.

Type Description Parameters0 Door TODO1 Button TODO2 Quest giver TODO3 Chest TODO4 Binder TODO5 Generic TODO6 Trap TODO7 Chair TODO8 Spell focus TODO9 Text TODO10 Goober TODO11 Transport TODO12 Area damage TODO13 Camera TODO14 Map object TODO15 Mo transport TODO16 Duel arbiter TODO17 Fishing node TODO18 Summoning ritual TODO19 Mailbox TODO20 Auction house TODO21 Guard post TODO22 Spell caster TODO23 Meeting stone TODO24 Flag stand TODO25 Fishing hole TODO26 Flag drop TODO27 Mini game TODO28 Lottery kiosk TODO29 Capture point TODO30 Aura generator TODO

mingold

DEPRECATED: Defines money looted from the game object.

maxgold

DEPRECATED: Defines money looted from the game object.

170 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ScriptName

To assign a script from the script library to the gameobject_template, set this string to the script’s exported name.

“game_tele” table

The game_tele table holds lists of teleport locations identified by unique names.

Note: Teleport locations are merely an addition to ease the life of game masters and developers, allowing to quicklytravel to a location instead of having to lookup the coordinates.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI NULL auto_incrementposition_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0map smallint(5) unsigned NO 0name varchar(100) NO

Fields

id

A unique identifier for the teleport location.

position_x

The X coordinate for the teleport location.

position_y

The Y coordinate for the teleport location.

position_z

The Z coordinate for the teleport location.

orientation

The orientation for the teleport location.

3.1. Database Guide 171

mangos-zero, Release 0.2.0

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

name

A unique name for the teleport location.

Note: Using spaces and special characters for locations is prohibited.

“game_weather” table

The game_weather table holds the percentages for weather changes in various zones. For any given zone thepercentage of all weather types for each season, should total and not exceed 100%.

Note: Not all zones can have their weather changed in vanilla WoW.

Table structure

Field Type Null Key Default Extrazone mediumint(8) unsigned NO PRI 0spring_rain_chance tinyint(3) unsigned NO 25spring_snow_chance tinyint(3) unsigned NO 25spring_storm_chance tinyint(3) unsigned NO 25summer_rain_chance tinyint(3) unsigned NO 25summer_snow_chance tinyint(3) unsigned NO 25summer_storm_chance tinyint(3) unsigned NO 25fall_rain_chance tinyint(3) unsigned NO 25fall_snow_chance tinyint(3) unsigned NO 25fall_storm_chance tinyint(3) unsigned NO 25winter_rain_chance tinyint(3) unsigned NO 25winter_snow_chance tinyint(3) unsigned NO 25winter_storm_chance tinyint(3) unsigned NO 25

Fields

zone

A zone identifier. The value has to match with a zone identifier defined in AreaTable.dbc.

spring_rain_chance

Percentage chance for rain in the Spring.

172 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

spring_snow_chance

Percentage chance for snow in the Spring.

spring_storm_chance

Percentage chance for a sand storm in the Spring.

summer_rain_chance

Percentage chance for rain in the Summer.

summer_snow_chance

Percentage chance for snow in the Summer.

summer_storm_chance

Percentage chance for a sand storm in the Summer.

fall_rain_chance

Percentage chance for rain in the Fall.

fall_snow_chance

Percentage chance for snow in the Fall.

fall_storm_chance

Percentage chance for storm in the Fall.

winter_rain_chance

Percentage chance for rain in the Winter.

winter_snow_chance

Percentage chance for snow in the Winter.

winter_storm_chance

Percentage chance for storm in the Winter.

3.1. Database Guide 173

mangos-zero, Release 0.2.0

“gossip_menu_option” table

The gossip_menu_option table holds informations on each entry assigned to a gossip_menu.

Table structure

Field Type Null Key Default Extramenu_id smallint(6) unsigned NO PRI 0id smallint(6) unsigned NO PRI 0option_icon mediumint(8) unsigned NO 0option_text text YES NULLoption_id tinyint(3) unsigned NO 0npc_option_npcflag int(10) unsigned NO 0action_menu_id mediumint(8) NO 0action_poi_id mediumint(8) unsigned NO 0action_script_id mediumint(8) unsigned NO 0box_coded tinyint(3) unsigned NO 0box_money int(11) unsigned NO 0box_text text YES NULLcondition_id mediumint(8) unsigned NO 0

Fields

menu_id

This references the “gossip_menu” table tables unique ID for which the entry is valid.

id

The unique identifier for this gossip_menu_option.

option_icon

The value of this field determines which icon the game client will display in front of an option. The following tableshows all valid icons:

Value Icon name Description0 GOSSIP_ICON_CHAT white chat bubble1 GOSSIP_ICON_VENDOR brown bag2 GOSSIP_ICON_TAXI flight3 GOSSIP_ICON_TRAINER book4 GOSSIP_ICON_INTERACT_1 interaction wheel5 GOSSIP_ICON_INTERACT_2 interaction wheel6 GOSSIP_ICON_MONEY_BAG brown bag with coin7 GOSSIP_ICON_TALK white chat bubble with black dots8 GOSSIP_ICON_TABARD tabard9 GOSSIP_ICON_BATTLE two swords10 GOSSIP_ICON_DOT yellow dot

174 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

option_text

The text to be displayed for the gossip_menu_option entry.

option_id

The value of this field tells the client which kind of user interface the menu will require. The following table shows allvalid option types:

Value Option types0 GOSSIP_OPTION_NONE1 GOSSIP_OPTION_GOSSIP2 GOSSIP_OPTION_QUESTGIVER3 GOSSIP_OPTION_VENDOR4 GOSSIP_OPTION_TAXIVENDOR5 GOSSIP_OPTION_TRAINER6 GOSSIP_OPTION_SPIRITHEALER7 GOSSIP_OPTION_SPIRITGUIDE8 GOSSIP_OPTION_INNKEEPER9 GOSSIP_OPTION_BANKER10 GOSSIP_OPTION_PETITIONER11 GOSSIP_OPTION_TABARDDESIGNER12 GOSSIP_OPTION_BATTLEFIELD13 GOSSIP_OPTION_AUCTIONEER14 GOSSIP_OPTION_STABLEPET15 GOSSIP_OPTION_ARMORER16 GOSSIP_OPTION_UNLEARNTALENTS17 GOSSIP_OPTION_UNLEARNPETSKILLS

Note: In order for gossip_menu_option entries to work, the npcflag of the “creature_template” table table entryneeds to be set appropriately.

npc_option_npcflag

Each option requires a matching npcflag. The flag should be identical to the flag set on the NPC on which thedialogue option is displayed.

action_menu_id

To create a sub-menu, this can reference the “gossip_menu” table tables unique ID for which the entry is valid.

Note: If you want the gossip_menu_option to close the gossip window, set this field to -1.

action_poi_id

This references the “points_of_interest” table tables unique ID for which the entry is valid.

3.1. Database Guide 175

mangos-zero, Release 0.2.0

action_script_id

This references the “dbscripts_on_gossip” table tables unique ID for which the entry is valid.

box_coded

If you want the gossip_menu_option to display an input box, where players have to enter a code, set this field to 1.

box_money

If a coded box is to be displayed and the player should be asked for money, set this to the money asked in copper.

box_text

If a coded box is to be displayed, set this to a text value to show it in the coded box.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“gossip_menu” table

The gossip_menu table holds information on gossip menus assigned to either a creature or an game object.

Table structure

Field Type Null Key Default Extraentry smallint(6) unsigned NO PRI 0text_id mediumint(8) unsigned NO PRI 0script_id mediumint(8) unsigned NO PRI 0condition_id mediumint(8) unsigned NO 0

Fields

entry

The unique identifier for the gossip menu entry. This may be referenced by either the “creature_template” table table’sgossip_menu_id field, or by “gameobject_template” table tables data3 field for all game objects which are questgivers.

text_id

This references the “npc_text” table tables unique ID for which the entry is valid.

176 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

script_id

This references the “dbscripts_on_gossip” table tables unique ID for which the entry is valid.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“instance_template” table

The instance_template table holds definitions for the basic parameters of any instance.

Each time a new group opens an instance, an instance is opened using these.

Table structure

Field Type Null Key Default Extramap smallint(5) unsigned NO PRI NULLparent smallint(5) unsigned NO 0levelMin tinyint(3) unsigned NO 0levelMax tinyint(3) unsigned NO 0maxPlayers tinyint(3) unsigned NO 0reset_delay int(10) unsigned NO 0ghostEntranceMap smallint(5) unsigned NO NULLghostEntranceX float NO NULLghostEntranceY float NO NULLScriptName varchar(128) NO

Fields

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

parent

If the instance is part of another instance, this holds its parent map. The value has to match with a map identifierdefined in Map.dbc.

levelMin

The lowest allowed level required to enter the instance.

levelMax

The highest allowed level able to search for groups using meeting stones for the instance.

3.1. Database Guide 177

mangos-zero, Release 0.2.0

maxPlayers

The maximum amount of players allowed to enter as group or raid.

reset_delay

The number of days between each global reset for the instance map. If zero, the value is taken from DBC files.

The resulting value is multiplied by the Rate.InstanceResetTime configuration.

ghostEntranceMap

The continent on which ghosts will be spawned. This references the mapID column in the WorldMapContinent.dbctable.

ghostEntranceX

TODO

ghostEntranceY

TODO

ScriptName

To assign a script from the script library to the instance_template, set this string to the script’s exported name.

“item_enchantment_template” table

The item_enchantment_template table holds chances for the properties of items which have a random prop-erties attached.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0ench mediumint(8) unsigned NO PRI 0chance float unsigned NO 0

Fields

entry

The random properties unique identifier. This is referenced from the “item_template” table table’sRandomProperty table.

178 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ench

The actual enchantment which should be applied to the item. This references an entry in the ItemRandomProper-ties.dbc table.

chance

The chance for a random property to be applied to the item.

For each entry in this table, the combined chances of all properties needs to equal 100, otherwise the item may notget a random enchantment on it.

“item_loot_template” table

The item_loot_template table holds definitions on items dropped by opening items.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references the “item_template” table tables unique ID for which the entry is valid.

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

3.1. Database Guide 179

mangos-zero, Release 0.2.0

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“item_required_target” table

The item_required_target table defines which targets are required for the spells effect on an item.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLtype tinyint(3) unsigned NO PRI 0targetEntry mediumint(8) unsigned NO PRI 0

180 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

entry

This references the “item_template” table tables unique ID.

type

Describes which type of target the spell requires. The following table shows all valid target types.

Value Description0 Game object1 Creature template2 Dead creature template

targetEntry

Depending on the type value this references the “creature_template” table tables unique ID, or the “gameob-ject_template” table tables unique ID.

“item_template” table

The item_template table holds information on every item that exists in the game.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0class tinyint(3) unsigned NO MUL 0subclass tinyint(3) unsigned NO 0name varchar(255) NOdisplayid mediumint(8) unsigned NO 0Quality tinyint(3) unsigned NO 0Flags int(10) unsigned NO 0BuyCount tinyint(3) unsigned NO 1BuyPrice int(10) unsigned NO 0SellPrice int(10) unsigned NO 0InventoryType tinyint(3) unsigned NO 0AllowableClass mediumint(9) NO -1AllowableRace mediumint(9) NO -1ItemLevel tinyint(3) unsigned NO 0RequiredLevel tinyint(3) unsigned NO 0RequiredSkill smallint(5) unsigned NO 0RequiredSkillRank smallint(5) unsigned NO 0requiredspell mediumint(8) unsigned NO 0requiredhonorrank mediumint(8) unsigned NO 0RequiredCityRank mediumint(8) unsigned NO 0RequiredReputationFaction smallint(5) unsigned NO 0

Continued on next page

3.1. Database Guide 181

mangos-zero, Release 0.2.0

Table 3.19 – continued from previous pageField Type Null Key Default ExtraRequiredReputationRank smallint(5) unsigned NO 0maxcount smallint(5) unsigned NO 0stackable smallint(5) unsigned NO 1ContainerSlots tinyint(3) unsigned NO 0stat_type1 tinyint(3) unsigned NO 0stat_value1 smallint(6) NO 0stat_type2 tinyint(3) unsigned NO 0stat_value2 smallint(6) NO 0stat_type3 tinyint(3) unsigned NO 0stat_value3 smallint(6) NO 0stat_type4 tinyint(3) unsigned NO 0stat_value4 smallint(6) NO 0stat_type5 tinyint(3) unsigned NO 0stat_value5 smallint(6) NO 0stat_type6 tinyint(3) unsigned NO 0stat_value6 smallint(6) NO 0stat_type7 tinyint(3) unsigned NO 0stat_value7 smallint(6) NO 0stat_type8 tinyint(3) unsigned NO 0stat_value8 smallint(6) NO 0stat_type9 tinyint(3) unsigned NO 0stat_value9 smallint(6) NO 0stat_type10 tinyint(3) unsigned NO 0stat_value10 smallint(6) NO 0dmg_min1 float NO 0dmg_max1 float NO 0dmg_type1 tinyint(3) unsigned NO 0dmg_min2 float NO 0dmg_max2 float NO 0dmg_type2 tinyint(3) unsigned NO 0dmg_min3 float NO 0dmg_max3 float NO 0dmg_type3 tinyint(3) unsigned NO 0dmg_min4 float NO 0dmg_max4 float NO 0dmg_type4 tinyint(3) unsigned NO 0dmg_min5 float NO 0dmg_max5 float NO 0dmg_type5 tinyint(3) unsigned NO 0armor smallint(5) unsigned NO 0holy_res tinyint(3) unsigned NO 0fire_res tinyint(3) unsigned NO 0nature_res tinyint(3) unsigned NO 0frost_res tinyint(3) unsigned NO 0shadow_res tinyint(3) unsigned NO 0arcane_res tinyint(3) unsigned NO 0delay smallint(5) unsigned NO 1000ammo_type tinyint(3) unsigned NO 0RangedModRange float NO 0

Continued on next page

182 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.19 – continued from previous pageField Type Null Key Default Extraspellid_1 mediumint(8) unsigned NO 0spelltrigger_1 tinyint(3) unsigned NO 0spellcharges_1 tinyint(4) NO 0spellppmRate_1 float NO 0spellcooldown_1 int(11) NO -1spellcategory_1 smallint(5) unsigned NO 0spellcategorycooldown_1 int(11) NO -1spellid_2 mediumint(8) unsigned NO 0spelltrigger_2 tinyint(3) unsigned NO 0spellcharges_2 tinyint(4) NO 0spellppmRate_2 float NO 0spellcooldown_2 int(11) NO -1spellcategory_2 smallint(5) unsigned NO 0spellcategorycooldown_2 int(11) NO -1spellid_3 mediumint(8) unsigned NO 0spelltrigger_3 tinyint(3) unsigned NO 0spellcharges_3 tinyint(4) NO 0spellppmRate_3 float NO 0spellcooldown_3 int(11) NO -1spellcategory_3 smallint(5) unsigned NO 0spellcategorycooldown_3 int(11) NO -1spellid_4 mediumint(8) unsigned NO 0spelltrigger_4 tinyint(3) unsigned NO 0spellcharges_4 tinyint(4) NO 0spellppmRate_4 float NO 0spellcooldown_4 int(11) NO -1spellcategory_4 smallint(5) unsigned NO 0spellcategorycooldown_4 int(11) NO -1spellid_5 mediumint(8) unsigned NO 0spelltrigger_5 tinyint(3) unsigned NO 0spellcharges_5 tinyint(4) NO 0spellppmRate_5 float NO 0spellcooldown_5 int(11) NO -1spellcategory_5 smallint(5) unsigned NO 0spellcategorycooldown_5 int(11) NO -1bonding tinyint(3) unsigned NO 0description varchar(255) NOPageText mediumint(8) unsigned NO 0LanguageID tinyint(3) unsigned NO 0PageMaterial tinyint(3) unsigned NO 0startquest mediumint(8) unsigned NO 0lockid mediumint(8) unsigned NO 0Material tinyint(4) NO 0sheath tinyint(3) unsigned NO 0RandomProperty mediumint(8) unsigned NO 0block mediumint(8) unsigned NO 0itemset mediumint(8) unsigned NO 0MaxDurability smallint(5) unsigned NO 0area mediumint(8) unsigned NO 0

Continued on next page

3.1. Database Guide 183

mangos-zero, Release 0.2.0

Table 3.19 – continued from previous pageField Type Null Key Default ExtraMap smallint(6) NO 0BagFamily mediumint(9) NO 0ScriptName varchar(64) NODisenchantID mediumint(8) unsigned NO 0FoodType tinyint(3) unsigned NO 0minMoneyLoot int(10) unsigned NO 0maxMoneyLoot int(10) unsigned NO 0Duration int(11) unsigned NO 0ExtraFlags tinyint(1) unsigned NO 0

Fields

entry

The unique identifier of the item template entry.

class

The class of the item template.

ID Name ID Name0 Consumable 7 Trade Goods1 Container 9 Recipe2 Weapon 11 Quiver4 Armor 12 Quest5 Reagent 13 Key6 Projectile 15 Miscellaneous

Note: The table only contains active classes, obsolete classes have been stripped.

subclass

The subclass of the item template.

Class ID Subclass ID Subclass0 0 Consumable1 0 Container, Bag1 1 Container, Soul bag1 2 Container, Herb bag1 3 Container, Enchanting bag1 4 Container, Engineering bag2 0 Weapon, Axe 1H2 1 Weapon, Axe 2H2 2 Weapon, Bow2 3 Weapon, Gun2 4 Weapon, Mace 1H

Continued on next page

184 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.20 – continued from previous pageClass ID Subclass ID Subclass2 5 Weapon, Mace 2H2 6 Weapon, Polearm2 7 Weapon, Sword 1H2 8 Weapon, Sword 2H2 10 Weapon, Staff2 13 Weapon, Fist weapon2 14 Weapon, Miscellaneous2 15 Weapon, Dagger2 16 Weapon, Thrown2 17 Weapon, Spear2 18 Weapon, Crossbow2 19 Weapon, Wand2 20 Weapon, Fishing pole4 0 Armor, Miscellaneous4 1 Armor, Cloth4 2 Armor, Leather4 3 Armor, Mail4 4 Armor, Plate4 6 Armor, Shield4 7 Armor, Libram4 8 Armor, Idol4 9 Armor, Totem5 0 Reagent6 2 Projectile, Arrow6 3 Projectile, Bullet7 0 Trade goods, Trade goods7 1 Trade goods, Parts7 2 Trade goods, Explosives7 3 Trade goods, Devices9 0 Recipe, Book9 1 Recipe, Leatherworking9 2 Recipe, Tailoring9 3 Recipe, Engineering9 4 Recipe, Blacksmithing9 5 Recipe, Cooking9 6 Recipe, Alchemy9 7 Recipe, First aid9 8 Recipe, Enchanting9 9 Recipe, Fishing11 2 Quiver11 3 Ammo pouch12 0 Quest13 0 Key13 1 Lockpick15 0 Miscellaneous, Junk

Note: The table only contains active subclasses, obsolete classes have been stripped.

3.1. Database Guide 185

mangos-zero, Release 0.2.0

name

The item’s name that will be displayed.

displayid

A display model identifier. The value has to match with a model identifier defined in ItemDisplayInfo.dbc.

Quality

The quality of the item.

ID Color Quality0 Grey Poor1 White Common2 Green Uncommon3 Blue Rare4 Purple Epic5 Orange Legendary6 Red Artifact

Flags

This is a bit-mask field, describing the item. Multiple flags may be combined. The following table lists available flags.

Value Name Description1 ITEM_FLAG_RESERVED_0Reserved for later usage2 ITEM_FLAG_CONJUREDItems created by spells having a

SPELL_EFFECT_CREATE_ITEM4 ITEM_FLAG_LOOTABLEUsed on items of any class != 1 (containers), allows for looting

an item8 ITEM_FLAG_WRAPPEDReserved for later usage (3.x and newer)16 ITEM_FLAG_DEPRECATEDItem is deprecated and can not be equipped or used32 ITEM_FLAG_INDESTRUCTIBLEused for totem. Item can not be destroyed, except by using

spell (item can be reagent for spell and then allowed)64 ITEM_FLAG_USABLE Items that can be used via right-click128 ITEM_FLAG_NO_EQUIP_COOLDOWNItems without an equip cooldown (and usually a USABLE flag)

256 | ITEMFLAG_RESERVED_1Reserved forlater usage

512 ITEM_FLAG_WRAPPER used or not used wrapper1024 ITEM_FLAG_STACKABLEItems which can be stacked2048 ITEM_FLAG_PARTY_LOOTItems which can be looted by all party member4096 ITEM_FLAG_RESERVED_2Reserved for later usage8192 ITEM_FLAG_CHARTER Guild charter16384 ITEM_FLAG_LETTER Readable letter items32768 ITEM_FLAG_PVP_REWARDItems rewarded for PvP ranks and/or honor standing65536 ITEM_FLAG_UNK16 Seems to be unique items, or items which only allow one stack

in bags131072ITEM_FLAG_UNK17 Items related to world events

186 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

BuyCount

If an item is sold in stacks, the holds the number of items in a stack.

Note: If an item has limited supplies, the item is refresh to this count.

BuyPrice

The item’s price in copper.

SellPrice

The price for which a vendor will buy an item in copper. If an item can not be sold to vendors, this value is set to o.

InventoryType

Defines if and in which slot an item can be equipped. The following table shows all allowed values.

Value Slot name Value Slot name0 Not equipable 15 Ranged1 Head 16 Cloak2 Neck 17 2H weapon3 Shoulders 18 Bag4 Body 19 Tabard5 Chest 20 Robe6 Waist 21 Weapon, main hand7 Legs 22 Weapon, offhand8 Feet 23 Holdable9 Wrists 24 Ammo10 Hands 25 Thrown11 Finger 26 Ranged, right12 Trinket 27 Quiver13 Weapon 28 Relic14 Shield

AllowableClass

A bit-mask corresponding to class that should be able to use the item. The value has to match with classes defined inChrClasses.dbc.

Note: Set to -1 to allow usage by all classes.

AllowableRace

A bit-mask corresponding to races that should be able to use the item. The value has to match with races defined inChrRaces.dbc.

3.1. Database Guide 187

mangos-zero, Release 0.2.0

Note: Set to -1 to allow usage by all races.

ItemLevel

The item’s base level.

RequiredLevel

The character level require to use the item.

RequiredSkill

If the item requires a skill to use, this references the skill’s entry in SkillLine.dbc.

RequiredSkillRank

If RequiredSkill is set, this has to be set to the skill points required to use the item

requiredspell

If the item requires a spell to use, this references the spells entry in Spell.dbc.

requiredhonorrank

The honor system rank required to use an item. The following table contains allowed values.

Value Alliance rank Horde rank Officer rank0 Unranked No5 Private Scout No6 Corporal Grunt No7 Sergeant Sergeant No8 Master Sergeant Senior Sergeant No9 Sergeant Major First Sergeant No10 Knight Stone Guard Yes11 Knight-Lieutenant Blood Guard Yes12 Knight-Captain Legionnaire Yes13 Knight-Champion Centurion Yes14 Lieutenant-Commander Champion Yes15 Commander Lieutenant General Yes16 Marshal General Yes17 Field Marshal Warlord Yes18 Grand Marshal High Warlord Yes

RequiredCityRank

DEPRECATED: the city rank required. City ranks did not make it into WoW.

188 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

RequiredReputationFaction

A faction for which reputation is required to use the item. The value has to match with a faction identifier defined inFaction.dbc.

RequiredReputationRank

If a faction is set in RequiredReputationFaction this value is set to a reputation rank. The following tablelists valid ranks.

Value Rank0 Hated1 Hostile2 Unfriendly3 Neutral4 Friendly5 Honored6 Revered7 Exalted

maxcount

The maximum amount of copies of the item which a character may have. Setting this to 0 will allow an infiniteamount.

stackable

Defines how many copies of an item can be stacked. By default this is one item.

ContainerSlots

Defines the amount of slots for items of type container or ammunition container.

stat_type[1-10]

An item modifier to apply for this item. The following list shows available modifiers.

Value Description0 No stats1 Health3 Agility4 Strength5 Intellect6 Spirit7 Stamina

stat_value[1-10]

The value to add for the matching modifier.

3.1. Database Guide 189

mangos-zero, Release 0.2.0

dmg_min[1-5]

The minimum damage caused by the item.

dmg_max[1-5]

The maximum damage caused by the item.

dmg_type[1-5]

The type of damage the matching dmg_min/dmg_max fields cause. The following table lists available spell schoolsfor damage types.

Value Description0 Physical1 Holy2 Fire3 Nature4 Frost5 Shadow6 Arcane

armor

The armor value of the item.

holy_res

Holy resistance.

fire_res

Fire resistance.

nature_res

Nature resistance.

frost_res

Frost resistance.

shadow_res

Shadow resistance.

190 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

arcane_res

Arcane resistance.

delay

The delay in milliseconds between successive hits for the item.

ammo_type

The ammunition consumed by an item of class 2 and subclass 2, 3 and 16 aka bows, guns, and thrown weapons.

The value usually equals the subclass value, where

• 2 means arrows,

• 3 means bullets,

• 4 means thrown.

RangedModRange

spellid_[1-5]

If the item can cast or trigger a spell, this references the spell’s entry in Spell.dbc.

spelltrigger_[1-5]

The type of trigger for the matching spellid entry. The following tables shows valid trigger types

Value Description0 On use1 On equip2 Chance on hit4 Soulstone5 On use without delay

spellcharges_[1-5]

The amount of charges for the spell referenced in the matching spellid entry. If

• set to 0, the item can be used infinitely,

• set to a value > 0, the item will will stay unusable in the characters inventory once charges are depleted.

• set to a value < 0, the item will will be removed from the characters inventory once charges are depleted.

spellppmRate_[1-5]

If the matching spelltrigger field is of type 2, this controls the proc per minute rate for a spell.

3.1. Database Guide 191

mangos-zero, Release 0.2.0

spellcooldown_[1-5]

The cooldown in milliseconds for the matching spell. If set to -1, the default cooldown from the Spell.dbc table willbe used.

spellcategory_[1-5]

A spell category identifier. The value has to match with a category identifier defined in SpellCategory.dbc.

spellcategorycooldown_[1-5]

The cooldown in milliseconds for the matching spell category. If set to -1, the default cooldown from the Spell.dbctable will be used.

bonding

Defines if and how and item will be bound to a character. The following table shows available variations for itembonding.

Value Description0 No binding1 Bind on pickup2 Bind on equip3 Bind on use4 Quest item

description

A short - usually one sentence - description of the item. Mostly flavor texts.

PageText

If the item should be readable, e.g. for letters, this references a page text identifier in the “page_text” table table.

LanguageID

If an item should have text in a specific language this references a language identifier from Languages.dbc.

PageMaterial

The material to be used as background for items with page texts set. This references a page text material identifierfrom PageTextMaterial.dbc.

startquest

If right-clicking the item should start a quest, this references the quest identifier from the “quest_template” table table.

192 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

lockid

If the item is a key, this references the lock mechanism’s identifier in the Lock.dbc table. The key will then only workon locks that require the referenced lock mechanism.

Material

The material that the item is made of. The value here affects the sound the item uses when moved in bags. Use -1 forconsumable items like food, reagents, etc. This references a material identifier from Material.dbc.

The following table contains valid material identifiers.

Value Material1 Metal2 Wood3 Liquid4 Jewelry5 Chain6 Plate7 Cloth8 Leather

sheath

The value of this field controls how characters will show or hide items worn, e.g. for weapons. The following tableshows a list of supported sheath types.

Value Type Description0 None No sheathing1 Main hand On the back, pointing down2 Off hand On the back, pointing up3 Large weapon left4 Large weapon right5 Hip weapon left To the side6 Hip weapon right To the side7 Shield On the back, in the middle

RandomProperty

If an item has a chance to be created with a random enchantment, this references an entry from the“item_enchantment_template” table table.

block

If an item is a shield, this field holds the block chance.

itemset

If an item is part of an item set, this references the item set’s identifier in the ItemSet.dbc table.

3.1. Database Guide 193

mangos-zero, Release 0.2.0

MaxDurability

The maximum durability for an item.

area

If an item is only usable in a specific area, this reference a zone identifier in the AreaTable.dbc table.

Map

If an item is only usable on a specific map, this reference a map identifier in the Map.dbc table.

BagFamily

If an item is a bag, this holds a bit-mask corresponding to bag families to which the bag belongs. The value has tomatch with bag families defined in ItemBagFamily.dbc.

Note: Multiple bag families may be combined.

ScriptName

To assign a script from the script library to the item_template, set this string to the script’s exported name.

DisenchantID

If an item can be disenchanted, this references an entry in the “disenchant_loot_template” table table.

FoodType

If an item is usable as pet food, this table references an entry in the ItemPetFood.dbc table.

minMoneyLoot

If an item is a container holding money, this field specifies the minimum amount of money in copper possibly looted.

maxMoneyLoot

If an item is a container holding money, this field specifies the maximum amount of money in copper possibly looted.

194 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Duration

Items may have a duration set until the get removed from a character’s inventory.

• if the value is > 0, the item will disappear after the set time in seconds, measured in game time,

• if the value is < 0, the item will disappear after the set time in seconds, measured in real time.

Note: Items set to be deleted in real time, require ExtraFlags set accordingly.

ExtraFlags

With these flags it is possible to set rare conditions on an item. The following table shows valid conditions.

Value Description0 Nothing special1 Item is not consumable2 Item will be deleted in real time, when Duration is set

“locales_creature” table

The locales_creature table holds localized text strings for creature templates.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0name_loc1 varchar(100) NOname_loc2 varchar(100) NOname_loc3 varchar(100) NOname_loc4 varchar(100) NOname_loc5 varchar(100) NOname_loc6 varchar(100) NOname_loc7 varchar(100) NOname_loc8 varchar(100) NOsubname_loc1 varchar(100) YES NULLsubname_loc2 varchar(100) YES NULLsubname_loc3 varchar(100) YES NULLsubname_loc4 varchar(100) YES NULLsubname_loc5 varchar(100) YES NULLsubname_loc6 varchar(100) YES NULLsubname_loc7 varchar(100) YES NULLsubname_loc8 varchar(100) YES NULL

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

3.1. Database Guide 195

mangos-zero, Release 0.2.0

name_loc1

Korean localization of name in the “creature_template” table table.

name_loc2

French localization of name in the “creature_template” table table.

name_loc3

German localization of name in the “creature_template” table table.

name_loc4

Chinese localization of name in the “creature_template” table table.

name_loc5

Taiwanese localization of name in the “creature_template” table table.

name_loc6

Spanish Spain localization of name in the “creature_template” table table.

name_loc7

Spanish Latin America localization of name in the “creature_template” table table.

name_loc8

Russian localization of name in the “creature_template” table table.

subname_loc1

Korean localization of subname in the “creature_template” table table.

subname_loc2

French localization of subname in the “creature_template” table table.

subname_loc3

German localization of subname in the “creature_template” table table.

196 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

subname_loc4

Chinese localization of subname in the “creature_template” table table.

subname_loc5

Taiwanese localization of subname in the “creature_template” table table.

subname_loc6

Spanish Spain localization of subname in the “creature_template” table table.

subname_loc7

Spanish Latin America localization of subname in the “creature_template” table table.

subname_loc8

Russian localization of subname in the “creature_template” table table.

“locales_gameobject” table

The locales_gameobject table holds localized text strings for game object templates.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0name_loc1 varchar(100) NOname_loc2 varchar(100) NOname_loc3 varchar(100) NOname_loc4 varchar(100) NOname_loc5 varchar(100) NOname_loc6 varchar(100) NOname_loc7 varchar(100) NOname_loc8 varchar(100) NO

Fields

entry

This references the “gameobject_template” table tables unique ID for which the entry is valid.

name_loc1

Korean localization of name in the “gameobject_template” table table.

3.1. Database Guide 197

mangos-zero, Release 0.2.0

name_loc2

French localization of name in the “gameobject_template” table table.

name_loc3

German localization of name in the “gameobject_template” table table.

name_loc4

Chinese localization of name in the “gameobject_template” table table.

name_loc5

Taiwanese localization of name in the “gameobject_template” table table.

name_loc6

Spanish Spain localization of name in the “gameobject_template” table table.

name_loc7

Spanish Latin America localization of name in the “gameobject_template” table table.

name_loc8

Russian localization of name in the “gameobject_template” table table.

“locales_gossip_menu_option” table

The locales_gossip_menu_option table holds localized text strings for gossip menu options.

198 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extramenu_id smallint(6) unsigned NO PRI 0id smallint(6) unsigned NO PRI 0option_text_loc1 text YES NULLoption_text_loc2 text YES NULLoption_text_loc3 text YES NULLoption_text_loc4 text YES NULLoption_text_loc5 text YES NULLoption_text_loc6 text YES NULLoption_text_loc7 text YES NULLoption_text_loc8 text YES NULLbox_text_loc1 text YES NULLbox_text_loc2 text YES NULLbox_text_loc3 text YES NULLbox_text_loc4 text YES NULLbox_text_loc5 text YES NULLbox_text_loc6 text YES NULLbox_text_loc7 text YES NULLbox_text_loc8 text YES NULL

Fields

menu_id

This references the “gossip_menu_option” table tables menu_id for which the entry is valid.

id

option_text_loc1

Korean localization of option_text in the “gossip_menu_option” table table.

option_text_loc2

French localization of option_text in the “gossip_menu_option” table table.

option_text_loc3

German localization of option_text in the “gossip_menu_option” table table.

option_text_loc4

Chinese localization of option_text in the “gossip_menu_option” table table.

3.1. Database Guide 199

mangos-zero, Release 0.2.0

option_text_loc5

Taiwanese localization of option_text in the “gossip_menu_option” table table.

option_text_loc6

Spanish Spain localization of option_text in the “gossip_menu_option” table table.

option_text_loc7

Spanish Latin America localization of option_text in the “gossip_menu_option” table table.

option_text_loc8

Russian localization of option_text in the “gossip_menu_option” table table.

box_text_loc1

Korean localization of box_text in the “gossip_menu_option” table table.

box_text_loc2

French localization of box_text in the “gossip_menu_option” table table.

box_text_loc3

German localization of box_text in the “gossip_menu_option” table table.

box_text_loc4

Chinese localization of box_text in the “gossip_menu_option” table table.

box_text_loc5

Taiwanese localization of box_text in the “gossip_menu_option” table table.

box_text_loc6

Spanish Spain localization of box_text in the “gossip_menu_option” table table.

box_text_loc7

Spanish Latin America localization of box_text in the “gossip_menu_option” table table.

200 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

box_text_loc8

Russian localization of box_text in the “gossip_menu_option” table table.

“locales_item” table

The locales_item table holds localized text strings for item templates.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0name_loc1 varchar(100) NOname_loc2 varchar(100) NOname_loc3 varchar(100) NOname_loc4 varchar(100) NOname_loc5 varchar(100) NOname_loc6 varchar(100) NOname_loc7 varchar(100) NOname_loc8 varchar(100) NOdescription_loc1 varchar(255) YES NULLdescription_loc2 varchar(255) YES NULLdescription_loc3 varchar(255) YES NULLdescription_loc4 varchar(255) YES NULLdescription_loc5 varchar(255) YES NULLdescription_loc6 varchar(255) YES NULLdescription_loc7 varchar(255) YES NULLdescription_loc8 varchar(255) YES NULL

Fields

entry

This references the “item_template” table tables unique ID for which the entry is valid.

name_loc1

Korean localization of name in the “item_template” table table.

name_loc2

French localization of name in the “item_template” table table.

name_loc3

German localization of name in the “item_template” table table.

3.1. Database Guide 201

mangos-zero, Release 0.2.0

name_loc4

Chinese localization of name in the “item_template” table table.

name_loc5

Taiwanese localization of name in the “item_template” table table.

name_loc6

Spanish Spain localization of name in the “item_template” table table.

name_loc7

Spanish Latin America localization of name in the “item_template” table table.

name_loc8

Russian localization of name in the “item_template” table table.

description_loc1

Korean localization of description in the “item_template” table table.

description_loc2

French localization of description in the “item_template” table table.

description_loc3

German localization of description in the “item_template” table table.

description_loc4

Chinese localization of description in the “item_template” table table.

description_loc5

Taiwanese localization of description in the “item_template” table table.

description_loc6

Spanish Spain localization of description in the “item_template” table table.

202 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

description_loc7

Spanish Latin America localization of description in the “item_template” table table.

description_loc8

Russian localization of description in the “item_template” table table.

“locales_npc_text” table

The locales_npc_text table holds localized text strings for creature dialogue texts.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0Text0_0_loc1 longtext YES NULLText0_0_loc2 longtext YES NULLText0_0_loc3 longtext YES NULLText0_0_loc4 longtext YES NULLText0_0_loc5 longtext YES NULLText0_0_loc6 longtext YES NULLText0_0_loc7 longtext YES NULLText0_0_loc8 longtext YES NULLText0_1_loc1 longtext YES NULLText0_1_loc2 longtext YES NULLText0_1_loc3 longtext YES NULLText0_1_loc4 longtext YES NULLText0_1_loc5 longtext YES NULLText0_1_loc6 longtext YES NULLText0_1_loc7 longtext YES NULLText0_1_loc8 longtext YES NULLText1_0_loc1 longtext YES NULLText1_0_loc2 longtext YES NULLText1_0_loc3 longtext YES NULLText1_0_loc4 longtext YES NULLText1_0_loc5 longtext YES NULLText1_0_loc6 longtext YES NULLText1_0_loc7 longtext YES NULLText1_0_loc8 longtext YES NULLText1_1_loc1 longtext YES NULLText1_1_loc2 longtext YES NULLText1_1_loc3 longtext YES NULLText1_1_loc4 longtext YES NULLText1_1_loc5 longtext YES NULLText1_1_loc6 longtext YES NULLText1_1_loc7 longtext YES NULLText1_1_loc8 longtext YES NULL

Continued on next page

3.1. Database Guide 203

mangos-zero, Release 0.2.0

Table 3.21 – continued from previous pageField Type Null Key Default ExtraText2_0_loc1 longtext YES NULLText2_0_loc2 longtext YES NULLText2_0_loc3 longtext YES NULLText2_0_loc4 longtext YES NULLText2_0_loc5 longtext YES NULLText2_0_loc6 longtext YES NULLText2_0_loc7 longtext YES NULLText2_0_loc8 longtext YES NULLText2_1_loc1 longtext YES NULLText2_1_loc2 longtext YES NULLText2_1_loc3 longtext YES NULLText2_1_loc4 longtext YES NULLText2_1_loc5 longtext YES NULLText2_1_loc6 longtext YES NULLText2_1_loc7 longtext YES NULLText2_1_loc8 longtext YES NULLText3_0_loc1 longtext YES NULLText3_0_loc2 longtext YES NULLText3_0_loc3 longtext YES NULLText3_0_loc4 longtext YES NULLText3_0_loc5 longtext YES NULLText3_0_loc6 longtext YES NULLText3_0_loc7 longtext YES NULLText3_0_loc8 longtext YES NULLText3_1_loc1 longtext YES NULLText3_1_loc2 longtext YES NULLText3_1_loc3 longtext YES NULLText3_1_loc4 longtext YES NULLText3_1_loc5 longtext YES NULLText3_1_loc6 longtext YES NULLText3_1_loc7 longtext YES NULLText3_1_loc8 longtext YES NULLText4_0_loc1 longtext YES NULLText4_0_loc2 longtext YES NULLText4_0_loc3 longtext YES NULLText4_0_loc4 longtext YES NULLText4_0_loc5 longtext YES NULLText4_0_loc6 longtext YES NULLText4_0_loc7 longtext YES NULLText4_0_loc8 longtext YES NULLText4_1_loc1 longtext YES NULLText4_1_loc2 longtext YES NULLText4_1_loc3 longtext YES NULLText4_1_loc4 longtext YES NULLText4_1_loc5 longtext YES NULLText4_1_loc6 longtext YES NULLText4_1_loc7 longtext YES NULLText4_1_loc8 longtext YES NULLText5_0_loc1 longtext YES NULL

Continued on next page

204 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.21 – continued from previous pageField Type Null Key Default ExtraText5_0_loc2 longtext YES NULLText5_0_loc3 longtext YES NULLText5_0_loc4 longtext YES NULLText5_0_loc5 longtext YES NULLText5_0_loc6 longtext YES NULLText5_0_loc7 longtext YES NULLText5_0_loc8 longtext YES NULLText5_1_loc1 longtext YES NULLText5_1_loc2 longtext YES NULLText5_1_loc3 longtext YES NULLText5_1_loc4 longtext YES NULLText5_1_loc5 longtext YES NULLText5_1_loc6 longtext YES NULLText5_1_loc7 longtext YES NULLText5_1_loc8 longtext YES NULLText6_0_loc1 longtext YES NULLText6_0_loc2 longtext YES NULLText6_0_loc3 longtext YES NULLText6_0_loc4 longtext YES NULLText6_0_loc5 longtext YES NULLText6_0_loc6 longtext YES NULLText6_0_loc7 longtext YES NULLText6_0_loc8 longtext YES NULLText6_1_loc1 longtext YES NULLText6_1_loc2 longtext YES NULLText6_1_loc3 longtext YES NULLText6_1_loc4 longtext YES NULLText6_1_loc5 longtext YES NULLText6_1_loc6 longtext YES NULLText6_1_loc7 longtext YES NULLText6_1_loc8 longtext YES NULLText7_0_loc1 longtext YES NULLText7_0_loc2 longtext YES NULLText7_0_loc3 longtext YES NULLText7_0_loc4 longtext YES NULLText7_0_loc5 longtext YES NULLText7_0_loc6 longtext YES NULLText7_0_loc7 longtext YES NULLText7_0_loc8 longtext YES NULLText7_1_loc1 longtext YES NULLText7_1_loc2 longtext YES NULLText7_1_loc3 longtext YES NULLText7_1_loc4 longtext YES NULLText7_1_loc5 longtext YES NULLText7_1_loc6 longtext YES NULLText7_1_loc7 longtext YES NULLText7_1_loc8 longtext YES NULL

3.1. Database Guide 205

mangos-zero, Release 0.2.0

Fields

entry

This references the “npc_text” table tables unique ID for which the entry is valid.

Text0_0_loc1

Korean localization of Text0_0 in the “npc_text” table table.

Text0_0_loc2

French localization of Text0_0 in the “npc_text” table table.

Text0_0_loc3

German localization of Text0_0 in the “npc_text” table table.

Text0_0_loc4

Chinese localization of Text0_0 in the “npc_text” table table.

Text0_0_loc5

Taiwanese localization of Text0_0 in the “npc_text” table table.

Text0_0_loc6

Spanish Spain localization of Text0_0 in the “npc_text” table table.

Text0_0_loc7

Spanish Latin America localization of Text0_0 in the “npc_text” table table.

Text0_0_loc8

Russian localization of Text0_0 in the “npc_text” table table.

Text0_1_loc1

Korean localization of Text0_1 in the “npc_text” table table.

Text0_1_loc2

French localization of Text0_1 in the “npc_text” table table.

206 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text0_1_loc3

German localization of Text0_1 in the “npc_text” table table.

Text0_1_loc4

Chinese localization of Text0_1 in the “npc_text” table table.

Text0_1_loc5

Taiwanese localization of Text0_1 in the “npc_text” table table.

Text0_1_loc6

Spanish Spain localization of Text0_1 in the “npc_text” table table.

Text0_1_loc7

Spanish Latin America localization of Text0_1 in the “npc_text” table table.

Text0_1_loc8

Russian localization of Text0_1 in the “npc_text” table table.

Text1_0_loc1

Korean localization of Text1_0 in the “npc_text” table table.

Text1_0_loc2

French localization of Text1_0 in the “npc_text” table table.

Text1_0_loc3

German localization of Text1_0 in the “npc_text” table table.

Text1_0_loc4

Chinese localization of Text1_0 in the “npc_text” table table.

Text1_0_loc5

Taiwanese localization of Text1_0 in the “npc_text” table table.

3.1. Database Guide 207

mangos-zero, Release 0.2.0

Text1_0_loc6

Spanish Spain localization of Text1_0 in the “npc_text” table table.

Text1_0_loc7

Spanish Latin America localization of Text1_0 in the “npc_text” table table.

Text1_0_loc8

Russian localization of Text1_0 in the “npc_text” table table.

Text1_1_loc1

Korean localization of Text1_1 in the “npc_text” table table.

Text1_1_loc2

French localization of Text1_1 in the “npc_text” table table.

Text1_1_loc3

German localization of Text1_1 in the “npc_text” table table.

Text1_1_loc4

Chinese localization of Text1_1 in the “npc_text” table table.

Text1_1_loc5

Taiwanese localization of Text1_1 in the “npc_text” table table.

Text1_1_loc6

Spanish Spain localization of Text1_1 in the “npc_text” table table.

Text1_1_loc7

Spanish Latin America localization of Text1_1 in the “npc_text” table table.

Text1_1_loc8

Russian localization of Text1_1 in the “npc_text” table table.

208 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text2_0_loc1

Korean localization of Text2_0 in the “npc_text” table table.

Text2_0_loc2

French localization of Text2_0 in the “npc_text” table table.

Text2_0_loc3

German localization of Text2_0 in the “npc_text” table table.

Text2_0_loc4

Chinese localization of Text2_0 in the “npc_text” table table.

Text2_0_loc5

Taiwanese localization of Text2_0 in the “npc_text” table table.

Text2_0_loc6

Spanish Spain localization of Text2_0 in the “npc_text” table table.

Text2_0_loc7

Spanish Latin America localization of Text2_0 in the “npc_text” table table.

Text2_0_loc8

Russian localization of Text2_0 in the “npc_text” table table.

Text2_1_loc1

Korean localization of Text2_1 in the “npc_text” table table.

Text2_1_loc2

French localization of Text2_1 in the “npc_text” table table.

Text2_1_loc3

German localization of Text2_1 in the “npc_text” table table.

3.1. Database Guide 209

mangos-zero, Release 0.2.0

Text2_1_loc4

Chinese localization of Text2_1 in the “npc_text” table table.

Text2_1_loc5

Taiwanese localization of Text2_1 in the “npc_text” table table.

Text2_1_loc6

Spanish Spain localization of Text2_1 in the “npc_text” table table.

Text2_1_loc7

Spanish Latin America localization of Text2_1 in the “npc_text” table table.

Text2_1_loc8

Russian localization of Text2_1 in the “npc_text” table table.

Text3_0_loc1

Korean localization of Text3_0 in the “npc_text” table table.

Text3_0_loc2

French localization of Text3_0 in the “npc_text” table table.

Text3_0_loc3

German localization of Text3_0 in the “npc_text” table table.

Text3_0_loc4

Chinese localization of Text3_0 in the “npc_text” table table.

Text3_0_loc5

Taiwanese localization of Text3_0 in the “npc_text” table table.

Text3_0_loc6

Spanish Spain localization of Text3_0 in the “npc_text” table table.

210 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text3_0_loc7

Spanish Latin America localization of Text3_0 in the “npc_text” table table.

Text3_0_loc8

Russian localization of Text3_0 in the “npc_text” table table.

Text3_1_loc1

Korean localization of Text3_1 in the “npc_text” table table.

Text3_1_loc2

French localization of Text3_1 in the “npc_text” table table.

Text3_1_loc3

German localization of Text3_1 in the “npc_text” table table.

Text3_1_loc4

Chinese localization of Text3_1 in the “npc_text” table table.

Text3_1_loc5

Taiwanese localization of Text3_1 in the “npc_text” table table.

Text3_1_loc6

Spanish Spain localization of Text3_1 in the “npc_text” table table.

Text3_1_loc7

Spanish Latin America localization of Text3_1 in the “npc_text” table table.

Text3_1_loc8

Russian localization of Text3_1 in the “npc_text” table table.

Text4_0_loc1

Korean localization of Text4_0 in the “npc_text” table table.

3.1. Database Guide 211

mangos-zero, Release 0.2.0

Text4_0_loc2

French localization of Text4_0 in the “npc_text” table table.

Text4_0_loc3

German localization of Text4_0 in the “npc_text” table table.

Text4_0_loc4

Chinese localization of Text4_0 in the “npc_text” table table.

Text4_0_loc5

Taiwanese localization of Text4_0 in the “npc_text” table table.

Text4_0_loc6

Spanish Spain localization of Text4_0 in the “npc_text” table table.

Text4_0_loc7

Spanish Latin America localization of Text4_0 in the “npc_text” table table.

Text4_0_loc8

Russian localization of Text4_0 in the “npc_text” table table.

Text4_1_loc1

Korean localization of Text4_1 in the “npc_text” table table.

Text4_1_loc2

French localization of Text4_1 in the “npc_text” table table.

Text4_1_loc3

German localization of Text4_1 in the “npc_text” table table.

Text4_1_loc4

Chinese localization of Text4_1 in the “npc_text” table table.

212 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text4_1_loc5

Taiwanese localization of Text4_1 in the “npc_text” table table.

Text4_1_loc6

Spanish Spain localization of Text4_1 in the “npc_text” table table.

Text4_1_loc7

Spanish Latin America localization of Text4_1 in the “npc_text” table table.

Text4_1_loc8

Russian localization of Text4_1 in the “npc_text” table table.

Text5_0_loc1

Korean localization of Text5_0 in the “npc_text” table table.

Text5_0_loc2

French localization of Text5_0 in the “npc_text” table table.

Text5_0_loc3

German localization of Text5_0 in the “npc_text” table table.

Text5_0_loc4

Chinese localization of Text5_0 in the “npc_text” table table.

Text5_0_loc5

Taiwanese localization of Text5_0 in the “npc_text” table table.

Text5_0_loc6

Spanish Spain localization of Text5_0 in the “npc_text” table table.

Text5_0_loc7

Spanish Latin America localization of Text5_0 in the “npc_text” table table.

3.1. Database Guide 213

mangos-zero, Release 0.2.0

Text5_0_loc8

Russian localization of Text5_0 in the “npc_text” table table.

Text5_1_loc1

Korean localization of Text5_1 in the “npc_text” table table.

Text5_1_loc2

French localization of Text5_1 in the “npc_text” table table.

Text5_1_loc3

German localization of Text5_1 in the “npc_text” table table.

Text5_1_loc4

Chinese localization of Text5_1 in the “npc_text” table table.

Text5_1_loc5

Taiwanese localization of Text5_1 in the “npc_text” table table.

Text5_1_loc6

Spanish Spain localization of Text5_1 in the “npc_text” table table.

Text5_1_loc7

Spanish Latin America localization of Text5_1 in the “npc_text” table table.

Text5_1_loc8

Russian localization of Text5_1 in the “npc_text” table table.

Text6_0_loc1

Korean localization of Text6_0 in the “npc_text” table table.

Text6_0_loc2

French localization of Text6_0 in the “npc_text” table table.

214 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text6_0_loc3

German localization of Text6_0 in the “npc_text” table table.

Text6_0_loc4

Chinese localization of Text6_0 in the “npc_text” table table.

Text6_0_loc5

Taiwanese localization of Text6_0 in the “npc_text” table table.

Text6_0_loc6

Spanish Spain localization of Text6_0 in the “npc_text” table table.

Text6_0_loc7

Spanish Latin America localization of Text6_0 in the “npc_text” table table.

Text6_0_loc8

Russian localization of Text6_0 in the “npc_text” table table.

Text6_1_loc1

Korean localization of Text6_1 in the “npc_text” table table.

Text6_1_loc2

French localization of Text6_1 in the “npc_text” table table.

Text6_1_loc3

German localization of Text6_1 in the “npc_text” table table.

Text6_1_loc4

Chinese localization of Text6_1 in the “npc_text” table table.

Text6_1_loc5

Taiwanese localization of Text6_1 in the “npc_text” table table.

3.1. Database Guide 215

mangos-zero, Release 0.2.0

Text6_1_loc6

Spanish Spain localization of Text6_1 in the “npc_text” table table.

Text6_1_loc7

Spanish Latin America localization of Text6_1 in the “npc_text” table table.

Text6_1_loc8

Russian localization of Text6_1 in the “npc_text” table table.

Text7_0_loc1

Korean localization of Text7_0 in the “npc_text” table table.

Text7_0_loc2

French localization of Text7_0 in the “npc_text” table table.

Text7_0_loc3

German localization of Text7_0 in the “npc_text” table table.

Text7_0_loc4

Chinese localization of Text7_0 in the “npc_text” table table.

Text7_0_loc5

Taiwanese localization of Text7_0 in the “npc_text” table table.

Text7_0_loc6

Spanish Spain localization of Text7_0 in the “npc_text” table table.

Text7_0_loc7

Spanish Latin America localization of Text7_0 in the “npc_text” table table.

Text7_0_loc8

Russian localization of Text7_0 in the “npc_text” table table.

216 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text7_1_loc1

Korean localization of Text7_1 in the “npc_text” table table.

Text7_1_loc2

French localization of Text7_1 in the “npc_text” table table.

Text7_1_loc3

German localization of Text7_1 in the “npc_text” table table.

Text7_1_loc4

Chinese localization of Text7_1 in the “npc_text” table table.

Text7_1_loc5

Taiwanese localization of Text7_1 in the “npc_text” table table.

Text7_1_loc6

Spanish Spain localization of Text7_1 in the “npc_text” table table.

Text7_1_loc7

Spanish Latin America localization of Text7_1 in the “npc_text” table table.

Text7_1_loc8

Russian localization of Text7_1 in the “npc_text” table table.

“locales_page_text” table

The locales_page_text table holds localized text strings for page texts.

3.1. Database Guide 217

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0Text_loc1 longtext YES NULLText_loc2 longtext YES NULLText_loc3 longtext YES NULLText_loc4 longtext YES NULLText_loc5 longtext YES NULLText_loc6 longtext YES NULLText_loc7 longtext YES NULLText_loc8 longtext YES NULL

Fields

entry

This references the “page_text” table tables unique ID for which the entry is valid.

Text_loc1

Korean localization of Text in the “page_text” table table.

Text_loc2

French localization of Text in the “page_text” table table.

Text_loc3

German localization of Text in the “page_text” table table.

Text_loc4

Chinese localization of Text in the “page_text” table table.

Text_loc5

Taiwanese localization of Text in the “page_text” table table.

Text_loc6

Spanish Spain localization of Text in the “page_text” table table.

Text_loc7

Spanish Latin America localization of Text in the “page_text” table table.

218 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Text_loc8

Russian localization of Text in the “page_text” table table.

“locales_points_of_interest” table

The locales_points_of_interest table holds localized text strings for points of interest.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0icon_name_loc1 text YES NULLicon_name_loc2 text YES NULLicon_name_loc3 text YES NULLicon_name_loc4 text YES NULLicon_name_loc5 text YES NULLicon_name_loc6 text YES NULLicon_name_loc7 text YES NULLicon_name_loc8 text YES NULL

Fields

entry

This references the “points_of_interest” table tables unique ID for which the entry is valid.

icon_name_loc1

Korean localization of icon_name in the “points_of_interest” table table.

icon_name_loc2

French localization of icon_name in the “points_of_interest” table table.

icon_name_loc3

German localization of icon_name in the “points_of_interest” table table.

icon_name_loc4

Chinese localization of icon_name in the “points_of_interest” table table.

icon_name_loc5

Taiwanese localization of icon_name in the “points_of_interest” table table.

3.1. Database Guide 219

mangos-zero, Release 0.2.0

icon_name_loc6

Spanish Spain localization of icon_name in the “points_of_interest” table table.

icon_name_loc7

Spanish Latin America localization of icon_name in the “points_of_interest” table table.

icon_name_loc8

Russian localization of icon_name in the “points_of_interest” table table.

“locales_quest” table

The locales_quest table holds localized text strings for quest templates.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0Title_loc1 text YES NULLTitle_loc2 text YES NULLTitle_loc3 text YES NULLTitle_loc4 text YES NULLTitle_loc5 text YES NULLTitle_loc6 text YES NULLTitle_loc7 text YES NULLTitle_loc8 text YES NULLDetails_loc1 text YES NULLDetails_loc2 text YES NULLDetails_loc3 text YES NULLDetails_loc4 text YES NULLDetails_loc5 text YES NULLDetails_loc6 text YES NULLDetails_loc7 text YES NULLDetails_loc8 text YES NULLObjectives_loc1 text YES NULLObjectives_loc2 text YES NULLObjectives_loc3 text YES NULLObjectives_loc4 text YES NULLObjectives_loc5 text YES NULLObjectives_loc6 text YES NULLObjectives_loc7 text YES NULLObjectives_loc8 text YES NULLOfferRewardText_loc1 text YES NULLOfferRewardText_loc2 text YES NULLOfferRewardText_loc3 text YES NULL

Continued on next page

220 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.22 – continued from previous pageField Type Null Key Default ExtraOfferRewardText_loc4 text YES NULLOfferRewardText_loc5 text YES NULLOfferRewardText_loc6 text YES NULLOfferRewardText_loc7 text YES NULLOfferRewardText_loc8 text YES NULLRequestItemsText_loc1 text YES NULLRequestItemsText_loc2 text YES NULLRequestItemsText_loc3 text YES NULLRequestItemsText_loc4 text YES NULLRequestItemsText_loc5 text YES NULLRequestItemsText_loc6 text YES NULLRequestItemsText_loc7 text YES NULLRequestItemsText_loc8 text YES NULLEndText_loc1 text YES NULLEndText_loc2 text YES NULLEndText_loc3 text YES NULLEndText_loc4 text YES NULLEndText_loc5 text YES NULLEndText_loc6 text YES NULLEndText_loc7 text YES NULLEndText_loc8 text YES NULLObjectiveText1_loc1 text YES NULLObjectiveText1_loc2 text YES NULLObjectiveText1_loc3 text YES NULLObjectiveText1_loc4 text YES NULLObjectiveText1_loc5 text YES NULLObjectiveText1_loc6 text YES NULLObjectiveText1_loc7 text YES NULLObjectiveText1_loc8 text YES NULLObjectiveText2_loc1 text YES NULLObjectiveText2_loc2 text YES NULLObjectiveText2_loc3 text YES NULLObjectiveText2_loc4 text YES NULLObjectiveText2_loc5 text YES NULLObjectiveText2_loc6 text YES NULLObjectiveText2_loc7 text YES NULLObjectiveText2_loc8 text YES NULLObjectiveText3_loc1 text YES NULLObjectiveText3_loc2 text YES NULLObjectiveText3_loc3 text YES NULLObjectiveText3_loc4 text YES NULLObjectiveText3_loc5 text YES NULLObjectiveText3_loc6 text YES NULLObjectiveText3_loc7 text YES NULLObjectiveText3_loc8 text YES NULLObjectiveText4_loc1 text YES NULLObjectiveText4_loc2 text YES NULLObjectiveText4_loc3 text YES NULLObjectiveText4_loc4 text YES NULL

Continued on next page

3.1. Database Guide 221

mangos-zero, Release 0.2.0

Table 3.22 – continued from previous pageField Type Null Key Default ExtraObjectiveText4_loc5 text YES NULLObjectiveText4_loc6 text YES NULLObjectiveText4_loc7 text YES NULLObjectiveText4_loc8 text YES NULL

Fields

entry

This references the “quest_template” table tables unique ID for which the entry is valid.

Title_loc1

Korean localization of Title in the “quest_template” table table.

Title_loc2

French localization of Title in the “quest_template” table table.

Title_loc3

German localization of Title in the “quest_template” table table.

Title_loc4

Chinese localization of Title in the “quest_template” table table.

Title_loc5

Taiwanese localization of Title in the “quest_template” table table.

Title_loc6

Spanish Spain localization of Title in the “quest_template” table table.

Title_loc7

Spanish Latin America localization of Title in the “quest_template” table table.

Title_loc8

Russian localization of Title in the “quest_template” table table.

222 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Details_loc1

Korean localization of Details in the “quest_template” table table.

Details_loc2

French localization of Details in the “quest_template” table table.

Details_loc3

German localization of Details in the “quest_template” table table.

Details_loc4

Chinese localization of Details in the “quest_template” table table.

Details_loc5

Taiwanese localization of Details in the “quest_template” table table.

Details_loc6

Spanish Spain localization of Details in the “quest_template” table table.

Details_loc7

Spanish Latin America localization of Details in the “quest_template” table table.

Details_loc8

Russian localization of Details in the “quest_template” table table.

Objectives_loc1

Korean localization of Objectives in the “quest_template” table table.

Objectives_loc2

French localization of Objectives in the “quest_template” table table.

Objectives_loc3

German localization of Objectives in the “quest_template” table table.

3.1. Database Guide 223

mangos-zero, Release 0.2.0

Objectives_loc4

Chinese localization of Objectives in the “quest_template” table table.

Objectives_loc5

Taiwanese localization of Objectives in the “quest_template” table table.

Objectives_loc6

Spanish Spain localization of Objectives in the “quest_template” table table.

Objectives_loc7

Spanish Latin America localization of Objectives in the “quest_template” table table.

Objectives_loc8

Russian localization of Objectives in the “quest_template” table table.

OfferRewardText_loc1

Korean localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc2

French localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc3

German localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc4

Chinese localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc5

Taiwanese localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc6

Spanish Spain localization of OfferRewardText in the “quest_template” table table.

224 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

OfferRewardText_loc7

Spanish Latin America localization of OfferRewardText in the “quest_template” table table.

OfferRewardText_loc8

Russian localization of OfferRewardText in the “quest_template” table table.

RequestItemsText_loc1

Korean localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc2

French localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc3

German localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc4

Chinese localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc5

Taiwanese localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc6

Spanish Spain localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc7

Spanish Latin America localization of RequestItemsText in the “quest_template” table table.

RequestItemsText_loc8

Russian localization of RequestItemsText in the “quest_template” table table.

EndText_loc1

Korean localization of EndText in the “quest_template” table table.

3.1. Database Guide 225

mangos-zero, Release 0.2.0

EndText_loc2

French localization of EndText in the “quest_template” table table.

EndText_loc3

German localization of EndText in the “quest_template” table table.

EndText_loc4

Chinese localization of EndText in the “quest_template” table table.

EndText_loc5

Taiwanese localization of EndText in the “quest_template” table table.

EndText_loc6

Spanish Spain localization of EndText in the “quest_template” table table.

EndText_loc7

Spanish Latin America localization of EndText in the “quest_template” table table.

EndText_loc8

Russian localization of EndText in the “quest_template” table table.

ObjectiveText1_loc1

Korean localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc2

French localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc3

German localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc4

Chinese localization of ObjectiveText1 in the “quest_template” table table.

226 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ObjectiveText1_loc5

Taiwanese localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc6

Spanish Spain localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc7

Spanish Latin America localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText1_loc8

Russian localization of ObjectiveText1 in the “quest_template” table table.

ObjectiveText2_loc1

Korean localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc2

French localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc3

German localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc4

Chinese localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc5

Taiwanese localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc6

Spanish Spain localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText2_loc7

Spanish Latin America localization of ObjectiveText2 in the “quest_template” table table.

3.1. Database Guide 227

mangos-zero, Release 0.2.0

ObjectiveText2_loc8

Russian localization of ObjectiveText2 in the “quest_template” table table.

ObjectiveText3_loc1

Korean localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc2

French localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc3

German localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc4

Chinese localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc5

Taiwanese localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc6

Spanish Spain localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc7

Spanish Latin America localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText3_loc8

Russian localization of ObjectiveText3 in the “quest_template” table table.

ObjectiveText4_loc1

Korean localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc2

French localization of ObjectiveText4 in the “quest_template” table table.

228 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ObjectiveText4_loc3

German localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc4

Chinese localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc5

Taiwanese localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc6

Spanish Spain localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc7

Spanish Latin America localization of ObjectiveText4 in the “quest_template” table table.

ObjectiveText4_loc8

Russian localization of ObjectiveText4 in the “quest_template” table table.

“mail_loot_template” table

The mail_loot_template table holds definitions for loot contained in mail templates sent by creatures.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references an entry from the MailTemplate.dbc table.

3.1. Database Guide 229

mangos-zero, Release 0.2.0

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

230 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“mangos_string” table

The mangos_string table holds strings used internally by the server to allow translations.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0content_default text NO NULLcontent_loc1 text YES NULLcontent_loc2 text YES NULLcontent_loc3 text YES NULLcontent_loc4 text YES NULLcontent_loc5 text YES NULLcontent_loc6 text YES NULLcontent_loc7 text YES NULLcontent_loc8 text YES NULL

Fields

entry

The ID that the core uses to identify a string. These IDs are contained and used internally and need to correspond towhat the core expects.

Note: The core will not operate if strings are missing from this table.

content_default

The English translation.

Note: The % arguments need to be used in the exact same order for any translation.

content_loc1

Korean localization of content_default.

content_loc2

French localization of content_default.

content_loc3

German localization of content_default.

3.1. Database Guide 231

mangos-zero, Release 0.2.0

content_loc4

Chinese localization of content_default.

content_loc5

Taiwanese localization of content_default.

content_loc6

Spanish Spain localization of content_default.

content_loc7

Spanish Latin America localization of content_default.

content_loc8

Russian localization of content_default.

“npc_gossip” table

The npc_gossip table holds the link between creatures and gossip text.

Table structure

Field Type Null Key Default Extranpc_guid int(10) unsigned NO PRI 0textid mediumint(8) unsigned NO 0

Fields

npc_guid

This references the “creature” table tables guid field for which the entry is valid.

textid

This references the “npc_text” table tables unique ID of the NPC text for which the entry is valid.

Note: To actually make a creature display a gossip dialogue with the linked text, you will have to update the “crea-ture_template” table as follows:

232 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

SET @CREATURE_FLAG_NPC_GOSSIP = 1;

UPDATE `creature_template`SET

`NpcFlags` = `NpcFlags` | @CREATURE_FLAG_NPC_GOSSIP,WHERE

`entry` = YOUR-CREATURE;

This will add the gossip flag to any existing flags and thus enable the link text to be displayed.

“npc_text” table

The npc_text table holds the texts that are used for gossip.

Table structure

Field Type Null Key Default ExtraID mediumint(8) unsigned NO PRI 0text0_0 longtext YES NULLtext0_1 longtext YES NULLlang0 tinyint(3) unsigned NO 0prob0 float NO 0em0_0_delay smallint(5) unsigned NO 0em0_0 smallint(5) unsigned NO 0em0_1_delay smallint(5) unsigned NO 0em0_1 smallint(5) unsigned NO 0em0_2_delay smallint(5) unsigned NO 0em0_2 smallint(5) unsigned NO 0text1_0 longtext YES NULLtext1_1 longtext YES NULLlang1 tinyint(3) unsigned NO 0prob1 float NO 0em1_0_delay smallint(5) unsigned NO 0em1_0 smallint(5) unsigned NO 0em1_1_delay smallint(5) unsigned NO 0em1_1 smallint(5) unsigned NO 0em1_2_delay smallint(5) unsigned NO 0em1_2 smallint(5) unsigned NO 0text2_0 longtext YES NULLtext2_1 longtext YES NULLlang2 tinyint(3) unsigned NO 0prob2 float NO 0em2_0_delay smallint(5) unsigned NO 0em2_0 smallint(5) unsigned NO 0em2_1_delay smallint(5) unsigned NO 0em2_1 smallint(5) unsigned NO 0em2_2_delay smallint(5) unsigned NO 0em2_2 smallint(5) unsigned NO 0text3_0 longtext YES NULLtext3_1 longtext YES NULL

Continued on next page

3.1. Database Guide 233

mangos-zero, Release 0.2.0

Table 3.23 – continued from previous pageField Type Null Key Default Extralang3 tinyint(3) unsigned NO 0prob3 float NO 0em3_0_delay smallint(5) unsigned NO 0em3_0 smallint(5) unsigned NO 0em3_1_delay smallint(5) unsigned NO 0em3_1 smallint(5) unsigned NO 0em3_2_delay smallint(5) unsigned NO 0em3_2 smallint(5) unsigned NO 0text4_0 longtext YES NULLtext4_1 longtext YES NULLlang4 tinyint(3) unsigned NO 0prob4 float NO 0em4_0_delay smallint(5) unsigned NO 0em4_0 smallint(5) unsigned NO 0em4_1_delay smallint(5) unsigned NO 0em4_1 smallint(5) unsigned NO 0em4_2_delay smallint(5) unsigned NO 0em4_2 smallint(5) unsigned NO 0text5_0 longtext YES NULLtext5_1 longtext YES NULLlang5 tinyint(3) unsigned NO 0prob5 float NO 0em5_0_delay smallint(5) unsigned NO 0em5_0 smallint(5) unsigned NO 0em5_1_delay smallint(5) unsigned NO 0em5_1 smallint(5) unsigned NO 0em5_2_delay smallint(5) unsigned NO 0em5_2 smallint(5) unsigned NO 0text6_0 longtext YES NULLtext6_1 longtext YES NULLlang6 tinyint(3) unsigned NO 0prob6 float NO 0em6_0_delay smallint(5) unsigned NO 0em6_0 smallint(5) unsigned NO 0em6_1_delay smallint(5) unsigned NO 0em6_1 smallint(5) unsigned NO 0em6_2_delay smallint(5) unsigned NO 0em6_2 smallint(5) unsigned NO 0text7_0 longtext YES NULLtext7_1 longtext YES NULLlang7 tinyint(3) unsigned NO 0prob7 float NO 0em7_0_delay smallint(5) unsigned NO 0em7_0 smallint(5) unsigned NO 0em7_1_delay smallint(5) unsigned NO 0em7_1 smallint(5) unsigned NO 0em7_2_delay smallint(5) unsigned NO 0em7_2 smallint(5) unsigned NO 0

234 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

ID

The unique identifier of the text entry. Please note that the identifier is acquired from the game client by parsing thelocal WDB cache files.

It is unknown if text identifiers required a specific identifier to work.

text0_0

This is the locale text that is displayed if the creature is male.

text0_1

This is the locale text that is displayed if the creature is female.

lang0

The language of the text in game.

prob0

This is the probability that the creature will say this text.

em0_0_delay

Time to wait before the first emote is played.

em0_0

Emote to play when text is displayed.

em0_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em0_1

Second emote to play when text is displayed.

em0_2_delay

Time to wait after the second emote are played, before the third emote gets played.

3.1. Database Guide 235

mangos-zero, Release 0.2.0

em0_2

Third emote to play when text is displayed.

text1_0

This is the locale text that is displayed if the creature is male.

text1_1

This is the locale text that is displayed if the creature is female.

lang1

The language of the text in game.

prob1

This is the probability that the creature will say this text.

em1_0_delay

Time to wait before the first emote is played.

em1_0

Emote to play when text is displayed.

em1_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em1_1

Second emote to play when text is displayed.

em1_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em1_2

Third emote to play when text is displayed.

236 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

text2_0

This is the locale text that is displayed if the creature is male.

text2_1

This is the locale text that is displayed if the creature is female.

lang2

The language of the text in game.

prob2

This is the probability that the creature will say this text.

em2_0_delay

Time to wait before the first emote is played.

em2_0

Emote to play when text is displayed.

em2_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em2_1

Second emote to play when text is displayed.

em2_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em2_2

Third emote to play when text is displayed.

text3_0

This is the locale text that is displayed if the creature is male.

3.1. Database Guide 237

mangos-zero, Release 0.2.0

text3_1

This is the locale text that is displayed if the creature is female.

lang3

The language of the text in game.

prob3

This is the probability that the creature will say this text.

em3_0_delay

Time to wait before the first emote is played.

em3_0

Emote to play when text is displayed.

em3_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em3_1

Second emote to play when text is displayed.

em3_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em3_2

Third emote to play when text is displayed.

text4_0

This is the locale text that is displayed if the creature is male.

text4_1

This is the locale text that is displayed if the creature is female.

238 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

lang4

The language of the text in game.

prob4

This is the probability that the creature will say this text.

em4_0_delay

Time to wait before the first emote is played.

em4_0

Emote to play when text is displayed.

em4_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em4_1

Second emote to play when text is displayed.

em4_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em4_2

Third emote to play when text is displayed.

text5_0

This is the locale text that is displayed if the creature is male.

text5_1

This is the locale text that is displayed if the creature is female.

lang5

The language of the text in game.

3.1. Database Guide 239

mangos-zero, Release 0.2.0

prob5

This is the probability that the creature will say this text.

em5_0_delay

Time to wait before the first emote is played.

em5_0

Emote to play when text is displayed.

em5_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em5_1

Second emote to play when text is displayed.

em5_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em5_2

Third emote to play when text is displayed.

text6_0

This is the locale text that is displayed if the creature is male.

text6_1

This is the locale text that is displayed if the creature is female.

lang6

The language of the text in game.

prob6

This is the probability that the creature will say this text.

240 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

em6_0_delay

Time to wait before the first emote is played.

em6_0

Emote to play when text is displayed.

em6_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em6_1

Second emote to play when text is displayed.

em6_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em6_2

Third emote to play when text is displayed.

text7_0

This is the locale text that is displayed if the creature is male.

text7_1

This is the locale text that is displayed if the creature is female.

lang7

The language of the text in game.

prob7

This is the probability that the creature will say this text.

em7_0_delay

Time to wait before the first emote is played.

3.1. Database Guide 241

mangos-zero, Release 0.2.0

em7_0

Emote to play when text is displayed.

em7_1_delay

Time to wait after the first emote are played, before the second emote gets played.

em7_1

Second emote to play when text is displayed.

em7_2_delay

Time to wait after the second emote are played, before the third emote gets played.

em7_2

Third emote to play when text is displayed.

“npc_trainer” table

The npc_trainer table holds spell lists used for a singular trainer to provide.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0spell mediumint(8) unsigned NO PRI 0spellcost int(10) unsigned NO 0reqskill smallint(5) unsigned NO 0reqskillvalue smallint(5) unsigned NO 0reqlevel tinyint(3) unsigned NO 0

Fields

entry

The trainer which should train this spell. This references the “creature_template” table tables unique ID for which theentry is valid.

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This has to be a spell whichteaches the actual spell.

242 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

spellcost

The cost that the player needs to pay in order to learn the spell in copper.

reqskill

The required skill to be able to learn the spell. This references the skill’s entry in the SkillLine.dbc table.

reqskillvalue

The minimum skill level required for the skill referenced in reqskill.

reqlevel

The character level required in order to learn the spell.

“npc_trainer_template” table

The npc_trainer_template table holds holds spell lists usable for multiple training creatures.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0spell mediumint(8) unsigned NO PRI 0spellcost int(10) unsigned NO 0reqskill smallint(5) unsigned NO 0reqskillvalue smallint(5) unsigned NO 0reqlevel tinyint(3) unsigned NO 0

Fields

entry

The unique identifier for the training template. A “creature_template” table references this from its trainer_idcolumn.

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This has to be a spell whichteaches the actual spell.

spellcost

The cost that the player needs to pay in order to learn the spell in copper.

3.1. Database Guide 243

mangos-zero, Release 0.2.0

reqskill

The required skill to be able to learn the spell. This references the skill’s entry in the SkillLine.dbc table.

reqskillvalue

The minimum skill level required for the skill referenced in reqskill.

reqlevel

The character level required in order to learn the spell.

“npc_vendor” table

The npc_vendor table holds item lists used for a singular vendor to provide.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0maxcount tinyint(3) unsigned NO 0incrtime int(10) unsigned NO 0condition_id mediumint(8) unsigned NO 0

Fields

entry

The vendor which should sell this item. This references the “creature_template” table tables unique ID for which theentry is valid.

item

The item a vendor should sell. This references the “item_template” table tables unique ID.

maxcount

The maximum amount of the item a vendor should carry. Set to 0 to provide unlimited supplies.

incrtime

This field decides how frequently a vendor will restock and item having a maximum count. The value is given inseconds, and for limited items, the BuyCount column of the “item_template” table is taken into account whenrestocking.

244 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“npc_vendor_template” table

The npc_vendor_template table holds item lists usable for multiple vending creatures.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0maxcount tinyint(3) unsigned NO 0incrtime int(10) unsigned NO 0condition_id mediumint(8) unsigned NO 0

Fields

entry

The unique identifier for the vending template. A “creature_template” table references this from its vendor_idcolumn.

item

The item a vendor should sell. This references the “item_template” table tables unique ID.

maxcount

The maximum amount of the item a vendor should carry. Set to 0 to provide unlimited supplies.

incrtime

This field decides how frequently a vendor will restock and item having a maximum count. The value is given inseconds, and for limited items, the BuyCount column of the “item_template” table is taken into account whenrestocking.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

3.1. Database Guide 245

mangos-zero, Release 0.2.0

“page_text” table

The page_text table holds texts for any readable item. This includes letters as well as books, and other readableitems such as game objects.

Each text entry is a singular page. For books, pages are connected.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0text longtext NO NULLnext_page mediumint(8) unsigned NO 0

Fields

entry

The unique identifier for the text.

text

The page’s text message. This is shown in-game.

next_page

If the page is followed by another page, this references the unique ID of the “page_text” table table.

“petcreateinfo_spell” table

The petcreateinfo_spell table holds spells which are assigned to tameable creatures.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0Spell1 mediumint(8) unsigned NO 0Spell2 mediumint(8) unsigned NO 0Spell3 mediumint(8) unsigned NO 0Spell4 mediumint(8) unsigned NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

246 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Spell1

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

Spell2

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

Spell3

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

Spell4

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

“pet_levelstats” table

The pet_levelstats table holds information on individual pet base stats based on level.

Table structure

Field Type Null Key Default Extracreature_entry mediumint(8) unsigned NO PRI NULLlevel tinyint(3) unsigned NO PRI NULLhp smallint(5) unsigned NO NULLmana smallint(5) unsigned NO NULLarmor int(10) unsigned NO 0str smallint(5) unsigned NO NULLagi smallint(5) unsigned NO NULLsta smallint(5) unsigned NO NULLinte smallint(5) unsigned NO NULLspi smallint(5) unsigned NO NULL

Fields

creature_entry

This references the “creature_template” table tables unique ID of the pet’s creature_template for which the entry isvalid.

level

The pet level.

3.1. Database Guide 247

mangos-zero, Release 0.2.0

hp

The base health of the pet at currently selected level.

mana

The base mana of the pet at currently selected level.

armor

The base armor of the pet at currently selected level.

str

The base strength of the pet at currently selected level.

agi

The base agility of the pet at currently selected level.

sta

The base stamina of the pet at currently selected level.

inte

The base intellect of the pet at currently selected level.

spi

The base spirit of the pet at currently selected level.

“pet_name_generation” table

The pet_name_generation table holds available pieces for server generated pet names, including first and lasthalf of the name.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI NULL auto_incrementword tinytext NO NULLentry mediumint(8) unsigned NO 0half tinyint(4) NO 0

248 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

id

The unique identifier for the entry.

word

The actual name part for the entry.

entry

The creature for which this name fragment should apply. This references the “creature_template” table tables uniqueID.

half

A flag signalling if the name fragment is intended for the first of the last half of the name.

Value Description0 First half1 Last half

“pickpocketing_loot_template” table

The pickpocketing_loot_template table holds definitions on items dropped by pickpocketing creatures.

Note: Pickpocketing loot is handed out to rogues only. Bad luck, hunters!

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

3.1. Database Guide 249

mangos-zero, Release 0.2.0

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

250 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“player_classlevelstats” table

The player_classlevelstats table holds information on the base health and mana of characters when theylevel up. Each class has different level stats. All of the values in this table signify only the base health and mana of theclass at a specific level.

Table structure

Field Type Null Key Default Extraclass tinyint(3) unsigned NO PRI NULLlevel tinyint(3) unsigned NO PRI NULLbasehp smallint(5) unsigned NO NULLbasemana smallint(5) unsigned NO NULL

Fields

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

level

The level at which the stats should be applied.

basehp

The base health of the character (before stamina bonuses).

basemana

The base mana of the character (before intellect bonuses).

“playercreateinfo_action” table

The playercreateinfo_action table holds information on what default actions a new character should startout with. Each race-class combination can have a different default starting setup.

Table structure

Field Type Null Key Default Extrarace tinyint(3) unsigned NO PRI 0class tinyint(3) unsigned NO PRI 0button smallint(5) unsigned NO PRI 0action int(11) unsigned NO 0type smallint(5) unsigned NO 0

3.1. Database Guide 251

mangos-zero, Release 0.2.0

Fields

race

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

button

The ID of the button on the action bar where the action icon will be placed. Special bars are used for stances, auras,pets, stealth and other similar special modes.

button ID(s) Set key1-11 1 (SHIFT + 1)12-23 2 (SHIFT + 2)24-35 3 (SHIFT + 3) h1. Right Side Bar36-47 4 (SHIFT + 4) Right Side Bar 248-59 5 (SHIFT + 5) h1. Bottom Right Bar60-71 6 (SHIFT + 6) Bottom Left Bar72-83 1 SpecialA84-95 1 SpecialB96-107 1 SpecialC108-119 1 SpecialD

action

Depending on the type value, this could reference either a spell identifier as defined in Spell.dbc, a reference to theunique identifier of an “item_template” table, or the identifier for a macro.

type

The following values are valid types:

ID Type0 Spell64 Macro128 Item

“playercreateinfo_item” table

The playercreateinfo_item table holds information on items a character should receive upon creation.

Items received can be restricted by races and classes.

252 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrarace tinyint(3) unsigned NO MUL 0class tinyint(3) unsigned NO 0itemid mediumint(8) unsigned NO 0amount tinyint(3) unsigned NO 1

Fields

race

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

itemid

The item a character should receive upon creation. This references the “item_template” table tables unique ID.

amount

The number of copies of the item to be awarded.

“playercreateinfo” table

The playercreateinfo table holds the start positions of each class/race combinations for newly created charac-ters.

Table structure

Field Type Null Key Default Extrarace tinyint(3) unsigned NO PRI 0class tinyint(3) unsigned NO PRI 0map smallint(5) unsigned NO 0zone mediumint(8) unsigned NO 0position_x float NO 0position_y float NO 0position_z float NO 0orientation float NO 0

3.1. Database Guide 253

mangos-zero, Release 0.2.0

Fields

race

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

map

A map identifier. The value has to match with a map identifier defined in Map.dbc.

zone

A zone identifier. The value has to match with a map identifier defined in AreaTable.dbc.

position_x

The X position for the characters initial position.

position_y

The Y position for the characters initial position.

position_z

The Z position for the characters initial position.

orientation

The orientation for the characters initial position.

“playercreateinfo_spell” table

The playercreateinfo_spell table holds information on what spells newly created characters should start outwith. A character in this table is defined by his/her race and class combination.

254 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrarace tinyint(3) unsigned NO PRI 0class tinyint(3) unsigned NO PRI 0Spell mediumint(8) unsigned NO PRI 0Note varchar(255) YES NULL

Fields

race

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

Spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

Note

A note explaining what the spell is. This is only for reference purposes.

“player_levelstats” table

The player_levelstats table holds information on what stats are gained by characters when they level up.Each race-class combination has different level stats. All of the values in this table signify only the base stats of therace-class combination at a specific level.

Table structure

Field Type Null Key Default Extrarace tinyint(3) unsigned NO PRI NULLclass tinyint(3) unsigned NO PRI NULLlevel tinyint(3) unsigned NO PRI NULLstr tinyint(3) unsigned NO NULLagi tinyint(3) unsigned NO NULLsta tinyint(3) unsigned NO NULLinte tinyint(3) unsigned NO NULLspi tinyint(3) unsigned NO NULL

3.1. Database Guide 255

mangos-zero, Release 0.2.0

Fields

race

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

class

A bit-mask corresponding to class that should get the spell. The value has to match with classes defined inChrClasses.dbc.

level

The level at which the stats should be applied.

str

The base strength of the character.

agi

The base agility of the character.

sta

The base stamina of the character.

inte

The base intellect of the character.

spi

The base spirit of the character.

“player_xp_for_level” table

The player_xp_for_level table holds how many experience points are required to progress from one level tothe next.

Table structure

Field Type Null Key Default Extralvl int(3) unsigned NO PRI NULLxp_for_next_level int(10) unsigned NO NULL

256 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

lvl

The player’s level.

xp_for_next_level

The experience needed to upgrade from the value in lvl field to lvl +1.

“points_of_interest” table

The points_of_interest table holds definitions for points of interests in various locations.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0x float NO 0y float NO 0icon mediumint(8) unsigned NO 0flags mediumint(8) unsigned NO 0data mediumint(8) unsigned NO 0icon_name text NO NULL

Fields

entry

The identifier for the point of interest.

x

The X coordinate for the point of interest.

y

The Y coordinate for the point of interest.

icon

The icon to be used for this point of interest. This references an icon entry from SpellIcon.dbc.

flags

TODO

3.1. Database Guide 257

mangos-zero, Release 0.2.0

data

Custom data to be sent for a point of interest. This currently is 0 for all points of interests in vanilla WoW.

icon_name

The text to display as tooltip for the icon on the in-game map.

“pool_creature” table

The pool_creature table holds creatures that are tied to a specific pool.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0pool_entry mediumint(8) unsigned NO MUL 0chance float unsigned NO 0description varchar(255) NO NULL

Fields

guid

This references the “creature” table tables unique ID for which the entry is valid.

pool_entry

The identifier of a pool template to which this creature belongs. The value has to match with a pool identifier definedin the “pool_template” table.

chance

The explicit percentage chance that this creature will be spawned.

If the pool spawns just one creature (max_limit = 1 in the respective pool_template), the core selects the creature to bespawned in a two-step process:

First, only the explicitly-chanced (chance > 0) creatures of the pool are rolled. If this roll does not produce anycreature, all the creatures without explicit chance (chance = 0) are rolled with equal chance.

If the pool spawns more than one creature, the chance is ignored and all the creatures in the pool are rolled in one stepwith equal chance.

In case the pool spawns just one creature and all the creatures have a non-zero chance, the sum of the chances for allthe creatures must equal to 100, otherwise the pool won’t be spawned.

258 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

description

This field usually names the creature corresponding to the guid and mentions which spawn point it is.

Example: RARE Snarlflare (14272) - Spawn 1

“pool_creature_template” table

The pool_creature_template table holds creature templates that are tied to a specific pool.

Table structure

Field Type Null Key Default Extraid int(10) unsigned NO PRI 0pool_entry mediumint(8) unsigned NO MUL 0chance float unsigned NO 0description varchar(255) NO NULL

Fields

id

This references the “creature_template” table tables unique ID for which the entry is valid.

pool_entry

The identifier of a pool template to which this creature template belongs. The value has to match with a pool identifierdefined in the “pool_template” table.

chance

The explicit percentage chance that this creature will be spawned.

If the pool spawns just one creature (max_limit = 1 in the respective pool_template), the core selects the creature to bespawned in a two-step process:

First, only the explicitly-chanced (chance > 0) creatures of the pool are rolled. If this roll does not produce anycreature, all the creatures without explicit chance (chance = 0) are rolled with equal chance.

If the pool spawns more than one creature, the chance is ignored and all the creatures in the pool are rolled in one stepwith equal chance.

In case the pool spawns just one creature and all the creatures have a non-zero chance, the sum of the chances for allthe creatures must equal to 100, otherwise the pool won’t be spawned.

description

This field usually names the creature corresponding to the guid and mentions which spawn point it is.

Example: RARE Thuros Lightfingers - 61

3.1. Database Guide 259

mangos-zero, Release 0.2.0

“pool_gameobject” table

The pool_gameobject table holds game objects that are tied to a specific pool.

This table can only contain game objects that have a type of GAMEOBJECT_TYPE_CHEST, GAMEOB-JECT_TYPE_GOOBER, GAMEOBJECT_TYPE_FISHINGHOLE.

Table structure

Field Type Null Key Default Extraguid int(10) unsigned NO PRI 0pool_entry mediumint(8) unsigned NO MUL 0chance float unsigned NO 0description varchar(255) NO NULL

Fields

guid

This references the “gameobject” table tables unique ID for which the entry is valid.

pool_entry

The identifier of a pool template to which this game object belongs. The value has to match with a pool identifierdefined in the “pool_template” table.

chance

The explicit percentage chance that this game object will be spawned.

If the pool spawns just one game object (max_limit = 1 in the respective pool_template), the core selects the gameobject to be spawned in a two-step process:

First, only the explicitly-chanced (chance > 0) game objects of the pool are rolled. If this roll does not produce anygame object, all the game objects without explicit chance (chance = 0) are rolled with equal chance.

If the pool spawns more than one game object, the chance is ignored and all the game objects in the pool are rolled inone step with equal chance.

In case the pool spawns just one game object and all the game objects have a non-zero chance, the sum of the chancesfor all the game objects must equal to 100, otherwise the pool won’t be spawned.

description

This field usually names the game object corresponding to the guid and mentions which spawn point it is.

Example: Spawn Point 1 - Copper Vein

260 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“pool_gameobject_template” table

The pool_gameobject_template table holds game object templates that are tied to a specific pool.

This table can only contain game object templates s that have a type of GAMEOBJECT_TYPE_CHEST, GAMEOB-JECT_TYPE_GOOBER, GAMEOBJECT_TYPE_FISHINGHOLE.

Table structure

Field Type Null Key Default Extraid int(10) unsigned NO PRI 0pool_entry mediumint(8) unsigned NO MUL 0chance float unsigned NO 0description varchar(255) NO NULL

Fields

id

This references the “gameobject_template” table tables unique ID for which the entry is valid.

pool_entry

The identifier of a pool template to which this game object template belongs. The value has to match with a poolidentifier defined in the “pool_template” table.

chance

The explicit percentage chance that this game object will be spawned.

If the pool spawns just one game object (max_limit = 1 in the respective pool_template), the core selects the gameobject to be spawned in a two-step process:

First, only the explicitly-chanced (chance > 0) game objects of the pool are rolled. If this roll does not produce anygame object, all the game objects without explicit chance (chance = 0) are rolled with equal chance.

If the pool spawns more than one game object, the chance is ignored and all the game objects in the pool are rolled inone step with equal chance.

In case the pool spawns just one game object and all the game objects have a non-zero chance, the sum of the chancesfor all the game objects must equal to 100, otherwise the pool won’t be spawned.

description

This field usually names the game object corresponding objects name.

Example: Bijous Belongings

“pool_pool” table

The pool_pool table holds definitions for grouping multiple pools into a larger pool.

3.1. Database Guide 261

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extrapool_id mediumint(8) unsigned NO PRI 0mother_pool mediumint(8) unsigned NO MUL 0chance float NO 0description varchar(255) NO NULL

Fields

pool_id

The identifier of a pool template which should be included in the pool group. The value has to match with a poolidentifier defined in the “pool_template” table.

mother_pool

The identifier of a pool template which acts as parent pool for multiple pool templates. The value has to match with apool identifier defined in the “pool_template” table.

chance

The explicit percentage chance that this pool will be spawned.

If the parent pool spawns just one child pool (max_limit = 1 in the respective mother pool’s pool_template), the coreselects the child pool to be spawned in a two-step process:

First, only the explicitly-chanced (chance > 0) child pools of the mother pool are rolled. If this roll does not produceany child pool, all the child pools without explicit chance (chance = 0) are rolled with equal chance.

If the parent pool spawns more than one child pool, the chance is ignored and all the child pools in the mother poolare rolled in one step with equal chance.

In case the parent pool spawns just one child pool and all the child pools have a non-zero chance, the sum of thechances for all the child pools must equal to 100, otherwise the parent pool won’t function correctly.

description

A text field to describe what this pool group is for.

“pool_template” table

The pool_template table holds definitions for pooling of game content.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0max_limit int(10) unsigned NO 0description varchar(255) NO NULL

262 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

entry

The pool ID. This is an arbitrary number that is only used to link the game objects, creatures or quests in this pool.

max_limit

The maximum amount of game objects, creatures or quests to spawn from the pool.

description

Describes the pool. By default the name and entry ID of the game object, creature or quest is used.

“quest_template” table

The quest_template table holds information on every quest that exists in the game.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0Method tinyint(3) unsigned NO 2ZoneOrSort smallint(6) NO 0MinLevel tinyint(3) unsigned NO 0QuestLevel tinyint(3) unsigned NO 0Type smallint(5) unsigned NO 0RequiredClasses smallint(5) unsigned NO 0RequiredRaces smallint(5) unsigned NO 0RequiredSkill smallint(5) unsigned NO 0RequiredSkillValue smallint(5) unsigned NO 0RepObjectiveFaction smallint(5) unsigned NO 0RepObjectiveValue mediumint(9) NO 0RequiredMinRepFaction smallint(5) unsigned NO 0RequiredMinRepValue mediumint(9) NO 0RequiredMaxRepFaction smallint(5) unsigned NO 0RequiredMaxRepValue mediumint(9) NO 0SuggestedPlayers tinyint(3) unsigned NO 0LimitTime int(10) unsigned NO 0QuestFlags smallint(5) unsigned NO 0SpecialFlags tinyint(3) unsigned NO 0PrevQuestId mediumint(9) NO 0NextQuestId mediumint(9) NO 0ExclusiveGroup mediumint(9) NO 0NextQuestInChain mediumint(8) unsigned NO 0SrcItemId mediumint(8) unsigned NO 0SrcItemCount tinyint(3) unsigned NO 0

Continued on next page

3.1. Database Guide 263

mangos-zero, Release 0.2.0

Table 3.24 – continued from previous pageField Type Null Key Default ExtraSrcSpell mediumint(8) unsigned NO 0Title text YES NULLDetails text YES NULLObjectives text YES NULLOfferRewardText text YES NULLRequestItemsText text YES NULLEndText text YES NULLObjectiveText1 text YES NULLObjectiveText2 text YES NULLObjectiveText3 text YES NULLObjectiveText4 text YES NULLReqItemId1 mediumint(8) unsigned NO 0ReqItemId2 mediumint(8) unsigned NO 0ReqItemId3 mediumint(8) unsigned NO 0ReqItemId4 mediumint(8) unsigned NO 0ReqItemCount1 smallint(5) unsigned NO 0ReqItemCount2 smallint(5) unsigned NO 0ReqItemCount3 smallint(5) unsigned NO 0ReqItemCount4 smallint(5) unsigned NO 0ReqSourceId1 mediumint(8) unsigned NO 0ReqSourceId2 mediumint(8) unsigned NO 0ReqSourceId3 mediumint(8) unsigned NO 0ReqSourceId4 mediumint(8) unsigned NO 0ReqSourceCount1 smallint(5) unsigned NO 0ReqSourceCount2 smallint(5) unsigned NO 0ReqSourceCount3 smallint(5) unsigned NO 0ReqSourceCount4 smallint(5) unsigned NO 0ReqCreatureOrGOId1 mediumint(9) NO 0ReqCreatureOrGOId2 mediumint(9) NO 0ReqCreatureOrGOId3 mediumint(9) NO 0ReqCreatureOrGOId4 mediumint(9) NO 0ReqCreatureOrGOCount1 smallint(5) unsigned NO 0ReqCreatureOrGOCount2 smallint(5) unsigned NO 0ReqCreatureOrGOCount3 smallint(5) unsigned NO 0ReqCreatureOrGOCount4 smallint(5) unsigned NO 0ReqSpellCast1 mediumint(8) unsigned NO 0ReqSpellCast2 mediumint(8) unsigned NO 0ReqSpellCast3 mediumint(8) unsigned NO 0ReqSpellCast4 mediumint(8) unsigned NO 0RewChoiceItemId1 mediumint(8) unsigned NO 0RewChoiceItemId2 mediumint(8) unsigned NO 0RewChoiceItemId3 mediumint(8) unsigned NO 0RewChoiceItemId4 mediumint(8) unsigned NO 0RewChoiceItemId5 mediumint(8) unsigned NO 0RewChoiceItemId6 mediumint(8) unsigned NO 0RewChoiceItemCount1 smallint(5) unsigned NO 0RewChoiceItemCount2 smallint(5) unsigned NO 0RewChoiceItemCount3 smallint(5) unsigned NO 0RewChoiceItemCount4 smallint(5) unsigned NO 0

Continued on next page

264 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table 3.24 – continued from previous pageField Type Null Key Default ExtraRewChoiceItemCount5 smallint(5) unsigned NO 0RewChoiceItemCount6 smallint(5) unsigned NO 0RewItemId1 mediumint(8) unsigned NO 0RewItemId2 mediumint(8) unsigned NO 0RewItemId3 mediumint(8) unsigned NO 0RewItemId4 mediumint(8) unsigned NO 0RewItemCount1 smallint(5) unsigned NO 0RewItemCount2 smallint(5) unsigned NO 0RewItemCount3 smallint(5) unsigned NO 0RewItemCount4 smallint(5) unsigned NO 0RewRepFaction1 smallint(5) unsigned NO 0RewRepFaction2 smallint(5) unsigned NO 0RewRepFaction3 smallint(5) unsigned NO 0RewRepFaction4 smallint(5) unsigned NO 0RewRepFaction5 smallint(5) unsigned NO 0RewRepValue1 mediumint(9) NO 0RewRepValue2 mediumint(9) NO 0RewRepValue3 mediumint(9) NO 0RewRepValue4 mediumint(9) NO 0RewRepValue5 mediumint(9) NO 0RewOrReqMoney int(11) NO 0RewMoneyMaxLevel int(10) unsigned NO 0RewSpell mediumint(8) unsigned NO 0RewSpellCast mediumint(8) unsigned NO 0RewMailTemplateId mediumint(8) unsigned NO 0RewMailDelaySecs int(11) unsigned NO 0PointMapId smallint(5) unsigned NO 0PointX float NO 0PointY float NO 0PointOpt mediumint(8) unsigned NO 0DetailsEmote1 smallint(5) unsigned NO 0DetailsEmote2 smallint(5) unsigned NO 0DetailsEmote3 smallint(5) unsigned NO 0DetailsEmote4 smallint(5) unsigned NO 0DetailsEmoteDelay1 int(11) unsigned NO 0DetailsEmoteDelay2 int(11) unsigned NO 0DetailsEmoteDelay3 int(11) unsigned NO 0DetailsEmoteDelay4 int(11) unsigned NO 0IncompleteEmote smallint(5) unsigned NO 0CompleteEmote smallint(5) unsigned NO 0OfferRewardEmote1 smallint(5) unsigned NO 0OfferRewardEmote2 smallint(5) unsigned NO 0OfferRewardEmote3 smallint(5) unsigned NO 0OfferRewardEmote4 smallint(5) unsigned NO 0OfferRewardEmoteDelay1 int(11) unsigned NO 0OfferRewardEmoteDelay2 int(11) unsigned NO 0OfferRewardEmoteDelay3 int(11) unsigned NO 0OfferRewardEmoteDelay4 int(11) unsigned NO 0StartScript mediumint(8) unsigned NO 0

Continued on next page

3.1. Database Guide 265

mangos-zero, Release 0.2.0

Table 3.24 – continued from previous pageField Type Null Key Default ExtraCompleteScript mediumint(8) unsigned NO 0

Fields

entry

The unique identifier of the quest template entry.

Method

This flag decides how a quest will handled by the client. The following table lists allowed values.

Value Description0 Quest will auto-complete. Objectives/details will be skipped.1 Quest is disabled.2 Quest is enabled.

ZoneOrSort

Defines the category under which a quest will be listed in the in-game quest log. Depending on the sign of the valuedifferent category sources will be used.

• If the value is > 0, the value references an entry from AreaTable.dbc.

• If the value is < 0, the value references an entry from QuestSort.dbc. This is usually the case for class or skillrelated quests.

MinLevel

The lowest level allowed to accept the quest.

QuestLevel

The quest’s level. Depending on the quest’s level, the experience rewarded for the quest will be awarded.

• If a character’s level is <= QuestLevel+5, full experience will be given.

• If QuestLevel is set to -1, the character’s level will be used as QuestLevel.

Type

Classifies a quest’s difficulty. This references an entry from QuestInfo.dbc. The following table lists allowed values.

266 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Value Description0 Normal1 Elite21 Life41 PvP62 Raid81 Dungeon82 World Event83 Legendary

RequiredClasses

A bit-mask corresponding to class that should get the quest. The value has to match with classes defined inChrClasses.dbc.

RequiredRaces

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

RequiredSkill

If the quest requires a skill, set this to a valid identifier referencing an entry from SkillLine.dbc.

RequiredSkillValue

If a RequiredSkill is set, set this to the skill points required to acquire the quest.

RepObjectiveFaction

If an objective of the quest is to reach a specific reputation with a faction, this value is set to a faction identifier,referencing an entry from the Faction.dbc table.

RepObjectiveValue

If RepObjectiveFaction is defined, this value specifies the reputation value required to achieve.

RequiredMinRepFaction

If a quest is obtainable if the character has a specific minimum reputation with a faction, this value is set to a factionidentifier, referencing an entry from the Faction.dbc table.

RequiredMinRepValue

If RequiredMinRepFaction is defined, this value specifies the reputation value required to obtain the quest.

3.1. Database Guide 267

mangos-zero, Release 0.2.0

RequiredMaxRepFaction

If a quest is obtainable if the character has a specific maximum reputation with a faction, this value is set to a factionidentifier, referencing an entry from the Faction.dbc table.

RequiredMaxRepValue

If RequiredManRepFaction is defined, this value specifies the highest reputation value allowed for obtaining thequest.

SuggestedPlayers

If a quest would require more characters to cooperate for completing the quest - when the characters are in a validlevel range - this value may be set to the amount of characters recommended to group up for completing the quest.

LimitTime

Setting this to a value in seconds will put a time limit on a quest, ticking from the moment a quest was accepted.

QuestFlags

The quest flags give additional details on the quest type. Flags set here will determine mostly grouping behaviour.Multiple flags may be combined.

The following table list known flags.

Value Name Description0 QUEST_FLAGS_NONENothing special going on.1 QUEST_FLAGS_STAY_ALIVEIf the character dies, the quest will fail2 QUEST_FLAGS_PARTY_ACCEPTIf the character is grouped, all players that can accept this quest will receive

confirmation box to accept quest4 QUEST_FLAGS_EXPLORATIONQuest requires the character to explore a zone8 QUEST_FLAGS_SHARABLEQuest may be shared with other characters16 QUEST_FLAGS_UNUSED1Not used by any quest.32 QUEST_FLAGS_EPICEpic class quests?64 QUEST_FLAGS_RAIDRaid quests.128 QUEST_FLAGS_UNUSED2Not used by any quest.256 QUEST_FLAGS_UNK2Not used currently: DELIVERMORE Quest needs more than normal q-item drops

from mobs512 QUEST_FLAGS_HIDDEN_REWARDSItems and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD

(not in SMSG_QUESTGIVER_QUEST_DETAILS or in client questlog(SMSG_QUEST_QUERY_RESPONSE))

1024 QUEST_FLAGS_AUTO_REWARDEDThese quests are automatically rewarded on quest complete and they will neverappear in quest log client side.

Note: Not all quest flags are currently supported by the core.

268 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

SpecialFlags

If quests need any special behaviour, these flags can be used to allow for it. Multiple special flags may be combined.

Currently the following special cases are available.

Value Description0 Nothing special going on.1 The quest is repeatable.2 Quest requires exploration or an event, handled by the script library.

PrevQuestId

This points to a “quest_template” table being a previous requirement. Depending on the signedness of the value,different requirements are set.

• If the value is > 0, the given quest needs to be completed prior to getting this quest.

• If the value is < 0, the given quest has to be active in the quest log to get this quest.

NextQuestId

This points to a “quest_template” table being a follow-up. Depending on the signedness of the value, different require-ments are set.

• If the value is > 0, this contains the quest identifier of the next quest, if setting the previous quest identifier on itis not sufficient.

• If the value is < 0, this contains a quest identifier for quests where multiple follow-ups are possible. Previousquest identifier can be set to this quest identifier, too.

ExclusiveGroup

Allows to group multiple quests into a group, where only one quest can be completed from, or all quests need to becompleted.

• If the value is > 0, all quests having this value set, will be put into a group of which only one quest may becompleted to get this quest.

• If the value is < 0, all quests having this value set, will be put into a group of which all quests have to becompleted to get this quest.

NextQuestInChain

If ending a quest should immediately start a new quest set this to a quest identifier referencing the “quest_template”table table.

SrcItemId

If starting a quest should give items to the character, set this field to an item identifier referencing the “item_template”table table.

3.1. Database Guide 269

mangos-zero, Release 0.2.0

SrcItemCount

If SrcItemId is set, this can be set to the amount of item copies to give to the character.

SrcSpell

If a spell should be casted on a character upon starting the quest, set this to a spell identifier referencing the Spell.dbctable.

Title

The title of the quest.

Details

The quest text, supporting a few variables to insert character related data into the quest’s text.

Value Description$B Line break$N Character name$R Character race$C Character class$Gm:f

Inserts string based on character gender. Example: Such a generous $G man:woman. The ordermale:female needs to be kept.

Objectives

The quest’s objective in text form. If the quest should auto-complete, leave this empty.

OfferRewardText

The text sent to a character when talking to the quest giver, and having completed the quest. Variables are supported.

Value Description$B Line break$N Character name$R Character race$C Character class$Gm:f

Inserts string based on character gender. Example: Such a generous $G man:woman. The ordermale:female needs to be kept.

RequestItemsText

The text sent to a character when talking to a quest giver, and not missing to fulfill the quest’s requirements. Variablesare supported.

270 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Value Description$B Line break$N Character name$R Character race$C Character class$Gm:f

Inserts string based on character gender. Example: Such a generous $G man:woman. The ordermale:female needs to be kept.

EndText

If the quest’s SpecialFlag requires and action validated by the script library this text will be sent to the character.

ObjectiveText1

Set to a text string, to show up as requirement in the quest log entry.

ObjectiveText2

Set to a text string, to show up as requirement in the quest log entry.

ObjectiveText3

Set to a text string, to show up as requirement in the quest log entry.

ObjectiveText4

Set to a text string, to show up as requirement in the quest log entry.

ReqItemId1

If set to an item identifier, this references an entry in the “item_template” table table which is required to complete thequest.

ReqItemId2

If set to an item identifier, this references an entry in the “item_template” table table which is required to complete thequest.

ReqItemId3

If set to an item identifier, this references an entry in the “item_template” table table which is required to complete thequest.

3.1. Database Guide 271

mangos-zero, Release 0.2.0

ReqItemId4

If set to an item identifier, this references an entry in the “item_template” table table which is required to complete thequest.

ReqItemCount1

If ReqItemId1 is set, this defines the amount of items needed to complete the quest.

ReqItemCount2

If ReqItemId2 is set, this defines the amount of items needed to complete the quest.

ReqItemCount3

If ReqItemId3 is set, this defines the amount of items needed to complete the quest.

ReqItemCount4

If ReqItemId4 is set, this defines the amount of items needed to complete the quest.

ReqSourceId1

If the quest requires items created by using another item, set this to an item identifier, referencing the creating itemsentry in the “item_template” table table.

Note: This is required to decide if these items should be included in loot or not.

ReqSourceId2

If the quest requires items created by using another item, set this to an item identifier, referencing the creating itemsentry in the “item_template” table table.

Note: This is required to decide if these items should be included in loot or not.

ReqSourceId3

If the quest requires items created by using another item, set this to an item identifier, referencing the creating itemsentry in the “item_template” table table.

Note: This is required to decide if these items should be included in loot or not.

272 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ReqSourceId4

If the quest requires items created by using another item, set this to an item identifier, referencing the creating itemsentry in the “item_template” table table.

Note: This is required to decide if these items should be included in loot or not.

ReqSourceCount1

If ReqSourceId1 is set, set this to the amount of required items.

ReqSourceCount2

If ReqSourceId2 is set, set this to the amount of required items.

ReqSourceCount3

If ReqSourceId3 is set, set this to the amount of required items.

ReqSourceCount4

If ReqSourceId4 is set, set this to the amount of required items.

ReqCreatureOrGOId1

If the quest targets creatures or game objects, this references their unique identifier.

• If the value is > 0, this references an entry in the “creature_template” table table.

• If the value is < 0, this references an entry in the “gameobject_template” table table.

ReqCreatureOrGOId2

If the quest targets creatures or game objects, this references their unique identifier.

• If the value is > 0, this references an entry in the “creature_template” table table.

• If the value is < 0, this references an entry in the “gameobject_template” table table.

ReqCreatureOrGOId3

If the quest targets creatures or game objects, this references their unique identifier.

• If the value is > 0, this references an entry in the “creature_template” table table.

• If the value is < 0, this references an entry in the “gameobject_template” table table.

3.1. Database Guide 273

mangos-zero, Release 0.2.0

ReqCreatureOrGOId4

If the quest targets creatures or game objects, this references their unique identifier.

• If the value is > 0, this references an entry in the “creature_template” table table.

• If the value is < 0, this references an entry in the “gameobject_template” table table.

ReqCreatureOrGOCount1

The amount of creatures or game objects required for the quest.

ReqCreatureOrGOCount2

The amount of creatures or game objects required for the quest.

ReqCreatureOrGOCount3

The amount of creatures or game objects required for the quest.

ReqCreatureOrGOCount4

The amount of creatures or game objects required for the quest.

ReqSpellCast1

Set to an entry referencing an entry from Spell.dbc table to require a spell to be cast. Spells usually need a targetidentifier set in the ReqCreatureOrGOId1.

If a spell has an effect to send and event or signal quest completion, targets do not have to be set.

ReqSpellCast2

Set to an entry referencing an entry from Spell.dbc table to require a spell to be cast. Spells usually need a targetidentifier set in the ReqCreatureOrGOId2.

If a spell has an effect to send and event or signal quest completion, targets do not have to be set.

ReqSpellCast3

Set to an entry referencing an entry from Spell.dbc table to require a spell to be cast. Spells usually need a targetidentifier set in the ReqCreatureOrGOId3.

If a spell has an effect to send and event or signal quest completion, targets do not have to be set.

274 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

ReqSpellCast4

Set to an entry referencing an entry from Spell.dbc table to require a spell to be cast. Spells usually need a targetidentifier set in the ReqCreatureOrGOId4.

If a spell has an effect to send and event or signal quest completion, targets do not have to be set.

RewChoiceItemId1

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemId2

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemId3

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemId4

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemId5

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemId6

If the quest allow to chose between multiple items as reward, this contains an item identifier, referencing the creatingitems entry in the “item_template” table table.

RewChoiceItemCount1

If RewChoiceItemId1 contains an item identifier, this defines the number of charges available for the rewardeditem.

RewChoiceItemCount2

If RewChoiceItemId2 contains an item identifier, this defines the number of charges available for the rewardeditem.

3.1. Database Guide 275

mangos-zero, Release 0.2.0

RewChoiceItemCount3

If RewChoiceItemId3 contains an item identifier, this defines the number of charges available for the rewardeditem.

RewChoiceItemCount4

If RewChoiceItemId4 contains an item identifier, this defines the number of charges available for the rewardeditem.

RewChoiceItemCount5

If RewChoiceItemId5 contains an item identifier, this defines the number of charges available for the rewardeditem.

RewChoiceItemCount6

If RewChoiceItemId6 contains an item identifier, this defines the number of charges available for the rewardeditem.

RewItemId1

If the quest rewards items without any choice, this contains an item identifier, referencing the creating items entry inthe “item_template” table table.

RewItemId2

If the quest rewards items without any choice, this contains an item identifier, referencing the creating items entry inthe “item_template” table table.

RewItemId3

If the quest rewards items without any choice, this contains an item identifier, referencing the creating items entry inthe “item_template” table table.

RewItemId4

If the quest rewards items without any choice, this contains an item identifier, referencing the creating items entry inthe “item_template” table table.

RewItemCount1

If RewItemId1 contains an item identifier, this defines the amount if items to be rewarded.

276 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

RewItemCount2

If RewItemId2 contains an item identifier, this defines the amount if items to be rewarded.

RewItemCount3

If RewItemId3 contains an item identifier, this defines the amount if items to be rewarded.

RewItemCount4

If RewItemId4 contains an item identifier, this defines the amount if items to be rewarded.

RewRepFaction1

If the quest should reward reputation towards a faction, this references a faction identifier from the Faction.dbc table.

Note: This is intended to reward extra reputation. Normal reputation is awarded automatically by the server.

RewRepFaction2

If the quest should reward reputation towards a faction, this references a faction identifier from the Faction.dbc table.

Note: This is intended to reward extra reputation. Normal reputation is awarded automatically by the server.

RewRepFaction3

If the quest should reward reputation towards a faction, this references a faction identifier from the Faction.dbc table.

Note: This is intended to reward extra reputation. Normal reputation is awarded automatically by the server.

RewRepFaction4

If the quest should reward reputation towards a faction, this references a faction identifier from the Faction.dbc table.

Note: This is intended to reward extra reputation. Normal reputation is awarded automatically by the server.

RewRepFaction5

If the quest should reward reputation towards a faction, this references a faction identifier from the Faction.dbc table.

3.1. Database Guide 277

mangos-zero, Release 0.2.0

Note: This is intended to reward extra reputation. Normal reputation is awarded automatically by the server.

RewRepValue1

If RewRepFaction1 references a faction, this defines the amount of reputation gain or loss for the referencedfaction.

RewRepValue2

If RewRepFaction2 references a faction, this defines the amount of reputation gain or loss for the referencedfaction.

RewRepValue3

If RewRepFaction3 references a faction, this defines the amount of reputation gain or loss for the referencedfaction.

RewRepValue4

If RewRepFaction4 references a faction, this defines the amount of reputation gain or loss for the referencedfaction.

RewRepValue5

If RewRepFaction5 references a faction, this defines the amount of reputation gain or loss for the referencedfaction.

RewOrReqMoney

This field can be used to either require money for starting the quest, or award money for completing the quest.

• If set to a value > 0, the quest will reward money upon completion

• If set to a value < 0, the quest will require money to accept it.s

RewMoneyMaxLevel

The value of this field decides how much experience or money (at level 60) a quest will reward.

Experience is calculated as follows: RewMoneyMaxLevel / 0.6

278 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

RewSpell

If a spell should be shown as being casted as quest reward, set this to a spell identifier referencing the Spell.dbc table.

Note: If RewSpellCast is set, this spell will only be shown, but not casted.

RewSpellCast

If a spell should be casted as quest reward different from the spell shown as quest reward, set this to a spell identifierreferencing the Spell.dbc table.

RewMailTemplateId

If upon completion a quest should send out mail, this can be set to reference a mail template identifier in the MailTem-plate.dbc table.

RewMailDelaySecs

The number of seconds to wait before sending the reward mail.

PointMapId

References an entry in the “points_of_interest” table table, if it should be shown while the quest is active.

PointX

If a point of interest should be shown while the quest is active, this will contain the X coordinate.

PointY

If a point of interest should be shown while the quest is active, this will contain the Y coordinate.

PointOpt

TODO

DetailsEmote1

If an emote should be shown upon displaying quest details, this references the emotes identifier in the Emotes.dbctable.

3.1. Database Guide 279

mangos-zero, Release 0.2.0

DetailsEmote2

If an emote should be shown upon displaying quest details, this references the emotes identifier in the Emotes.dbctable.

DetailsEmote3

If an emote should be shown upon displaying quest details, this references the emotes identifier in the Emotes.dbctable.

DetailsEmote4

If an emote should be shown upon displaying quest details, this references the emotes identifier in the Emotes.dbctable.

DetailsEmoteDelay1

The number of seconds to delay the emote, if one is reference in the DetailsEmote1 column.

DetailsEmoteDelay2

The number of seconds to delay the emote, if one is reference in the DetailsEmote2 column.

DetailsEmoteDelay3

The number of seconds to delay the emote, if one is reference in the DetailsEmote3 column.

DetailsEmoteDelay4

The number of seconds to delay the emote, if one is reference in the DetailsEmote4 column.

IncompleteEmote

If an emote should be shown upon displaying the incomplete quest text, this references the emotes identifier in theEmotes.dbc table.

CompleteEmote

If an emote should be shown upon displaying the quest completion text, this references the emotes identifier in theEmotes.dbc table.

OfferRewardEmote1

If an emote should be shown upon displaying rewarding the quest, this references the emotes identifier in theEmotes.dbc table.

280 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

OfferRewardEmote2

If an emote should be shown upon displaying rewarding the quest, this references the emotes identifier in theEmotes.dbc table.

OfferRewardEmote3

If an emote should be shown upon displaying rewarding the quest, this references the emotes identifier in theEmotes.dbc table.

OfferRewardEmote4

If an emote should be shown upon displaying rewarding the quest, this references the emotes identifier in theEmotes.dbc table.

OfferRewardEmoteDelay1

The number of seconds the delay the emote, if one is referenced in the OfferRewardEmote1 column.

OfferRewardEmoteDelay2

The number of seconds the delay the emote, if one is referenced in the OfferRewardEmote2 column.

OfferRewardEmoteDelay3

The number of seconds the delay the emote, if one is referenced in the OfferRewardEmote3 column.

OfferRewardEmoteDelay4

The number of seconds the delay the emote, if one is referenced in the OfferRewardEmote4 column.

StartScript

If a script should be executed on quest start, this references an entry in the “dbscripts_on_quest_start” table table.

CompleteScript

If a script should be executed on quest end, this references an entry in the “dbscripts_on_quest_end” table table.

“reference_loot_template” table

The reference_loot_template table holds definitions for item loot, which can be reference by other loottemplates.

Reference loot is very helpful e.g. when adding tier items to loot.

3.1. Database Guide 281

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

Fields

entry

The unique identifer for the reference loot template. This is referenced by any of the specific loot templates.

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

282 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“reputation_reward_rate” table

The reputation_reward_rate table holds multipliers for reputation awarded to specific factions.

Table structure

Field Type Null Key Default Extrafaction mediumint(8) unsigned NO PRI 0quest_rate float NO 1creature_rate float NO 1spell_rate float NO 1

Fields

faction

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.

quest_rate

The rate for reputation gain from quests.

creature_rate

The rate for reputation gain from creatures.

spell_rate

The rate for reputation gain from spells.

3.1. Database Guide 283

mangos-zero, Release 0.2.0

“reputation_spillover_template” table

The reputation_spillover_template table holds information for alternative factions which can be awardedreputation, if the faction originally rewarded for is already and the highest reachable level.

Table structure

Field Type Null Key Default Extrafaction smallint(6) unsigned NO PRI 0faction1 smallint(6) unsigned NO 0rate_1 float NO 0rank_1 tinyint(3) unsigned NO 0faction2 smallint(6) unsigned NO 0rate_2 float NO 0rank_2 tinyint(3) unsigned NO 0faction3 smallint(6) unsigned NO 0rate_3 float NO 0rank_3 tinyint(3) unsigned NO 0faction4 smallint(6) unsigned NO 0rate_4 float NO 0rank_4 tinyint(3) unsigned NO 0

Fields

faction

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is the faction for which reputation could not be rewarded any more.

faction1

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is an alternative to the faction defined.

rate_1

The rate at which reputation is awarded.

rank_1

The maximum rank up to which reputation will be awarded.

faction2

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is an alternative to the faction defined.

284 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

rate_2

The rate at which reputation is awarded.

rank_2

The maximum rank up to which reputation will be awarded.

faction3

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is an alternative to the faction defined.

rate_3

The rate at which reputation is awarded.

rank_3

The maximum rank up to which reputation will be awarded.

faction4

A faction for which reputation is awarded. The value has to match with a faction identifier defined in Faction.dbc.This is an alternative to the faction defined.

rate_4

The rate at which reputation is awarded.

rank_4

The maximum rank up to which reputation will be awarded.

“reserved_name” table

The reserved_name table holds possible character names which may not be used by characters with no specialrights.

Note: Any character with any access level bigger than default player level may create a character using a reservedname.

3.1. Database Guide 285

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraname varchar(12) NO PRI

Fields

name

The name to disallow for characters created on normal player accounts.

“scripted_areatrigger” table

The scripted_areatrigger table holds informations for area trigger which trigger a scripted event.

Table structure

Field Type Null Key Default Extraentry mediumint(8) NO PRI NULLScriptName char(64) NO NULL

Fields

entry

An areatrigger identifier. The value has to match with a areatrigger identifier defined in AreaTrigger.dbc.

ScriptName

To assign a script from the script library to the area trigger, set this string to the script’s exported name.

“scripted_event” table

The scripted_event table holds informations for spells which trigger a scripted event.

This only applies to spells which have a SPELL_EFFECT_SEND_EVENT effect.

Table structure

Field Type Null Key Default Extraid mediumint(8) NO PRI NULLScriptName char(64) NO NULL

286 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

id

The spell effect identifier given as parameter for the SPELL_EFFECT_SEND_EVENT effect.

ScriptName

To assign a script from the script library to the scripted event, set this string to the script’s exported name.

“skill_fishing_base_level” table

The skill_fishing_base_level table holds information on the required fishing skill for an area.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0skill smallint(6) NO 0

Fields

entry

A zone identifier. The value has to match with a zone identifier defined in AreaTable.dbc.

skill

The minimum amount of skill points to fish in the referenced zone.

“skinning_loot_template” table

The skinning_loot_template table holds definitions on items dropped by creatures templates when skinningthem.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0item mediumint(8) unsigned NO PRI 0ChanceOrQuestChance float NO 100groupid tinyint(3) unsigned NO 0mincountOrRef mediumint(9) NO 1maxcount tinyint(3) unsigned NO 1condition_id mediumint(8) unsigned NO 0

3.1. Database Guide 287

mangos-zero, Release 0.2.0

Fields

entry

This references the “creature_template” table tables unique ID for which the entry is valid.

item

This references the “item_template” table tables unique ID for which the entry is valid.

ChanceOrQuestChance

This field determines if an item should drop by chance, or by the character looting having a quest. The meaning isdetermined by the fields signedness and the value of the mincountOrRef field’s value.

The following table shows possible combinations and their meanings.

ChanceOrQuestChance mincountOrRef Description> 0 > 0 A simple percentage based drop chance.< 0 > 0 A quest based drop chance.> 0 < 0 A drop chance which has a chance to be used.

Note: Setting ChanceOrQuestChance to 0 is only allowed for entries which are part of a loot group (aka. havea groupid set). Also note that non-zero values are subject to multiplication based on the drop rate configured in theworld server configuration if they are not part of a loot group.

groupid

A group is a set of loot definitions processed in such a way that at any given looting event the loot generated canreceive one (or none) item from the items declared in the loot definitions of the group.

Groups are formed by loot definitions having the same values of entry and groupid fields and havingmincountOrRef set to a value greater than 0.

mincountOrRef

Depending on the value of the field it may either define the minimum number of copies for the item to be dropped, orit may reference another loot template.

• positive values indicate that a minimum amount should be dropped,

• negative values indicate a reference to another loot template.

maxcount

This field may either designated the maximum number of items to drop from a loot template, or how many times areferenced loot template should be processed.

• when mincountOrRef is positive, this indicates the maximum number of items to drop from the loot template,

288 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

• when mincountOrRef is negative, this indicates how many times the loot template referenced inmincountOrRef should be processed.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

“spell_affect” table

The spell_affect table holds information on what spells are affected by spell modifiers.

All spells in this table need to apply an aura that either adds a flat modifier to other spells, or adds a percent modifierto other spells. Each entry applies to one spell effect, thus spells with multiple effects will require multiple entries.

Table structure

Field Type Null Key Default Extraentry smallint(5) unsigned NO PRI 0effectId tinyint(3) unsigned NO PRI 0SpellFamilyMask bigint(20) unsigned NO 0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

effectId

This holds an index to the referenced spells effect. Three spell effects may be contained in a single spell, thus validindexes are 0, 1 and 2.

SpellFamilyMask

A spell class identifier. The value has to match with a spell class identifier from Spell.dbc, and references thespellClassSet field in that file.

“spell_area” table

The spell_area table holds information on spells applied to creatures and characters in specific areas under givenconditions.

3.1. Database Guide 289

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraspell mediumint(8) unsigned NO PRI 0area mediumint(8) unsigned NO PRI 0quest_start mediumint(8) unsigned NO PRI 0quest_start_active tinyint(1) unsigned NO PRI 0quest_end mediumint(8) unsigned NO 0condition_id mediumint(8) unsigned NO 0aura_spell mediumint(8) NO PRI 0racemask mediumint(8) unsigned NO PRI 0gender tinyint(1) unsigned NO PRI 2autocast tinyint(1) unsigned NO 0

Fields

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

area

An areatrigger identifier. The value has to match with a areatrigger identifier defined in AreaTrigger.dbc.

quest_start

This references the “quest_template” table tables unique ID for which the entry is valid. The quest entry listed here hasto be available to a character or needs to be active for a character. Depends on the value of quest_start_active.

quest_start_active

If set to 0, the quest listed in quest_start has to be available to a character but not active on the character. If setto 1, the quest listed in quest_start can be available or active on the character.

quest_end

This references the “quest_template” table tables unique ID for which the entry is valid. The quest listed here mustnot be completed to apply the spell.

condition_id

This references the “conditions” table tables unique ID for which the entry is valid.

290 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

aura_spell

The aura spell identifier. The value has to match with a spell identifier defined in Spell.dbc. If set to a with a positivevalue, characters must have this aura to activate the spell, if set to the spell identifier with a negative sign, charactersmust not have the aura.

racemask

A bit-mask corresponding to races that should get the spell. The value has to match with races defined in ChrRaces.dbc.

gender

The gender of characters to which the spell is applied. The following table list available values.

Gender of the creature

Value Gender0 Male1 Female2 Both

autocast

Set to 1 to autocast the spell.

“spell_bonus_data” table

The spell_bonus_data table holds information on bonus modifiers for spells.

A bonus can modify damage done, healing done, and also attack power.

Table structure

Field Type Null Key Default Extraentry smallint(5) unsigned NO PRI NULLdirect_bonus float NO 0dot_bonus float NO 0ap_bonus float NO 0ap_dot_bonus float NO 0comments varchar(255) YES NULL

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

3.1. Database Guide 291

mangos-zero, Release 0.2.0

direct_bonus

The bonus applied to the spell power damage.

• if < 0: calculate default spell power coefficient.

• if = 0: do not apply any spell power coefficient (do not scale damage with spell power).

• if > 0: use this as new spell power coefficient.

dot_bonus

The bonus applied to the damage over time.

• if < 0: calculate default spell power coefficient.

• if = 0: do not apply any spell power coefficient (do not scale damage with spell power).

• if > 0: use this as new spell power coefficient.

ap_bonus

The bonus applied to melee or ranged damage.

• if < 0: calculate default attack power coefficient.

• if = 0: do not apply any attack power coefficient (do not scale damage with attack power).

• if > 0: use this as new attack power coefficient.

ap_dot_bonus

The bonus applied to melee or ranged damaged over time.

• if < 0: calculate default attack power coefficient.

• if = 0: do not apply any attack power coefficient (do not scale damage with attack power).

• if > 0: use this as new attack power coefficient.

comments

A comment describing why the bonus is granted. Entries without comment should be considered invalid, and imme-diately be verified and commented.

“spell_chain” table

The spell_chain table holds information on the chain of spells with ranks.

292 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraspell_id mediumint(9) NO PRI 0prev_spell mediumint(9) NO 0first_spell mediumint(9) NO 0rank tinyint(4) NO 0req_spell mediumint(9) NO 0

Fields

spell_id

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

prev_spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This is the previous rank in thespell chain.

first_spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This is the rank 1 spell in thespell chain

rank

The rank of the spell referenced in spell_id.

req_spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This references a spell requiredto use the spell referenced in spell_id.

“spell_elixir” table

The spell_elixir table holds classifications for potion spells to prevent simultaneous use of potion in identicalclasses.

Note: Technically the use of classifications does not make any sense for vanilla WoW, since these were introduced inWoW version 2.1. In vanilla WoW, potions would only be marked as flasks, which disallowed dispelling these in PvPsituations.

In rare occasions spells for food can grant the buffs after eating for a specified time period. These spells are markedhere, too.

3.1. Database Guide 293

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry int(11) unsigned NO PRI 0mask tinyint(1) unsigned NO 0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This is the spell cast by thepotion use.

mask

Defines what type of potion/food spell this is. The following table lists the available values.

Value Type0 None3 Flask16 Food granting well fed buffs

“spell_facing” table

The spell_facing table holds information if a caster needs to face the target when casting a spell.

Table structure

Field Type Null Key Default Extraentry int(11) unsigned NO PRI 0facingcasterflag tinyint(1) NO 1

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

facingcasterflag

If the referenced spell requires to be cast when facing the target, this field has to be set to 1.

Note: Setting this to zero would disable the need to face the target.

294 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“spell_learn_spell” table

The spell_learn_spell table holds information on spells which should be learned by a character when learninga spell.

This is e.g. used when learning professions, where a character gains the profession spell and an initial set of recipespells.

Note: Do not include spells with SPELL_EFFECT_LEARN_SPELL here.

Table structure

Field Type Null Key Default Extraentry smallint(5) unsigned NO PRI 0SpellID smallint(5) unsigned NO PRI 0Active tinyint(3) unsigned NO 1

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This is the spell which willteach the spell given by SpellID.

SpellID

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc. This is the spell which acharacter will actually learn.

Active

Decides if a learned spell will appear in the character’s spell book.

Value Description0 Will not appear in the spell book.1 Will appear in the spell book.

“spell_pet_auras” table

The spell_pet_auras table holds information for connecting pet creatures to spells and auras.

Table structure

Field Type Null Key Default Extraspell mediumint(8) unsigned NO PRI NULLpet mediumint(8) unsigned NO PRI 0aura mediumint(8) unsigned NO NULL

3.1. Database Guide 295

mangos-zero, Release 0.2.0

Fields

spell

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

pet

This references the “creature_template” table tables unique ID for the pet.

aura

An aura identifier. The value has to match with a spell identifier defined in Spell.dbc.

“spell_proc_event” table

The spell_proc_event table holds informations, under which conditions spells will be triggered.

This applies to all spells that have a SPELL_AURA_PROC_TRIGGER_SPELL aura in their definition, and includese.g. spells such as shaman shields.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0SchoolMask tinyint(4) unsigned NO 0SpellFamilyName smallint(5) unsigned NO 0SpellFamilyMask0 bigint(40) unsigned NO 0SpellFamilyMask1 bigint(40) unsigned NO 0SpellFamilyMask2 bigint(40) unsigned NO 0procFlags int(10) unsigned NO 0procEx int(10) unsigned NO 0ppmRate float NO 0CustomChance float NO 0Cooldown int(10) unsigned NO 0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

SchoolMask

This field contains a bit-mask that controls on what types of spell damages the proc can be triggered. The followingtable lists spell schools and matching bit masks.

296 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

School ID Bit School name0 1 Physical1 2 Holy2 4 Fire3 8 Nature4 16 Frost5 32 Shadow6 64 Arcane

Note: Multiple school masks can be combined to have spell trigger on more than one spell school.

SpellFamilyName

A spell class identifier. The value has to match with a spell class identifier from Spell.dbc, and references thespellClassSet field in that file.

SpellFamilyMask0

A spell class mask. The value has to match with a spell class mask from Spell.dbc, and references thespellClassMask1 or spellClassMask2 field in that file.

SpellFamilyMask1

A spell class mask. The value has to match with a spell class mask from Spell.dbc, and references thespellClassMask1 or spellClassMask2 field in that file.

SpellFamilyMask2

A spell class mask. The value has to match with a spell class mask from Spell.dbc, and references thespellClassMask1 or spellClassMask2 field in that file.

procFlags

A bit-mask controlling what events trigger the spell. To combine possible events, add the proc bits together. Thefollowing table lists available events.

3.1. Database Guide 297

mangos-zero, Release 0.2.0

Event Bit-mask

Description

PROC_FLAG_NONE 0x00000000PROC_FLAG_KILLED 0x00000001Killed by aggressorPROC_FLAG_KILL 0x00000002Kill target (in most cases need XP/Honor reward, see

Unit::IsTriggeredAtSpellProcEvent for additinoal check)PROC_FLAG_SUCCESSFUL_MELEE_HIT0x00000004Successful melee auto attackPROC_FLAG_TAKEN_MELEE_HIT0x00000008Taken damage from melee auto attack hitPROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT0x00000010Successful attack by Spell that use melee weaponPROC_FLAG_TAKEN_MELEE_SPELL_HIT0x00000020Taken damage by Spell that use melee weaponPROC_FLAG_SUCCESSFUL_RANGED_HIT0x00000040Successful Ranged auto attackPROC_FLAG_TAKEN_RANGED_HIT0x00000080Taken damage from ranged auto attackPROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT0x00000100Successful Ranged attack by Spell that use ranged weaponPROC_FLAG_TAKEN_RANGED_SPELL_HIT0x00000200Taken damage by Spell that use ranged weaponPROC_FLAG_SUCCESSFUL_POSITIVE_AOE_HIT0x00000400Successful AoE (not 100% sure unused)PROC_FLAG_TAKEN_POSITIVE_AOE0x00000800Taken AoE (not 100% sure unused)PROC_FLAG_SUCCESSFUL_AOE_SPELL_HIT0x00001000Successful AoE damage spell hit (not 100% sure unused)PROC_FLAG_TAKEN_AOE_SPELL_HIT0x00002000Taken AoE damage spell hit (not 100% sure unused)PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL0x00004000Successful cast positive spell (by default only on healing)PROC_FLAG_TAKEN_POSITIVE_SPELL0x00008000Taken positive spell hit (by default only on healing)PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT0x00010000Successful negative spell cast (by default only on damage)PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT0x00020000Taken negative spell (by default only on damage)PROC_FLAG_ON_DO_PERIODIC0x00040000Successful do periodic (damage / healing, determined by

PROC_EX_PERIODIC_POSITIVE or negative if no procEx)PROC_FLAG_ON_TAKE_PERIODIC0x00080000Taken spell periodic (damage / healing, determined by

PROC_EX_PERIODIC_POSITIVE or negative if no procEx)PROC_FLAG_TAKEN_ANY_DAMAGE0x00100000Taken any damagePROC_FLAG_ON_TRAP_ACTIVATION0x00200000On trap activationPROC_FLAG_TAKEN_OFFHAND_HIT0x00400000Taken off-hand melee attacks(not used)PROC_FLAG_SUCCESSFUL_OFFHAND_HIT0x00800000Successful off-hand melee attacks

procEx

A bit-mask controlling events for melee based triggers. The following tables contains available flags.

298 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Name Bit-mask

Description

PROC_EX_NONE 0x0000000 If none can trigger on Hit/Crit only (passive spells MUST definedby SpellFamily flag)

PROC_EX_NORMAL_HIT 0x0000001 If set only from normal hit (only damage spells)PROC_EX_CRITICAL_HIT 0x0000002PROC_EX_MISS 0x0000004PROC_EX_RESIST 0x0000008PROC_EX_DODGE 0x0000010PROC_EX_PARRY 0x0000020PROC_EX_BLOCK 0x0000040PROC_EX_EVADE 0x0000080PROC_EX_IMMUNE 0x0000100PROC_EX_DEFLECT 0x0000200PROC_EX_ABSORB 0x0000400PROC_EX_REFLECT 0x0000800PROC_EX_INTERRUPT 0x0001000 Melee hit result can be Interrupt (not used)PROC_EX_RESERVED1 0x0002000PROC_EX_RESERVED2 0x0004000PROC_EX_RESERVED3 0x0008000PROC_EX_EX_TRIGGER_ALWAYS0x0010000 If set trigger always ( no matter another flags) used for drop

chargesPROC_EX_EX_ONE_TIME_TRIGGER0x0020000 If set trigger always but only one time (not used)PROC_EX_PERIODIC_POSITIVE0x0040000 For periodic heal

ppmRate

This field controls the times per minute that the spell should proc. If zero, then the value is taken from the DBC entry.

CustomChance

Custom chance for triggering, given in percentage.

Cooldown

Define hidden cooldowns on the spell, given in seconds. Also known as the proc’s internal cooldown, or ICD.

“spell_proc_item_enchant” table

The spell_proc_item_enchant table holds information for proc chances of spells which enchant weapons.

This e.g. includes shaman weapon enchants.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLppmRate float NO 0

3.1. Database Guide 299

mangos-zero, Release 0.2.0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

ppmRate

This field controls the times per minute that the spell should proc. If zero, then the value is taken from the DBC entry.

“spell_script_target” table

The spell_script_target table defines which targets are allowed for spells having an ImplicitTarget[A,B] of7, 8, 38, 40, 46, 52.

Targets can be game objects, or creatures (both alive and dead.)

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLtype tinyint(3) unsigned NO PRI 0targetEntry mediumint(8) unsigned NO PRI 0inverseEffectMask mediumint(8) unsigned NO 0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

type

Describes which type of target the spell requires. The following table shows all valid target types.

Value Description0 Game object1 Creature template2 Dead creature template

targetEntry

Depending on the type value this references the “creature_template” table tables unique ID, or the “gameob-ject_template” table tables unique ID.

inverseEffectMask

TODO: takes a value for an effect, and shifts it.

300 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

“spell_target_position” table

The spell_target_position table holds coordinate information on where a character should be teleported towhen a spell with effect SPELL_EFFECT_TELEPORT_UNITS is cast.

Table structure

Field Type Null Key Default Extraid mediumint(8) unsigned NO PRI 0target_map smallint(5) unsigned NO 0target_position_x float NO 0target_position_y float NO 0target_position_z float NO 0target_orientation float NO 0

Fields

id

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

target_map

The target map’s identifier. The value has to match with a map identifier defined in Map.dbc.

target_position_x

The X position on the target map.

target_position_y

The Y position on the target map.

target_position_z

The Z position on the target map.

target_orientation

The orientation for the character on the target map. This is measured in radians, 0 is north on the mini-map and pi issouth on the mini-map etc.

“spell_threat” table

The spell_threat table holds threat values for any spells that increase or decrease threat.

Entries here may be used to modify threat values which are original defined in Spell.dbc.

3.1. Database Guide 301

mangos-zero, Release 0.2.0

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI NULLThreat smallint(6) NO NULLmultiplier float NO 1ap_bonus float NO 0

Fields

entry

The spell identifier. The value has to match with a spell identifier defined in Spell.dbc.

Note: Any spell referenced is required to be rank 1 in the spell chain, and has to have threat values set in the originalspell definition.

Threat

The value of threat to add to the characters threat, or to remove from a characters threat. Negative values reduce threat,positive values increase threat.

multiplier

Any value here will modify the spells threat with the factor given here.

ap_bonus

Any value here will modify the spells attack power with the factor given here.

“transports” table

The transports table holds informations on available world transports. This includes boats and Zeppelins.

Table structure

Field Type Null Key Default Extraentry mediumint(8) unsigned NO PRI 0name text YES NULLperiod mediumint(8) unsigned NO 0

302 Chapter 3. Database Guide

mangos-zero, Release 0.2.0

Fields

entry

This references the “gameobject_template” table tables unique ID of the game object of type 15 (boats and Zeppelins)for which the entry is valid.

name

A name describing the transport. This is not used in-game, but only here to ease locking up data.

period

This is the amount of time that it take for the transport to make one full pass through all the frames in TaxiNodes.dbc.When a client change occurs, usually this field must be updated. This values is set in milliseconds.

“world_template” table

The world_template table holds informations for connection world continents to scripts from the script library.

Table structure

Field Type Null Key Default Extramap smallint(5) unsigned NO PRI NULLScriptName varchar(128) NO

Fields

map

A world continent identifier. The value has to match with a continent identifier defined in WorldMapContinent.dbc,and references the mapID field in that file.

ScriptName

To assign a script from the script library to the world continent, set this string to the script’s exported name.

• Contributing

– Research

– Style Guide

– Updates

– Region levels

• Databases

– Character database

– Realm database

3.1. Database Guide 303

mangos-zero, Release 0.2.0

– Script database

– World database

• Contributing

– Research

– Style Guide

– Updates

– Region levels

• Databases

– Character database

– Realm database

– Script database

– World database

304 Chapter 3. Database Guide

CHAPTER 4

File Format Guide

A guide describing the game client and server file formats.

4.1 File Format Guide

This section covers all file formats for game client and server files

4.1.1 Overview

TODO

Client File Formats

TODO

Server File Formats

TODO

4.1.2 DBC File Format

The World of Warcraft game client contains a few local database files, which are used to bootstrap the client andprovide a set of common data which is used in all game data transferred between client and server.

This section describe the file format itself, and covers the structure for each DBC file included the the game client.

AnimationData.dbc

The animation data table contains the basic definitions for available animation types that can be used in models.

305

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name of the ani-mation.

3 weaponFlags Integer (signed) 0 See below.4 bodyFlags Integer (signed) 0 See below.5 flags Integer (signed) 0 See below.6 fallback Integer 0 The animation to re-

turn to after this ani-mation is finished.

7 behavior Integer 0 The preceding anima-tion.

Fields

weaponFlags Weapon flags describe if an animation should modify the weapon(s) state worn by a character. Ani-mations can ignore weapons and sheathe/unsheathe them.

• 0: weapon not affected by animation,

• 4: sheathe weapons automatically,

• 16: sheathe weapons automatically,

• 32: unsheathe weapons.

bodyFlags TODO

Flags TODO

Relations

• fallback references the primary key of AnimationData.dbc.

• behavior references the primary key of AnimationData.dbc.

AreaPOI.dbc

The area points of interest table contains points of interest within zones. This can be global points of interest, factionspecific ones, or even PvP related points of interest

306 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 importance Integer (signed) 0 The importance levelof the point of interest.

3 icon Integer (signed) 0 Refers to an iconon the InterfaceM-inimapPOIICONSfile.

4 faction Integer 0 References a factionto which the POI be-longs.

5 locationX Float 0 X coordinate for thepoint of interest.

6 locationY Float 0 Y coordinate for thepoint of interest.

7 locationZ Float 0 Z coordinate for thepoint of interest.

8 map Integer 0 References a map onwhich this point of in-terest is located.

9 flags Integer (signed) 0 Determines where apoint of interest willbe shown.

10 areaTable Integer (signed) 0 References the areat-able on which thispoint of interest is lo-cated.

11 name String (localized) • The name of the pointof interest.

12 description String (localized) • A description for thepoint of interest.

13 worldState Integer 0 References a worldstate associated withthe point of interest.

Fields

Relations

• faction references the primary key of Faction.dbc.

• map references the primary key of Map.dbc.

• areaTable references the primary key of AreaTable.dbc.

• worldState references the primary key of WorldStateUI.dbc.

4.1. File Format Guide 307

mangos-zero, Release 0.2.0

AreaTable.dbc

The area table contains definitions all available main and child areas in game, such as zones, and their sub-zones.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 The map on which thearea is located.

3 parentAreaTable Integer 0 Refers the parent areaif set.

4 areaBit Integer (signed) 0 See below.5 flags Integer (signed) 0 See below.6 soundPreferences Integer 0 Sound settings when

moving while in thisarea.

7 soundPreferencesUnderwaterInteger 0 Sound settings whenmoving in water whilein this area.

8 soundAmbience Integer 0 Background sounds— birds, falling leafs,etc. — playing whenin this area.

9 zoneMusic Integer 0 The background mu-sic when playing inthis area.

10 zoneIntroMusicTable Integer 0 Music played uponentering the area.

11 explorationLevel Integer (signed) 0 The suggested charac-ter level for exploringthis area.

12 areaName String (localized) • The name of the area.

13 factionGroup Integer 0 References the factiongroup which owns thisarea.

14 liquidType Integer 0 References the type ofliquid to be found inthis area.

15 minElevation Integer (signed) 0 Lowest possible Z co-ordinate for this area.

16 ambientMultiplier Float 0 Modifier for characterlighting.

17 light Integer 0 References the type oflighting to be seen inthis area.

Fields

308 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

areaBit We have not investigated the purpose of these bit flags. The current assumption is that these bit flags providemeta information for a zone, e.g. hinting at an instanced or non-instanced zone, or a dungeon, or battleground, etc.

TODO: Further research is required.

flags flags seem to directly relate to the state of a zone, e.g. is it a city, or is it a winter area, or can I duel there.Thus we assume these are interaction related flags.

• 0000 0000 0000 0001 / 1 : AREA_FLAG_SNOW seems to indicate zones which have winter maps withsnow on the ground,

• 0000 0000 0000 0010 / 2 : AREA_FLAG_UNK

• 0000 0000 0000 0100 / 4 : AREA_FLAG_DEVELOPMENT indicates a map only available during devel-opment,

• 0000 0000 0000 1000 / 8 : AREA_FLAG_UNK

• 0000 0000 0001 0000 / 16 : AREA_FLAG_UNK

• 0000 0000 0010 0000 / 32 : AREA_FLAG_CITY_SLAVE

• 0000 0000 0100 0000 / 64 : AREA_FLAG_ALLOW_DUELS

• 0000 0000 1000 0000 / 128 : AREA_FLAG_UNK

• 0000 0001 0000 0000 / 256 : AREA_FLAG_CITY

• 0000 0010 0000 0000 / 512 : AREA_FLAG_TEST

TODO: Further research is required.

Relations

• mapID references the primary key of Map.dbc.

• parentAreaTableID references the primary key of AreaTable.dbc. This is a self-reference.

• soundPreferencesID references the primary key of SoundProviderPreferences.dbc.

• soundPreferencesIDUnderWater references the primary key of SoundProviderPreferences.dbc.

• soundAmbienceID references the primary key of SoundAmbience.dbc.

• zoneMusicID references the primary key of ZoneMusic.dbc.

• zoneIntroMusicTableID references the primary key of ZoneIntroMusicTable.dbc.

• factionGroupID references the primary key of FactionGroup.dbc.

• liquidTypeID references the primary key of LiquidType.dbc.

• lightID references the primary key of Light.dbc.

Data

The following tables contain the data contained within the file to allow for easier determination of actual formats, andthe meaning of individual cells.

Note: This table contains all non-development areas, which are not instanced.

4.1. File Format Guide 309

mangos-zero, Release 0.2.0

Continent ID AreaBit (binary) flags (binary) AreaName0 1 0000 0000 0111 0111 0000 0000 0100 0001 Dun Morogh0 3 0000 0000 0111 1001 0000 0000 0100 0000 Badlands0 4 0000 0000 0111 1010 0000 0000 0100 0000 Blasted Lands0 8 0000 0000 0111 1100 0000 0000 0100 0000 Swamp of Sorrows0 10 0000 0010 0110 1001 0000 0000 0100 0000 Duskwood0 11 0000 0010 0110 1010 0000 0000 0100 0000 Wetlands0 12 0000 0000 0111 1110 0000 0000 0100 0000 Elwynn Forest0 25 0000 0000 1000 1000 0000 0000 0100 0000 Blackrock Mountain0 28 0000 0000 1000 1001 0000 0000 0100 0000 Western Plaguelands0 33 0000 0000 1000 1100 0000 0000 0100 0000 Stranglethorn Vale0 36 0000 0000 1000 1111 0000 0000 0100 0000 Alterac Mountains0 38 0000 0000 1001 0001 0000 0000 0100 0000 Loch Modan0 40 0000 0000 1001 0010 0000 0000 0100 0000 Westfall0 41 0000 0010 0010 1100 0000 0000 0100 0000 Deadwind Pass0 44 0000 0000 1001 0101 0000 0000 0100 0000 Redridge Mountains0 45 0000 0000 1001 0110 0000 0000 0100 0000 Arathi Highlands0 46 0000 0000 1001 0111 0000 0000 0100 0000 Burning Steppes0 47 0000 0000 1001 1000 0000 0000 0100 0000 The Hinterlands0 51 0000 0000 1001 1010 0000 0000 0100 0000 Searing Gorge0 85 0000 0000 1011 0011 0000 0000 0100 0000 Tirisfal Glades0 130 0000 0000 1101 0010 0000 0000 0100 0000 Silverpine Forest0 139 0000 0000 1101 1011 0000 0000 0100 0000 Eastern Plaguelands0 170 0000 0000 1111 0110 0000 0000 0100 0000 Lordamere Lake0 214 0000 0001 0000 1111 0000 0000 0100 0000 The Great Sea0 267 0000 0000 0001 0001 0000 0000 0100 0000 Hillsbrad Foothills0 269 0000 0000 0001 0010 0000 0000 0100 0000 Dun Algaz0 293 0000 0000 0010 0011 0000 0000 0100 0000 Thoradin’s Wall0 308 0000 0010 0111 0111 0000 0000 0100 0000 The Forbidding Sea0 330 0000 0000 0011 1100 0000 0000 0100 0000 Thandol Span0 1477 0000 0001 1000 0101 0000 0000 0000 0000 The Temple of Atal’Hakkar0 1497 0000 0010 1010 1101 0000 0001 0011 1000 Undercity0 1519 0000 0010 1011 0000 0000 0001 0011 1000 Stormwind City0 1537 0000 0010 1011 0001 0000 0001 0011 1000 Ironforge0 1583 0000 0010 1011 1001 0000 0000 0000 0000 Blackrock Spire0 1584 0000 0010 1011 1010 0000 0000 0000 0000 Blackrock Depths1 14 0000 0000 0111 1111 0000 0000 0100 0000 Durotar1 15 0000 0000 1000 0000 0000 0000 0100 0000 Dustwallow Marsh1 16 0000 0000 1000 0001 0000 0000 0100 0000 Azshara1 17 0000 0000 1000 0010 0000 0000 0100 0000 The Barrens1 141 0000 0000 1101 1100 0000 0000 0100 0000 Teldrassil1 148 0000 0000 1110 0011 0000 0000 0100 0000 Darkshore1 215 0000 0001 0001 0000 0000 0000 0100 0000 Mulgore1 331 0000 0000 0011 1101 0000 0000 0100 0000 Ashenvale1 332 0000 0000 0011 1110 0000 0000 0100 0000 The Great Sea1 357 0000 0000 0101 0011 0000 0000 0100 0000 Feralas1 361 0000 0000 0101 0111 0000 0000 0100 0000 Felwood1 377 0000 0000 0110 0101 0000 0000 0100 0000 Southfury River1 400 0000 0001 1011 1010 0000 0000 0100 0000 Thousand Needles1 405 0000 0001 1011 1101 0000 0000 0100 0000 Desolace1 406 0000 0001 1011 1110 0000 0000 0100 0000 Stonetalon Mountains

Continued on next page

310 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.1 – continued from previous pageContinent ID AreaBit (binary) flags (binary) AreaName1 440 0000 0001 1101 1000 0000 0000 0100 0000 Tanaris1 457 0000 0010 0011 1011 0000 0000 0100 0000 The Veiled Sea1 490 0000 0010 0000 0010 0000 0000 0100 0000 Un’Goro Crater1 493 0000 0010 0000 0101 0000 0000 0100 0000 Moonglade1 618 0000 0010 0110 1101 0000 0000 0100 0001 Winterspring1 1377 0000 0001 0111 0110 0000 0000 0100 0000 Silithus1 1637 0000 0010 1100 0011 0000 0001 0011 1000 Orgrimmar1 1638 0000 0010 1100 0100 0000 0001 0011 1000 Thunder Bluff1 1657 0000 0010 1100 1000 0000 0001 0011 1000 Darnassus1 3478 0000 0100 0011 0011 0000 0000 0000 0000 Gates of Ahn’Qiraj36 207 0000 0001 0000 1000 0000 0000 0100 0000 The Great Sea

Note: This table contains all non-development areas, which are instanced. These are all instanced areas which aresub-zones to a city.

Continent ID AreaBit (binary) flags (binary) AreaName449 2918 0000 0011 1101 1101 0000 0000 0010 0000 Champion’s Hall369 2257 0000 0011 0100 1011 0000 0000 0000 0000 Deeprun Tram1 2917 0000 0011 1101 1100 0000 0000 0010 0000 Hall of Legends

Note: This table contains all non-development areas, which are instanced. These are normal dungeons.

Continent ID AreaBit (binary) flags (binary) AreaName1 1941 0000 0011 0001 0001 0000 0000 0100 0000 Caverns of Time33 209 0000 0001 0000 1010 0000 0000 0000 0000 Shadowfang Keep34 717 0000 0010 1000 0000 0000 0000 0000 0000 The Stockade36 1581 0000 0010 1011 0111 0000 0000 0000 0000 The Deadmines43 718 0000 0010 1000 0001 0000 0000 0000 0000 Wailing Caverns47 491 0000 0010 0000 0011 0000 0000 0000 0000 Razorfen Kraul48 719 0000 0010 1000 0010 0000 0000 0000 0000 Blackfathom Deeps70 1337 0000 0001 1011 0101 0000 0000 0000 0000 Uldaman90 721 0000 0001 0011 0001 0000 0000 0000 0000 Gnomeregan109 1417 0000 0001 0111 1001 0000 0000 0000 0000 Sunken Temple129 722 0000 0010 1000 0100 0000 0000 0000 0011 Razorfen Downs189 796 0000 0010 1000 0110 0000 0000 0000 0000 Scarlet Monastery209 1176 0000 0001 0111 0011 0000 0000 0000 0000 Zul’Farrak289 2057 0000 0011 0001 1101 0000 0000 0000 0000 Scholomance329 2017 0000 0011 0001 1011 0000 0000 0000 0000 Stratholme349 2100 0000 0011 0010 0100 0000 0000 0000 0000 Maraudon389 2437 0000 0011 1001 1111 0000 0000 0000 0000 Ragefire Chasm429 2557 0000 0011 1011 0010 0000 0000 0000 0000 Dire Maul

Note: This table contains all non-development areas, which are instanced. These are raid battleground instances

4.1. File Format Guide 311

mangos-zero, Release 0.2.0

Continent ID AreaBit (binary) flags (binary) AreaName30 2597 0000 0011 1011 1010 0000 0000 0000 0000 Alterac Valley37 268 0000 0010 0100 0100 0000 0000 0100 0000 Azshara Crater489 3277 0000 0100 0000 0001 0000 0000 0000 0000 Warsong Gulch529 3358 0000 0100 0001 0100 0000 0000 0000 0000 Arathi Basin

Note: This table contains all non-development areas, which are instanced. These are raid instances.

Continent ID AreaBit (binary) flags (binary) AreaName1 2159 0000 0011 0011 0000 0000 0000 0000 0000 Onyxia’s Lair309 1977 0000 0011 0001 0111 0000 0000 0000 0000 Zul’Gurub409 2717 0000 0011 1100 1010 0000 0000 0000 0000 Molten Core469 2677 0000 0011 1100 1000 0000 0000 0000 0000 Blackwing Lair509 3429 0000 0100 0010 1011 0000 0000 0000 0000 Ruins of Ahn’Qiraj531 3428 0000 0100 0010 1010 0000 0000 0000 0000 Ahn’Qiraj533 3456 0000 0100 0011 0011 0000 0000 0000 0011 Naxxramas

Note: This table contains all development areas, both instanced and non instanced.

Continent ID AreaBit (binary) flags (binary) AreaName0 1579 0000 0010 1011 0101 0000 0000 0100 0000 Unused The Deadmines 0020 2037 0000 0011 0001 1100 0000 0000 0100 0000 UNUSEDShadowfang Keep 0030 21 0000 0000 1000 0101 0000 0000 0100 0000 Kul Tiras0 2280 0000 0011 0110 0010 0000 0000 0100 0000 UNUSED Stratholme0 276 0000 0010 0011 0100 0000 0000 0100 0000 UNUSED Stonewrought Pass0 296 0000 0000 0010 0101 0000 0000 0100 0000 South Seas UNUSED0 30 0000 0000 1000 1010 0000 0000 0100 0000 Nine0 394 0000 0000 0111 0011 0000 0000 0100 0000 Darrowmere Lake UNUSED0 408 0000 0001 1100 0000 0000 0000 0100 0000 Gillijim’s Isle0 409 0000 0001 1100 0001 0000 0000 0100 0000 Island of Doctor Lapidis0 495 0000 0010 0000 0111 0000 0000 0100 0000 DELETE ME1 1196 0000 0001 0110 1011 0000 0000 0100 0000 UNUSEDAlcaz Island1 616 0000 0010 0110 1011 0000 0000 0100 0000 Hyjal1 876 0000 0010 1010 0011 0000 0000 0100 0000 GM Island17 67 0000 0000 1010 0110 0000 0000 0100 0100 On Map Dungeon30 2817 0000 0000 0000 0000 0000 0000 0100 0100 On Map Dungeon36 208 0000 0001 0000 1001 0000 0000 0100 0000 Unused Ironcladcove36 210 0000 0001 0000 1011 0000 0000 0100 0100 On Map Dungeon36 206 0000 0001 0000 0111 0000 0000 0100 0000 Westfall150 676 0000 0001 0010 1001 0000 0000 0100 0000 Outland169 1397 0000 0001 0111 1000 0000 0000 0100 0000 Emerald Forest169 956 0000 0001 0011 1111 0000 0000 0100 0000 The Verdant Fields269 2366 0000 0011 1000 0000 0000 0000 0000 0000 The Black Morass269 2367 0000 0011 1000 0001 0000 0000 0000 0000 Old Hillsbrad Foothills451 151 0000 0010 0011 0000 0000 0000 0100 0000 Designer Island451 22 0000 0010 0010 0011 0000 0000 0100 0000 Programmer Isle

AreaTrigger.dbc

The area trigger table contains definitions for locations which are supposed to trigger in-game server side events.Usually these are scripted events.

312 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 The map on which thetrigger is located.

3 locationX Float 0 X coordinate for thetrigger.

4 locationY Float 0 Y coordinate for thetrigger.

5 locationZ Float 0 Z coordinate for thetrigger.

6 radius Float 0 Box size of the areatrigger.

7 boxLength Float 0 Length of the box ifno radius is specified.

8 boxWidth Float 0 Width of the box if noradius is specified.

9 boxHeight Float 0 Height of the box if noradius is specified.

10 boxYaw Float 0 Orientation of the boxif no radius is speci-fied.

Relations

• map references the primary key of Map.dbc.

AttackAnimKits.dbc

The attack animation kits table contains definitions for attack animation groups, by combining animation data andvarious flags.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 animationData Integer 0 The ID of the anima-tion to play.

3 attackAnimType Integer 0 The ID of the attackanimation type.

4 flags Integer (signed) 0 See below.5 field5 Integer (signed) 0 TODO. seems to be

a flag for OffHand at-tack animation

4.1. File Format Guide 313

mangos-zero, Release 0.2.0

Fields

flags Determines what kind of weapon animation this is.

• 0: Main hand,

• 1: Off hand.

Relations

• animationData references the primary key of AnimationData.dbc.

• attackAnimType references the primary key of AttackAnimTypes.dbc.

AttackAnimTypes.dbc

The attack animation types table contains definitions for available attack animation types.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the ani-mation type.

Data

ID Name1 1H_Main_Swing2 1H_Main_Pierce3 2HL_Pierce4 2HL_Swing5 2HT_Swing7 OffH_Swing8 OffH_Pierce

AuctionHouse.dbc

The auction house table contains definitions for available auction houses for each faction including payments forplacing auctions.

314 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 faction Integer 0 References the factionto which the auctionhouse belongs.

3 depositRate Integer (signed) 0 The auction house’scut of the final earn-ings.

4 consignmentRate Integer (signed) 0 The deposit fee basedon the sale price.

5 name String (localized) • The name of the auc-tion house.

Relations

• faction references the primary key of Faction.dbc.

BankBagSlotPrices.dbc

The bank bag slot prices table contains definitions for available bank slots for additional bags.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 cost Integer (signed) 0 Price of the bank bagslot in copper.

CameraShakes.dbc

The camera shakes table contains definitions for shaking the game camera when certain spells are cast.

4.1. File Format Guide 315

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 shakeType Integer (signed) 0 See below.3 direction Integer (signed) 0 See below.4 amplitude Float 0 TODO5 frequency Float 0 TODO6 duration Float 0 TODO7 phase Float 0 TODO8 coefficient Float 0 TODO

Fields

shakeType It is assumed that this flag describes either different variants of camera shaking, or that it is a booleanflag telling if the camera should be shaken.

• 0: TODO,

• 1: TODO.

direction This flag seems to indicate the direction towards which a camera shake will point.

• 0: TODO,

• 1: TODO,

• 2: TODO.

Cfg_Categories.dbc

The configuration categories table contains definitions for grouping realms in the realm selection dialog.

Table structure

ID Name Type Default Description1 tab Integer 0 The tab on the realm

selection dialog.2 region Integer 0 The region’s ID.3 name String (localized) • The name of the realm

group.

Notes

This table does not have a primary key.

Cfg_Configs.dbc

The configuration table contains definitions for realm types and their rules.

316 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 realmType Integer (signed) 0 Type of the realm.3 playerKillingAllowed Integer (signed) 0 Determines if this is a

PvP realm.4 rolePlaying Integer (signed) 0 Determines if this is a

RP realm.

Fields

playerKillingAllowed

• 0: no,

• 1: yes.

rolePlaying

• 0: no,

• 1: yes.

CharacterFacialHairStyles.dbc

The character facial hair styles table contains definitions for attributes use to customize a characters facial style.

Table structure

ID Name Type Default Description1 race Integer 0 References the race for which the style applies.2 sex Integer (signed) 0 See below.3 variation Integer (signed) 0 References the the actual variation to apply.4 geoset1 Integer (signed) 0 References a geoset ID in a model.5 geoset2 Integer (signed) 0 References a geoset ID in a model.6 geoset3 Integer (signed) 0 References a geoset ID in a model.7 geoset4 Integer (signed) 0 References a geoset ID in a model.8 geoset5 Integer (signed) 0 References a geoset ID in a model.9 geoset6 Integer (signed) 0 References a geoset ID in a model.

Fields

sex

• 0: male,

• 1: female.

4.1. File Format Guide 317

mangos-zero, Release 0.2.0

Relations

• race references the primary key of ChrRaces.dbc.

• variation references the primary key of CharVariations.dbc.

Notes

This table does not have a primary key.

CharBaseInfo.dbc

The character base information table contains definitions for which race may create what character classes.

Table structure

ID Name Type Default Description1 race Integer 0 References the race which is used.2 class Integer 0 References the class which is used.

Relations

• race references the primary key of ChrRaces.dbc.

• class references the primary key of ChrClasses.dbc.

Notes

This table does not have a primary key.

CharHairGeosets.dbc

The character hair geosets table contains definitions for allowed hair styles for races/genders.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 race Integer 0 References the race towhich the style ap-plies.

3 sex Integer (signed) 0 See below.4 variation Integer 0 References the actual

style to apply.5 geoset Integer (signed) 0 References a geoset

ID in a model.6 showScalp Integer (signed) 0 See below.

318 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Fields

sex

• 0: male,

• 1: female.

showScalp

• 0: not bald,

• 1: bald.

Relations

• race references the primary key of ChrRaces.dbc.

• variation references the primary key of CharVariations.dbc.

CharHairTextures.dbc

The character hair textures table contains flags for hair geosets paired by race/gender.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 race Integer 0 References the race towhich the hair tex-tures is applied.

3 sex Integer (signed) 0 See below.4 field4 Integer (signed) 0 TODO5 field5 Integer (signed) 0 TODO6 field6 Integer (signed) 0 TODO7 field7 Integer (signed) 0 TODO8 field8 Integer (signed) 0 TODO

Fields

sex

• 0: male,

• 1: female.

Relations

• race references the primary key of ChrRaces.dbc.

4.1. File Format Guide 319

mangos-zero, Release 0.2.0

CharSections.dbc

The character sections table contains definitions for textures that make up the different character variations, e.g. hair,beards, the base skin.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 race Integer 0 References the race towhich the section ap-plies.

3 sex Integer (signed) 0 See below.4 sectionType Integer (signed) 0 See below.5 variationIndex Integer (signed) 0 TODO6 colorIndex Integer (signed) 0 An index7 textureName1 String • The name of the

matching texture file.

8 textureName2 String • The name of thematching texture file.

9 textureName3 String • The name of thematching texture file.

10 flags Integer (signed) 0 See below.

Fields

sex

• 0: male,

• 1: female.

sectionType Each sectionType value indicates a different use case for the fields colorIndex,TextureName1, TextureName2 and TextureName3.

• 0: base skin indicates that colorIndex points to a skin colour, TextureName1 points to a skin texture,TextureName2 points to extra skin and TextureName3 is empty.

• 1: face indicates that colorIndex points to a skin colour, TextureName1 points to a face texture,TextureName2 points to an upper face texture and TextureName3 is empty.

• 2: facial hair indicates that colorIndex points to a hair colour, TextureName1 points to a facial hairtexture, TextureName2 points to an upper face texture and TextureName3 points to nothing.

• 3: hair indicates that colorIndex points to a hair colour, TextureName1 points to a hair texture,TextureName2 points to a lower scalp texture and TextureName3 points to an upper scalp texture.

• 4: underwear indicates that colorIndex points to a skin colour, TextureName1 points to a underweartexture, TextureName2 points to a torso texture and TextureName3 is empty.

320 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

flags This indicates if an entry is valid for a player character. Currently only entries for Goblins are marked asnon-playable.

• 0: section for playable races,

• 1: section for non-playable races.

Relations

• race references the primary key of ChrRaces.dbc.

CharStartOutfit.dbc

The character start outfit table contains definitions for the items a new character should receive.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 race Byte 0 References the race towhich the outfit ap-plies.

3 class Byte 0 References the classto which the outfit ap-plies.

4 sex Byte (signed) 0 See below.5 outfitId Byte (signed) 0 Outfit identifier.6 itemID1 Integer 0 Item identifier.7 itemID2 Integer 0 Item identifier.8 itemID3 Integer 0 Item identifier.9 itemID4 Integer 0 Item identifier.10 itemID5 Integer 0 Item identifier.11 itemID6 Integer 0 Item identifier.12 itemID7 Integer 0 Item identifier.13 itemID8 Integer 0 Item identifier.14 itemID9 Integer 0 Item identifier.15 itemID10 Integer 0 Item identifier.16 itemID11 Integer 0 Item identifier.17 itemID12 Integer 0 Item identifier.18 displayID1 Integer 0 Item Display Info

identifier.19 displayID2 Integer 0 Item Display Info

identifier.20 displayID3 Integer 0 Item Display Info

identifier.21 displayID4 Integer 0 Item Display Info

identifier.Continued on next page

4.1. File Format Guide 321

mangos-zero, Release 0.2.0

Table 4.2 – continued from previous pageID Name Type Default Description22 displayID5 Integer 0 Item Display Info

identifier.23 displayID6 Integer 0 Item Display Info

identifier.24 displayID7 Integer 0 Item Display Info

identifier.25 displayID8 Integer 0 Item Display Info

identifier.26 displayID9 Integer 0 Item Display Info

identifier.27 displayID10 Integer 0 Item Display Info

identifier.28 displayID11 Integer 0 Item Display Info

identifier.29 displayID12 Integer 0 Item Display Info

identifier.30 invSlotID1 Integer 0 Inventory slot identi-

fier.31 invSlotID2 Integer 0 Inventory slot identi-

fier.32 invSlotID3 Integer 0 Inventory slot identi-

fier.33 invSlotID4 Integer 0 Inventory slot identi-

fier.34 invSlotID5 Integer 0 Inventory slot identi-

fier.35 invSlotID6 Integer 0 Inventory slot identi-

fier.36 invSlotID7 Integer 0 Inventory slot identi-

fier.37 invSlotID8 Integer 0 Inventory slot identi-

fier.38 invSlotID9 Integer 0 Inventory slot identi-

fier.39 invSlotID10 Integer 0 Inventory slot identi-

fier.40 invSlotID11 Integer 0 Inventory slot identi-

fier.41 invSlotID12 Integer 0 Inventory slot identi-

fier.

Fields

sex

• 0: male,

• 1: female.

322 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Relations

• race references the primary key of ChrRaces.dbc.

• class references the primary key of ChrClasses.dbc.

CharVariations.dbc

The character variations table contains definitions for character models, and seems to indicate where models varyfrom the default model.

Currently it is assumed that the masks indicated the display of foot items, or required modification of head items dueto tusks, or horns since these masks are only set for Tauren and Trolls.

Table structure

ID Name Type Default Description1 race Integer 0 References the race to which to apply the variation.2 sex Integer (signed) 0 See below.3 unk1 Integer (signed) 0 TODO4 mask1 Integer (signed) 0 TODO5 mask2 Integer (signed) 0 TODO6 unk4 Integer (signed) 0 TODO

Fields

sex

• 0: male,

• 1: female.

unk1 TODO

mask1

• 512: seems to indicate feet/head variations.

mask2

• 512: seems to indicate feet/head variations.

unk4 TODO

Relations

• race references the primary key of ChrRaces.dbc.

4.1. File Format Guide 323

mangos-zero, Release 0.2.0

Notes

This table does not have a primary key. It only covers playable races.

ChatChannels.dbc

The chat channels table contains definitions for in-game chat channels and their availability.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) 0 See below.3 factionGroup Integer 0 References which fac-

tion has access to thechannel.

4 name String (localized) • The name of the chatchannel as display inthe user interface.

5 shortcut String (localized) • The short-cut name asused on user interfacescripting.

Fields

flags flags indicate in which state a channel is set initially for a character.

• 0: FLAG_NONE indicates a channel which is available but not joined by characters,

• 1: FLAG_INITIAL indicates a channel which is automatically joined by characters,

• 2: FLAG_ZONE_DEP indicates a channel which is zone specific,

• 4: FLAG_GLOBAL indicates a channel which is available everywhere,

• 8: FLAG_TRADE indicates a channel which is a trade channel (duh!),

• 16: FLAG_CITY_ONLY indicates a channel which is available in cities only,

• 32: FLAG_CITY_ONLY2 indicates a channel which is available in cities only,

• 65536: FLAG_DEFENSE indicates a channel which is a PvP channel,

• 262144: FLAG_UISELECTED indicates a channel which is optional and selected in user interface.

Relations

• factionGroup references the key maskID of FactionGroup.dbc.

ChatProfanity.dbc

The chat profanity table contains definitions for words/strings which are banned from in-game chat channels.

324 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 text String • A word/string not al-lowed in a chat mes-sage.

ChrClasses.dbc

The character classes table contains definitions for available classes.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 field2 Integer (signed) 1 TODO. Value is 1 forall classes.

3 field3 Integer (signed) 0 TODO. Value is 1only for Hunters andRogues.

4 powerType Integer (signed) 0 See below.5 petNameToken String • Token for the type of

pet available to theclass.

6 name String (localized) • The full class name.

7 fileName String • File name used to ref-erence the class indata files.

8 classMask Integer (signed) 0 A class mask usede.g. as reference fromspells.

9 isHybridClass Integer (signed) 0 See below.

Fields

powerType

• 0: Mana,

• 1: Rage,

• 2: Focus,

• 3: Energy,

• 4: Happiness.

4.1. File Format Guide 325

mangos-zero, Release 0.2.0

isHybridClass

• 0: no hybrid class,

• 1: hybrid class.

classMask Seems to be primarily used when assigning spells to classes.

ChrRaces.dbc

The character races table contains definitions for available races, including their settings for sound, display, data files,etc.

326 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

4.1. File Format Guide 327

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) 0 See below.3 faction Integer 0 References the faction

template to which therace belongs.

4 explorationSound Integer 0 References the soundto play upon zone ex-ploration.

5 maleDisplay Integer 0 References the malemodel for the race.

6 femaleDisplay Integer 0 References the femalemodel for the race.

7 clientPrefix String • A short form of thename. Used for hel-met models.

8 speed Float 1 Speed modifier.9 baseLanguage Integer • See below.

10 creatureType Integer 0 References the crea-ture type for the race.Surprisingly this is setto 7 for all races,meaning each is hu-manoid.

11 loginEffect Integer 0 References the spell tocast upon logging in.

12 field12 Integer (signed) 1604 TODO. Set to 1604for all races.

13 resSicknessSpell Integer 0 Resurrection sicknessspell to cast upon res-urrection from spirithealer.

14 splashSoundEntry Integer 0 Splash sound to beused for this race.

15 field15 Integer 0 TODO. May be floatmodifier.

16 clientFileString String • String used in modelfile paths.

17 cinematicSequence Integer 0 The cinematic se-quence to play uponlogging in the firsttime after charactercreation.

18 name String (localized) • The name of the race.

19 facialHairCustomization1String • Customization nameas used in-game forLua scripting.

20 facialHairCustomization2String • Customization nameas used in-game forLua scripting.

21 hairCustomization String • Customization nameas used in-game forLua scripting.

328 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Fields

flags

• 0: NONE,

• 1: NOT_PLAYABLE,

• 2: bare feet,

• 4: TODO,

• 8: TODO.

BaseLanguage

• 1: Horde,

• 7: Alliance.

Relations

• faction references the primary key of FactionTemplate.dbc.

• explorationSound and splashSoundEntry references the primary key of SoundEntries.dbc.

• maleDisplay and femaleDisplay reference the primary key of CreatureDisplayInfo.dbc.

• creatureType references the primary key of CreatureType.dbc.

• loginEffect and resSicknessSpell reference the primary key of Spell.dbc.

• cinematicSequence references the primary key of CinematicSequences.dbc.

CinematicCamera.dbc

The cinematic camera table contains definitions for models to be used in cinematics.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 model String • The path for the modelfile name.

3 soundEntry Integer 0 The sound entry to beplaying while the cin-ematic is running.

4 locationX Float 0 X coordinate for thecinematic end-point.

5 locationY Float 0 Y coordinate for thecinematic end-point.

6 locationZ Float 0 Z coordinate for thecinematic end-point.

7 rotation Float 0 Rotation for the cine-matic end-point.

4.1. File Format Guide 329

mangos-zero, Release 0.2.0

Relations

• soundEntry references the primary key of SoundEntries.dbc.

CinematicSequences.dbc

The cinematic sequences table contains definitions for chaining of cinematic cameras.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 soundEntry Integer 0 A sound entry to beplayed for the se-quence.

3 cinematicCamera1 Integer 0 A camera to be used inthe sequence.

4 cinematicCamera2 Integer 0 A camera to be used inthe sequence.

5 cinematicCamera3 Integer 0 A camera to be used inthe sequence.

6 cinematicCamera4 Integer 0 A camera to be used inthe sequence.

7 cinematicCamera5 Integer 0 A camera to be used inthe sequence.

8 cinematicCamera6 Integer 0 A camera to be used inthe sequence.

9 cinematicCamera7 Integer 0 A camera to be used inthe sequence.

10 cinematicCamera8 Integer 0 A camera to be used inthe sequence.

Relations

• soundEntry references the primary key of SoundEntries.dbc.

• cinematicCamera[1-8] references the primary key of CinematicCamera.dbc.

CreatureDisplayInfoExtra.dbc

The creature display information extra table contains extended definitions displaying creatures.

330 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 displayRace Integer 0 References the racefor this creature.

3 sex Integer (signed) 0 See below.4 skin Integer (signed) 0 TODO5 face Integer (signed) 0 TODO6 hairStyle Integer (signed) 0 TODO7 hairColor Integer (signed) 0 TODO8 facialHair Integer (signed) 0 TODO9 NPCItemDisplay1 Integer 0 TODO10 NPCItemDisplay2 Integer 0 TODO11 NPCItemDisplay3 Integer 0 TODO12 NPCItemDisplay4 Integer 0 TODO13 NPCItemDisplay5 Integer 0 TODO14 NPCItemDisplay6 Integer 0 TODO15 NPCItemDisplay7 Integer 0 TODO16 NPCItemDisplay8 Integer 0 TODO17 NPCItemDisplay9 Integer 0 TODO18 flags Integer (signed) 0 See below.19 bakeName String • The model for the

creature.

Fields

sex

• 0: male,

• 1: female.

flags TODO

Relations

• displayRace references the primary key of ChrRaces.dbc.

• NPCItemDisplay[1-9] references the primary key of ItemDisplayInfo.dbc.

CreatureDisplayInfo.dbc

The creature display information table contains definitions for textures, scales, models and other data required todisplay a creature.

4.1. File Format Guide 331

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 model Integer 0 References a displaymodel.

3 sound Integer 0 References a soundentry.

4 extendedDisplayInfo Integer 0 References an extradisplay model.

5 creatureModelScale Float 1 Default scale, if notset by server. 1 is thenormal size.

5 creatureModelAlpha Integer (signed) 255 0 (transparent) to 255(opaque).

6 textureVariation1 String • Skin used in themodel.

7 textureVariation2 String • Skin used in themodel.

8 textureVariation3 String • Skin used in themodel.

9 sizeClass Integer (signed) 0 See below.10 blood Integer 0 Blood effect to be

used for the NPC.11 NPCSound Integer 0, Sounds used when

interacting with theNPC.

Fields

sizeClass

• 0: small,

• 1: medium,

• 2: large,

• 3: giant,

• 4: colossal.

Relations

• model references the primary key of CreatureModelData.dbc.

• sound references the primary key of CreatureSoundData.dbc.

• extendedDisplayInfo references the primary key of CreatureDisplayInfoExtra.dbc.

• blood references the primary key of UnitBlood.dbc.

• NPCSound references the primary key of NPCSounds.dbc.

332 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

CreatureFamily.dbc

The creature family table contains definitions for non-player creatures.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 minScale Float 0 Size modifier for thelevel specified in min-ScaleLevel

3 minScaleLevel Integer (signed) 0 Minimum level to ap-ply minScale to acreature family’s size.

4 maxScale Float 0 Size modifier forthe level specified inmaxScaleLevel

4 maxScaleLevel Integer (signed) 0 Maximum level to ap-ply maxScale to acreature family’s size.

5 petFoodMask Integer (signed) 0 Mask describingwhich food types thecreature family willaccept.

6 petTalentType Integer (signed) 0 The creature familytalent tree.

7 categoryEnum Integer (signed) 0 Seems to be a bit-mask type flag.

8 name String (localized) • Name of the creaturefamily.

10 iconFile String • Icon for the creaturefamily used in the userinterface.

CreatureModelData.dbc

The creature model data table contains definitions for models applied to creatures and settings like collision size.

4.1. File Format Guide 333

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) 0 See below.3 modelName String • Path to the model file.

4 sizeClass Integer (signed) 0 See below.5 modelScale Float 1 Scaling for the model.6 blood Integer (signed) 0 References the blood

type to be displayupon creature hits.

7 footprintTexture Integer (signed) 0 References the type offootprints a creaturewill create.

8 footprintTextureLength Float 0 TODO9 footprintTextureWidth Float 0 TODO10 footprintTextureScale Float 0 TODO11 foleyMaterial Integer (signed) 0 TODO. 0 for all rows.12 footstepShakeSize Integer (signed) 0 TODO13 deathThudShakeSize Integer (signed) 0 TODO14 collisionWidth Float 0 Size of collision

for the model. Hasto be bigger than0.41670012920929,else collision width istoo small.

15 collisionHeight Float 0 Size of collisionfor the model. Hasto be bigger than0.41670012920929,else collision height istoo small.

16 mountHeight Float 0 Size of collision formounted model. Hasto be bigger than0.41670012920929,else collision height istoo small.

Fields

flags

• 0: TODO,

• 1: TODO,

• 2: TODO,

• 4: TODO,

• 8: TODO.

334 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

sizeClass

• 0: small,

• 1: medium,

• 2: large,

• 3: giant,

• 4: colossal.

Relations

• blood references the primary key of UnitBlood.dbc.

• footprintTexture references the primary key of FootprintTextures.dbc.

CreatureSoundData.dbc

The creature sound data table contains definitions for which sounds should be used for a creature.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 soundExertion Integer 0 Sound played for thisevent.

3 soundExertionCritical Integer 0 Sound played for thisevent.

4 soundInjury Integer 0 Sound played for thisevent.

5 soundInjuryCritical Integer 0 Sound played for thisevent.

6 soundInjuryCrushingBlowInteger 0 Sound played for thisevent.

7 soundDeath Integer 0 Sound played for thisevent.

8 soundStun Integer 0 Sound played for thisevent.

9 soundStand Integer 0 Sound played for thisevent.

10 soundFootstep Integer 0 Sound played for thisevent.

11 soundAggro Integer 0 Sound played for thisevent.

12 soundWingFlap Integer 0 Sound played for thisevent.

13 soundWingGlide Integer 0 Sound played for thisevent.

Continued on next page

4.1. File Format Guide 335

mangos-zero, Release 0.2.0

Table 4.3 – continued from previous pageID Name Type Default Description14 soundAlert Integer 0 Sound played for this

event.15 soundFidget Integer 0 Sound played for this

event.16 customAttack Integer 0 Sound played for this

event.17 NPCSound Integer 0 Sound played for this

event.18 loopSound Integer 0 Sound played for this

event.19 creatureImpactType Integer (signed) 0 TODO20 soundJumpStart Integer 0 Sound played for this

event.21 soundJumpEnd Integer 0 Sound played for this

event.22 soundPetAttack Integer 0 Sound played for this

event.23 soundPetOrder Integer 0 Sound played for this

event.24 soundPetDismiss Integer 0 Sound played for this

event.25 fidgetDelaySecondsMin Integer (signed) 0 Delay for fidgeting

sound.26 fidgetDelaySecondsMax Integer (signed) 0 Delay for fidgeting

sound.27 birthSound Integer 0 Sound played for this

event.28 spellCastDirectedSound Integer 0 Sound played for this

event.29 submergeSound Integer 0 Sound played for this

event.30 submergedSound Integer 0 Sound played for this

event.

Fields

creatureImpactType TODO

Relations

• soundExertion, soundExertionCritical, soundInjury, soundInjuryCritical,soundInjuryCrushingBlow, soundDeath, soundStun, soundStand, soundFootstep,soundAggro, soundWingFlap, soundWingGlide and soundAlert reference the primary key ofSoundEntries.dbc.

CreatureSpellData.dbc

The creature spell data table contains definitions for the spells a creature has access to. This table specifically targetscreatures which can be tamed.

336 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 spell1 Integer 0 References a spell thecreature has access to.

3 spell2 Integer 0 References a spell thecreature has access to.

4 spell3 Integer 0 References a spell thecreature has access to.

5 spell4 Integer 0 References a spell thecreature has access to.

6 cooldownTime1 Integer (signed) 0 Cool-down for spell1.7 cooldownTime2 Integer (signed) 0 Cool-down for spell2.8 cooldownTime3 Integer (signed) 0 Cool-down for spell3.9 cooldownTime4 Integer (signed) 0 Cool-down for spell4.

Relations

• spell[1-4] references the primary key of Spell.dbc.

Notes

To calculate the actual cool-down time in human readable form, divide cooldownTime by 10 to get time in seconds.

CreatureType.dbc

The creature type table contains definitions for available non-player creature types.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • Name of the Creature.

3 flags Integer (signed) 0 See below.

Fields

flags Determines if a creature type is worth experience points.

• 0: yes,

• 1: no

4.1. File Format Guide 337

mangos-zero, Release 0.2.0

DeathThudLookups.dbc

The death thud lookups table defines which models and sounds should be used when a creature dies, depending on it’ssize.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 sizeClass Integer (signed) 0 See below.3 terrainType Integer 0 Type of terrain.4 soundEntry Integer 0 Dirt sound effect.5 soundEntryWater Integer 0 Water sound effect.

Fields

sizeClass

• 0: small,

• 1: medium,

• 2: large,

• 3: giant,

• 4: colossal.

Relations

• terrainType references the primary key of TerrainType.dbc.

• soundEntry and soundEntryWater reference the primary key of SoundEntries.dbc.

DurabilityCosts.dbc

The durability costs table contains definitions for modifiers to weapons and armor.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2-22 weaponSubClassCost Integer (signed) 0 TODO23-30 armorSubClassCost Integer (signed) 0 TODO

Fields

weaponSubClassCost TODO

338 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

armorSubClassCost TODO

Relations

TODO

DurabilityQuality.dbc

The durability quality table contains definitions for suspected modifiers for how much damage an item can take beforelosing durability.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 data Float 0 Perhaps a modifier tohow much damage anitem can take beforelosing each durabilitypoint.

Fields

data TODO

Relations

TODO

Emotes.dbc

The emotes table contains definitions for available /emote commands.

4.1. File Format Guide 339

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 emoteSlashCommand String • The emote commandname, as referencedin-game, e.g. in Lua.

3 animationData Integer 0 The animation to playwhen executing theemote.

4 emoteFlags Integer (signed) 0 See below.5 emoteSpecProc Integer (signed) 0 See below.6 emoteSpecProcParam Integer (signed) 0 Last frame of the

emote animation.7 eventSoundEntry Integer 0 The sound to be

played while execut-ing the emote.

Fields

emoteFlags

• 0000 0000 0000 1000 / 8: Talk,

• 0000 0000 0001 0000 / 16: Question,

• 0000 0000 0010 0000 / 32: Exclamation,

• 0000 0000 0100 0000 / 64: Shout,

• 0000 0001 0000 0000 / 256: Laugh.

emoteSpecProc

• 0: perform emote once,

• 1: loop emote,

• 2: loop emote with sound.

Relations

• animationData references the primary key of AnimationData.dbc.

• eventSoundEntry references the primary key of SoundEntries.dbc.

EmotesTextData.dbc

The emotes text data table contains definitions for actual text emotes to display in-game when slash commands areexecuted.

340 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 text String (localized) • The emote chat text.

EmotesText.dbc

The emotes text table contains definitions for linking emote animations with emote texts.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • Name of the emote asused in in-game chat.

3 emote Integer 0 References the emotedefinition.

4 emoteTextData1 Integer 0 The text to display.5 emoteTextData2 Integer 0 The text to display.6 emoteTextData3 Integer 0 The text to display.7 emoteTextData4 Integer 0 The text to display.8 emoteTextData5 Integer 0 The text to display.9 emoteTextData6 Integer 0 The text to display.10 emoteTextData7 Integer 0 The text to display.11 emoteTextData8 Integer 0 The text to display.12 emoteTextData9 Integer 0 The text to display.13 emoteTextData10 Integer 0 The text to display.14 emoteTextData11 Integer 0 The text to display.15 emoteTextData12 Integer 0 The text to display.16 emoteTextData13 Integer 0 The text to display.17 emoteTextData14 Integer 0 The text to display.18 emoteTextData15 Integer 0 The text to display.19 emoteTextData16 Integer 0 The text to display.

Relations

• emote references the primary key of Emotes.dbc.

• emoteTextData[1-16] reference the primary key of EmotesTextData.dbc.

EmotesTextSound.dbc

The emotes text sound table contains definitions for which sound entries are connected to which emote text.

4.1. File Format Guide 341

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 emotesText Integer 0 The emotes text towhich the sound ap-plies.

3 race Integer 0 The race to which theemote sound applies.

4 sex Integer (signed) 0 See below.5 sound Integer 0 The sound to be

played.

Fields

sex

• 0: male,

• 1: female.

Relations

• emotesText references the primary key of EmotesText.dbc.

• race references the primary key of ChrRaces.dbc.

• sound references the primary key of SoundEntries.dbc.

EnvironmentalDamage.dbc

The environmental damage table contains definitions which connect environmental damage to a spell visual.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 enum Integer (signed) 0 References an ID asdefined in the gameclient.

3 spellVisualKit Integer 0 The spell visual to dis-play.

Relations

• spellVisualKit references the primary key of SpellVisualKit.dbc.

342 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Exhaustion.dbc

The exhaustion table contains definitions for character states which modify gaining experience.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 experience Integer (signed) 0 TODO3 factor Float 0 Rate at which experi-

ence is gained in thisstate.

4 outdoorHours Float 0 TODO5 innHours Float 0 TODO6 name String (localized) • Name of the character

state.

7 threshold Float 0 TODO

Fields

experience TODO

outdoorHours TODO

innHours TODO

threshold TODO

FactionGroup.dbc

The faction group table contains definitions for grouping faction templates into the “bigger picture”.

4.1. File Format Guide 343

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 maskID Integer (signed) 0 The ID which is re-ferred to by factiontemplates.

3 internalName String • The faction groupname as internallyused, e.g. in Luaadd-ons.

4 name String (localized) • The faction groupname as displayin-game.

Faction.dbc

The faction table contains definitions for in-game factions for non-player creatures.

344 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 reputationIndex Integer (signed) • The unique faction in-dex.

3 reputationRaceMask1 Integer (signed) 0 See below.4 reputationRaceMask2 Integer (signed) 0 See below.5 reputationRaceMask3 Integer (signed) 0 See below.6 reputationRaceMask4 Integer (signed) 0 See below.7 reputationClassMask1 Integer (signed) 0 See below.8 reputationClassMask2 Integer (signed) 0 See below.9 reputationClassMask3 Integer (signed) 0 See below.10 reputationClassMask4 Integer (signed) 0 See below.11 reputationBase1 Integer (signed) 0 Base reputation value.12 reputationBase2 Integer (signed) 0 Base reputation value.13 reputationBase3 Integer (signed) 0 Base reputation value.14 reputationBase4 Integer (signed) 0 Base reputation value.15 reputationFlags1 Integer (signed) 0 See below.16 reputationFlags2 Integer (signed) 0 See below.17 reputationFlags3 Integer (signed) 0 See below.18 reputationFlags4 Integer (signed) 0 See below.19 parentFaction Integer 0 If non-zero, the fac-

tion is a child of thisfaction.

20 name String (localized) • The name of the fac-tion.

21 description String (localized) • The description of thefaction.

Fields

reputationIndex Available in-game to Lua add-ons. A value of -1 indicates a faction for which no reputation canbe gained. This includes attackable creatures and creatures used in events.

reputationRaceMask

• 0000 0001 / 1: Human,

• 0000 0010 / 2: Orc,

• 0000 0100 / 4: Dwarf,

• 0000 1000 / 8: Night Elf,

• 0001 0000 / 16: Undead,

• 0010 0000 / 32: Tauren,

• 0100 0000 / 64: Gnome,

• 1000 0000 / 128: Troll.

4.1. File Format Guide 345

mangos-zero, Release 0.2.0

reputationClassMask Currently this is only set for the Cenarion Circle, which Night Elf and Tauren druids aremembers of.

reputationFlags

• 0x01: makes the reputation visible in the game client,

• 0x02: enables “At war” button,

• 0x04: hides faction in game client,

• 0x08: forces to hide a faction in game client,

• 0x10: forces player at peace with a faction,

• 0x20: sets a faction to inactive.

Relations

• parentFaction references the primary key of Faction.dbc.

FactionTemplate.dbc

The faction template table contains definitions for grouping factions into reusable templates which are referred to bygame data.

346 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 faction Integer 0 The faction top whichthe template applies.

3 flags Integer (signed) 0 See below.4 factionGroup Integer 0 The faction group to

which this faction be-longs.

5 friendGroup Integer 0 A faction group atpeace.

6 enemyGroup Integer 0 A faction group atwar.

7 enemies1 Integer 0 References a factionat war.

8 enemies2 Integer 0 References a factionat war.

9 enemies3 Integer 0 References a factionat war.

10 enemies4 Integer 0 References a factionat war.

11 friend1 Integer 0 References a friendlyfaction.

12 friend2 Integer 0 References a friendlyfaction.

13 friend3 Integer 0 References a friendlyfaction.

14 friend4 Integer 0 References a friendlyfaction.

Fields

flags

• 0x800: flagged for PvP,

• 0x1000: faction will attack players engaging in PvP

Relations

• factionGroup references the primary key of FactionGroup.dbc.

• faction, enemies[1-4] and friend[1-4] reference the primary key of Faction.dbc.

FootprintTextures.dbc

The footprint textures table contains definitions for textures used to display footprints.

4.1. File Format Guide 347

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 footstepFilename String (localized) • The path for the foot-print texture file.

FootstepTerrainLookup.dbc

The footstrep terrain lookup table contains definitions for matching footsteps with visuals and sounds.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 creatureFootstep Integer 0 The footstep doodad.3 terrainType Integer 0 The terrain type to

which this applies.4 soundEntry Integer 0 Sound for dry terrain.5 soundEntrySplash Integer 0 Sound for wet terrain.

Relations

• creatureFootstep references the primary key of GroundEffectDoodad.dbc.

• terrainType references the primary key of TerrainType.dbc.

• soundEntry and soundEntrySplash reference the primary key of SoundEntries.dbc.

GameObjectArtKit.dbc

The game object art kit table contains definitions for models used by outdoor PvP flags.

348 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 textureVariation1 String • The texture type touse.

3 textureVariation2 String • The texture type touse.

4 textureVariation3 String • The texture type touse.

5 attachModel1 String • The path to the modelwhich should be used.

6 attachModel2 String • The path to the modelwhich should be used.

7 attachModel3 String • The path to the modelwhich should be used.

8 attachModel4 String • The path to the modelwhich should be used.

GameObjectDisplayInfo.dbc

The game object display information table links display IDs to combinations of models and sounds.

4.1. File Format Guide 349

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 modelName String • The path to the modelfor the game object.

3 soundEntry1 Integer 0 A sound for the stateSTAND.

4 soundEntry2 Integer 0 A sound for the stateOPEN.

5 soundEntry3 Integer 0 A sound for the stateLOOP.

6 soundEntry4 Integer 0 A sound for the stateCLOSE.

7 soundEntry5 Integer 0 A sound for the stateDESTROY.

8 soundEntry6 Integer 0 A sound for the stateOPENED.

9 soundEntry7 Integer 0 A sound for the stateCUSTOM0.

10 soundEntry8 Integer 0 A sound for the stateCUSTOM1.

11 soundEntry9 Integer 0 A sound for the stateCUSTOM2.

12 soundEntry10 Integer 0 A sound for the stateCUSTOM3.

Relations

• soundEntry[1-10] reference the primary key of SoundEntries.dbc.

GameTips.dbc

The game tips table contains definitions for game tips displayed on the world loading screen to players.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 text String (localized) • The text of the gametip.

Notes

The text for a game tip needs to be parsed with a regular expression to extract color, title and actual tip from the text.

350 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

GMSurveyCurrentSurvey.dbc

The game master current survey table connects current game master surveys to client languages.

Table structure

ID Name Type Default Description1 language Integer 0 See below.2 gmSurvey Integer 0 The current survey for a given language.

Fields

langID

• 0: English

• 1: Korean

• 2: French

• 3: German

• 4: Chinese

• 5: Taiwanese

• 6: Spanish - Spain

• 7: Spanish - Latin America

Relations

• gmSurvey references the primary key of GMSurveySurveys.dbc.

GMSurveyQuestions.dbc

The game master survey questions table contains questions to be asked during a game master survey, which is usuallyissued after a ticket is closed.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 question String (localized) • The question to beasked.

GMSurveySurveys.dbc

The game master surveys table contains definitions for questions contained in a survey.

4.1. File Format Guide 351

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 question1 Integer 0 A question to beasked.

3 question2 Integer 0 A question to beasked.

4 question3 Integer 0 A question to beasked.

5 question4 Integer 0 A question to beasked.

6 question5 Integer 0 A question to beasked.

7 question6 Integer 0 A question to beasked.

8 question7 Integer 0 A question to beasked.

9 question8 Integer 0 A question to beasked.

10 question9 Integer 0 A question to beasked.

11 question10 Integer 0 A question to beasked.

Relations

• question[1-10] reference the primary key of GMSurveyQuestions.dbc.

GMTicketCategory.dbc

The game master ticket category table contains definitions for categories in which in-game tickets can be created.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 category String (localized) • The name of the ticketcategory.

GroundEffectDoodad.dbc

The ground effect doodad table contains definitions for doodads to be placed on the ground, specifically flower models.

352 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 internalID Integer (signed) 0 Internal ID.3 doodadPath String • The path to the doo-

dad model.

GroundEffectTexture.dbc

The ground effect doodad texture table connects terrain types to flower doodads.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 doodad1 Integer (signed) 0 References a groundeffect doodad to beused.

3 doodad2 Integer (signed) 0 References a groundeffect doodad to beused.

4 doodad3 Integer (signed) 0 References a groundeffect doodad to beused.

5 doodad4 Integer (signed) 0 References a groundeffect doodad to beused.

6 density Integer (signed) 0 The density for thetexture.

7 terrainType Integer 0 The terrain type to beused.

Relations

• doodad[1-4] reference the primary key of GroundEffectDoodad.dbc.

• terrainType references the primary key of TerrainType.dbc.

HelmetGeosetVisData.dbc

The helmet geoset visibility data table contains definitions for which parts of helmets should be (in-)visible.

4.1. File Format Guide 353

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 hideGeoset1 Integer (signed) 0 Part of the helmetgeoset to hide. Prob-ably hair related.

3 hideGeoset2 Integer (signed) 0 Part of the helmetgeoset to hide. Prob-ably face related.

4 hideGeoset3 Integer (signed) 0 Part of the helmetgeoset to hide. Prob-ably face related.

5 hideGeoset4 Integer (signed) 0 Part of the helmetgeoset to hide. Prob-ably face related.

6 hideGeoset5 Integer (signed) 0 Part of the helmetgeoset to hide. Prob-ably ear related.

ItemBagFamily.dbc

The item bag family table contains definitions for item bag families.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the itembag family.

ItemClass.dbc

The item class table contains definitions for available item classes.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 subclassMap Integer 0 References the itemsubclass.

3 flags Integer (signed) 0 See below.4 className String (localized) • The name of the item

class.

354 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Fields

flags

• 0: item,

• 1: weapon.

Relations

• subclassMap references the primary key of ItemSubClass.dbc.

ItemDisplayInfo.dbc

The item display info table contains definitions for model and spell data for items.

4.1. File Format Guide 355

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 modelName1 String • The path to the modelof the left side.

3 modelName2 String • The path to the modelof the right side.

4 modelTexture1 String • Name of the texture ofthe left side.

5 modelTexture2 String • Name of the texture ofthe right side.

6 inventoryIcon1 String • Icon to be displayed inthe in-game user inter-face.

7 inventoryIcon2 String • Alternative icon to bedisplayed in the in-game user interface.

8 geosetGroup1 Integer (signed) 0 TODO9 geosetGroup2 Integer (signed) 0 TODO10 geosetGroup3 Integer (signed) 0 TODO11 spellVisual Integer 0 TODO12 groupSoundIndex Integer (signed) 0 Sound used when

dropping the icon inthe inventory.

13 helmetGeosetVis1 Integer 0 TODO14 helmetGeosetVis2 Integer 0 TODO15 texture1 String • The texture name for

the upper arm.

16 texture2 String • The texture name forthe lower arm.

17 texture3 String • The texture name forthe hands.

18 texture4 String • The texture name forthe upper torso.

19 texture5 String • The texture name forthe lower torso.

20 texture6 String • The texture name forthe upper leg.

21 texture7 String • The texture name forthe lower leg.

22 texture8 String • The texture name forthe foot.

23 itemVisual Integer (signed) 0 References the en-chant used for theitem.

356 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Relations

• spellVisual references the primary key of SpellVisual.dbc.

• groupSoundIndex references the primary key of ItemGroupSounds.dbc.

• helmetGeosetVis[1-2] reference the primary key of HelmetGeosetVisData.dbc.

• itemVisual references the primary key of ItemVisuals.dbc.

ItemGroupSounds.dbc

The item group sounds table contains definitions for groups of sounds that are used for items.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 soundEntry1 Integer 0 Sound to play whenitem is picked up.

3 soundEntry2 Integer 0 Sound to play whenitem is put down.

4 soundEntry3 Integer 0 TODO5 soundEntry4 Integer 0 TODO

Relations

• soundEntry[1-4] reference the primary key of SoundEntries.dbc.

ItemPetFood.dbc

The item pet food table contains definitions for pet food types.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the petfood type.

ItemRandomProperties.dbc

The item random properties table contains definitions for enchants assigned to items.

4.1. File Format Guide 357

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name of the en-chantment.

3 spellItemEnchantment1 Integer 0 References an itemenchantment for thisproperty.

4 spellItemEnchantment2 Integer 0 References an itemenchantment for thisproperty.

5 spellItemEnchantment3 Integer 0 References an itemenchantment for thisproperty.

6 spellItemEnchantment4 Integer 0 References an itemenchantment for thisproperty.

7 spellItemEnchantment5 Integer 0 References an itemenchantment for thisproperty.

8 suffix String (localized) • The enchantment suf-fix displayed in-game.

Relations

• spellItemEnchantment[1-5] references the primary key of SpellItemEnchantment.dbc.

ItemSet.dbc

The item set table contains definitions for item sets.

Table structure

ID Name Type Default Description1 ID Integer (signed)

•Unique ID

2 name String (localized)•

The name of the itemset.

3 item1 Integer 0 Item which belongs tothe set

4 item2 Integer 0 Item which belongs tothe set

5 item3 Integer 0 Item which belongs tothe set

Continued on next page

358 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.4 – continued from previous pageID Name Type Default Description6 item4 Integer 0 Item which belongs to

the set7 item5 Integer 0 Item which belongs to

the set8 item6 Integer 0 Item which belongs to

the set9 item7 Integer 0 Item which belongs to

the set10 item8 Integer 0 Item which belongs to

the set11 item9 Integer 0 Item which belongs to

the set12 item10 Integer 0 Item which belongs to

the set13 bankItem1 Integer 0 Item which belongs to

the set14 bankItem2 Integer 0 Item which belongs to

the set15 bankItem3 Integer 0 Item which belongs to

the set16 bankItem4 Integer 0 Item which belongs to

the set17 bankItem5 Integer 0 Item which belongs to

the set18 bankItem6 Integer 0 Item which belongs to

the set19 bankItem7 Integer 0 Item which belongs to

the set20 setSpell1 Integer (signed) 0 A spell part of the set.21 setSpell2 Integer (signed) 0 A spell part of the set.22 setSpell3 Integer (signed) 0 A spell part of the set.23 setSpell4 Integer (signed) 0 A spell part of the set.24 setSpell5 Integer (signed) 0 A spell part of the set.25 setSpell6 Integer (signed) 0 A spell part of the set.26 setSpell7 Integer (signed) 0 A spell part of the set.27 setSpell8 Integer (signed) 0 A spell part of the set.28 setThreshold1 Integer 0 Number of set items

required to cast set-Spell1.

29 setThreshold2 Integer 0 Number of set itemsrequired to cast set-Spell2.

30 setThreshold3 Integer 0 Number of set itemsrequired to cast set-Spell3.

31 setThreshold4 Integer 0 Number of set itemsrequired to cast set-Spell4.

Continued on next page

4.1. File Format Guide 359

mangos-zero, Release 0.2.0

Table 4.4 – continued from previous pageID Name Type Default Description32 setThreshold5 Integer 0 Number of set items

required to cast set-Spell5.

33 setThreshold6 Integer 0 Number of set itemsrequired to cast set-Spell6.

34 setThreshold7 Integer 0 Number of set itemsrequired to cast set-Spell7.

35 setThreshold8 Integer 0 Number of set itemsrequired to cast set-Spell8.

36 requiredSkill Integer (signed) 0 Skill required to usethe set.

37 requiredSkillRank Integer 0 Skill rank required touse the set.

Relations

• item[1-10] reference the primary key of an “item_template” table.

• setSpell[1-8] reference the primary key of Spell.dbc.

• requiredSkill references the primary key of SkillLine.dbc.

ItemSubClassMask.dbc

The item sub class mask table contains definitions for grouping weapons and armour into sub classes.

Table structure

ID Name Type Default Description1 subClass Integer • Unique ID

2 mask Integer (signed) 0 Sub class ID.3 name String (localized) • The name of the mask.

Relations

• subClass references the key subClass of ItemSubClass.dbc.

ItemSubClass.dbc

The item subclass table contains definitions for child classes of item classes.

360 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 itemClass Integer (signed) 0 References the parent

item class.2 subClass Integer (signed) 0 The item subclasses

ID.3 prerequisiteProficiency Integer (signed) 0 TODO4 postrequisiteProficiency Integer (signed) 0 TODO5 flags Integer (signed) 0 See below6 displayFlags Integer (signed) 0 See below.7 weaponParrySeq Integer (signed) 0 TODO8 weaponReadySeq Integer (signed) 0 TODO9 weaponAttackSeq Integer (signed) 0 TODO10 weaponSwingSize Integer (signed) 0 Melee slots required.11 displayName String (localized) • The name of the item

sub class.

12 verboseName String (localized) • The detailed name ofthe item sub class, e.g.for Axes, there is One-Handed Axes as subclass.

Fields

flags TODO

displayFlags TODO

Relations

• itemClass references the primary key of ItemClass.dbc.

ItemVisualEffects.dbc

The item visual effects table contains definitions for models used to display visual effects on items.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 model String • The path to the modelused.

4.1. File Format Guide 361

mangos-zero, Release 0.2.0

ItemVisuals.dbc

The item visuals table contains definitions for sets of item enchantment effects.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 itemVisualEffects1 Integer 0 References the itemenchantment visual toapply.

3 itemVisualEffects2 Integer 0 References the itemenchantment visual toapply.

4 itemVisualEffects3 Integer 0 References the itemenchantment visual toapply.

5 itemVisualEffects4 Integer 0 References the itemenchantment visual toapply.

6 itemVisualEffects5 Integer 0 References the itemenchantment visual toapply.

Relations

• itemVisualEffects[1-5] references the primary key of ItemVisualEffects.dbc.

Languages.dbc

The languages table contains definitions for in-game languages.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The language name.

LanguageWords.dbc

The language words table contains definitions for syllables connected to specific in-game languages. These are mostlyused when a character can not understand a language.

362 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 language Integer 0 The language used.3 word String • The language syllable.

Relations

• language references the primary key of Languages.dbc.

LFGDungeons.dbc

The looking for dungeon group table contains definitions for areas in which characters can group up via in-game LFG.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the area.

3 hardLevelMin Integer 0 Minimum level re-quired to group forthis area.

4 hardLevelMax Integer 0 Maximum level al-lowed to group for thisarea.

5 instanceType Integer (signed) 0 See below.6 faction Integer (signed) 0 See below.

Fields

instanceType

• 1: group instance,

• 2: raid group instance,

• 4: world zone,

• 5: battleground.

Note: Only zones listed as group instance could be accessed via meeting stones or innkeepers for the Looking ForGroup feature.

4.1. File Format Guide 363

mangos-zero, Release 0.2.0

faction

• -1: faction independent,

• 0: Horde faction,

• 1: Alliance faction.

LightFloatBand.dbc

The light float band table contains definitions for daytime modifiers of lighting.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 num Integer (signed) 0 Number of lightingmodifiers set.

3 time1 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

4 time2 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

5 time3 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

6 time4 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

7 time5 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

8 time6 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

Continued on next page

364 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.5 – continued from previous pageID Name Type Default Description9 time7 Integer (signed) 0 Time Values from 0

to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

10 time8 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

11 time9 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

12 time10 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

13 time11 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

14 time12 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

15 time13 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

16 time14 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

17 time15 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

18 time16 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

Continued on next page

4.1. File Format Guide 365

mangos-zero, Release 0.2.0

Table 4.5 – continued from previous pageID Name Type Default Description19 data1 Float 0 Modifier correspond-

ing with the timevalue.

20 data2 Float 0 Modifier correspond-ing with the timevalue.

21 data3 Float 0 Modifier correspond-ing with the timevalue.

22 data4 Float 0 Modifier correspond-ing with the timevalue.

23 data5 Float 0 Modifier correspond-ing with the timevalue.

24 data6 Float 0 Modifier correspond-ing with the timevalue.

25 data7 Float 0 Modifier correspond-ing with the timevalue.

26 data8 Float 0 Modifier correspond-ing with the timevalue.

27 data9 Float 0 Modifier correspond-ing with the timevalue.

28 data10 Float 0 Modifier correspond-ing with the timevalue.

29 data11 Float 0 Modifier correspond-ing with the timevalue.

30 data12 Float 0 Modifier correspond-ing with the timevalue.

31 data13 Float 0 Modifier correspond-ing with the timevalue.

32 data14 Float 0 Modifier correspond-ing with the timevalue.

33 data15 Float 0 Modifier correspond-ing with the timevalue.

34 data16 Float 0 Modifier correspond-ing with the timevalue.

366 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Notes

Controls the various values that are related to floats in .LIT files which was believed just to be the sky positions. Thereare 6 rows corresponding to every ID so take the ID*6 to get the proper start ID to look at it and the next 5 rows afterit go along with it as well.

LightIntBand.dbc

The light integer band table contains definitions for daytime modifiers of lighting.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 num Integer (signed) 0 Number of lightingmodifiers set.

3 time1 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

4 time2 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

5 time3 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

6 time4 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

7 time5 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

8 time6 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

Continued on next page

4.1. File Format Guide 367

mangos-zero, Release 0.2.0

Table 4.6 – continued from previous pageID Name Type Default Description9 time7 Integer (signed) 0 Time Values from 0

to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

10 time8 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

11 time9 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

12 time10 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

13 time11 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

14 time12 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

15 time13 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

16 time14 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

17 time15 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

18 time16 Integer (signed) 0 Time Values from 0to 2880 where eachnumber represents ahalf minute from mid-night to midnight.

Continued on next page

368 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.6 – continued from previous pageID Name Type Default Description19 data1 Integer (signed) 0 Modifier correspond-

ing with the timevalue.

20 data2 Integer (signed) 0 Modifier correspond-ing with the timevalue.

21 data3 Integer (signed) 0 Modifier correspond-ing with the timevalue.

22 data4 Integer (signed) 0 Modifier correspond-ing with the timevalue.

23 data5 Integer (signed) 0 Modifier correspond-ing with the timevalue.

24 data6 Integer (signed) 0 Modifier correspond-ing with the timevalue.

25 data7 Integer (signed) 0 Modifier correspond-ing with the timevalue.

26 data8 Integer (signed) 0 Modifier correspond-ing with the timevalue.

27 data9 Integer (signed) 0 Modifier correspond-ing with the timevalue.

28 data10 Integer (signed) 0 Modifier correspond-ing with the timevalue.

29 data11 Integer (signed) 0 Modifier correspond-ing with the timevalue.

30 data12 Integer (signed) 0 Modifier correspond-ing with the timevalue.

31 data13 Integer (signed) 0 Modifier correspond-ing with the timevalue.

32 data14 Integer (signed) 0 Modifier correspond-ing with the timevalue.

33 data15 Integer (signed) 0 Modifier correspond-ing with the timevalue.

34 data16 Integer (signed) 0 Modifier correspond-ing with the timevalue.

4.1. File Format Guide 369

mangos-zero, Release 0.2.0

Notes

Controls the various values that are related to floats in .LIT files which was believed just to be the sky positions. Thereis 18 rows corresponding to every ID so take the ID*18 to get the proper start ID to look at it and the next 17 rowsafter it go along with it as well

To get the right ID out from Light.dbc (skyParam) you need to calculate it the following way:

𝑖𝑑𝐿𝑖𝑔ℎ𝑡𝐼𝑛𝑡𝐵𝑎𝑛𝑑 = 𝑙𝑖𝑔ℎ𝑡𝐸𝑛𝑡𝑟𝑦.𝑠𝑘𝑦𝑃𝑎𝑟𝑎𝑚 * 18− 17

The reason is that DBCs always start with entry 1 and in computer fields you usually have 0 as primary index.

LightParams.dbc

The light params table contains definitions for settings which don’t change with time for light, fog and water.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 highlightSky Integer (signed) 0 See below.3 lightSkybox Integer 0 The sky box used.4 glow Float 0 This controls how

much Fog gets addedto everything (!) andis used in some placesto make them lookextra bright.

5 waterShallowAlpha Float 0 Controls how trans-parent the water is forlakes & rivers.

6 waterDeepAlpha Float 0 Controls how trans-parent the water is forlakes & rivers.

7 oceanShallowAlpha Float 0 Controls how trans-parent the water is forthe ocean.

8 oceanDeepAlpha Float 0 Controls how trans-parent the water is forthe ocean.

9 flags Integer 0 See below.

Fields

highlightSky

• 0: false,

• 1: true.

flags TODO

370 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Relations

• lightSkybox references the primary key of LightSkybox.dbc.

Light.dbc

The light table contains definitions for lights, fogs, sky color, water color, etc.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 References the map towhich the lighting ap-plies.

3 locationX Float 0 X coordinate for thelighting.

4 locationY Float 0 Y coordinate for thelighting.

5 locationZ Float 0 Z coordinate for thelighting.

6 falloffStart Float 0 If within the inner ra-dius there shouldn’tbe any interpolationwith other lights.

7 falloffEnd Float 0 If outside the innerradius but inside theouter radius then thislight can be interpo-lated with other lights.

8 lightParams1 Integer 0 References the lightparameters used forsky & fog.

9 lightParams2 Integer 0 References the lightparameters used forwater.

10 lightParams3 Integer 0 References the lightparameters used forsunset.

11 lightParams4 Integer 0 References the lightparameters used formisc.

12 lightParams5 Integer 0 References the lightparameters used fordeath.

Relations

• map references the primary key of Map.dbc.

4.1. File Format Guide 371

mangos-zero, Release 0.2.0

• lightParams[1-5] reference the primary key of LightParams.dbc.

Notes

𝑝𝑜𝑠.𝑥 = 17066.666− 𝑝𝑜𝑠.𝑥/36.0𝑓 ; 𝑝𝑜𝑠.𝑦 = 17066.666− 𝑝𝑜𝑠.𝑦/36.0𝑓 ; 𝑝𝑜𝑠.𝑧 = 𝑝𝑜𝑠.𝑧/36.0𝑓 ; 𝑓𝑎𝑙𝑙𝑜𝑓𝑓𝑆𝑡𝑎𝑟𝑡 = 𝑓𝑎𝑙𝑙𝑜𝑓𝑓𝑆𝑡𝑎𝑟𝑡/36.0𝑓 ; 𝑓𝑎𝑙𝑙𝑜𝑓𝑓𝐸𝑛𝑑 = 𝑓𝑎𝑙𝑙𝑜𝑓𝑓𝐸𝑛𝑑/36.0𝑓 ;

LightSkybox.dbc

The light skybox table contains definitions for models used as sky box.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • Path to the sky boxmodel.

LiquidType.dbc

The liquid type table contains definitions for which effects liquid types should have.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name of the liquidtype.

3 type Integer (signed) 0 See below.4 spell Integer 0 The spell to be cast

when a character is oncontact with this liq-uid type.

Fields

type

• 0: fire,

• 2: slime,

• 4: water.

372 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Relations

• spell references the primary key of Spell.dbc.

Notes

The liquid type table has specifically been introduced for the Naxxramas raid zone to account for the slime which hasan effect on the characters in it, unlike normal slime liquid.

LoadingScreens.dbc

The loading screens table contains definitions for available zone loading screens.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name of the load-ing screen.

3 fileName String • The path to the load-ing screen image.

LoadingScreenTaxiSplines.dbc

The loading screen taxi splines table contains definitions for paths used by boats and Zeppelins.

4.1. File Format Guide 373

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 taxiPath Integer 0 References the taxipath used.

3 locationX1 Float 0 X coordinate of thepath

4 locationX2 Float 0 X coordinate of thepath

5 locationX3 Float 0 X coordinate of thepath

6 locationX4 Float 0 X coordinate of thepath

7 locationX5 Float 0 X coordinate of thepath

8 locationX6 Float 0 X coordinate of thepath

9 locationX7 Float 0 X coordinate of thepath

10 locationX8 Float 0 X coordinate of thepath

11 locationY1 Float 0 Y coordinate of thepath

12 locationY2 Float 0 Y coordinate of thepath

13 locationY3 Float 0 Y coordinate of thepath

14 locationY4 Float 0 Y coordinate of thepath

15 locationY5 Float 0 Y coordinate of thepath

16 locationY6 Float 0 Y coordinate of thepath

17 locationY7 Float 0 Y coordinate of thepath

18 locationY8 Float 0 Y coordinate of thepath

19 legIndex Integer (signed) 0

Fields

legIndex TODO: seems to be some kind of flag.

• 0: TODO

• 1: TODO

Relations

• taxiPath references the primary key of TaxiPath.dbc.

374 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Lock.dbc

The lock table contains definitions for available locks.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 type1 Integer (signed) 0 See below3 type2 Integer (signed) 0 See below4 type3 Integer (signed) 0 See below5 type4 Integer (signed) 0 See below6 type5 Integer (signed) 0 See below7 type6 Integer (signed) 0 See below8 type7 Integer (signed) 0 See below9 type8 Integer (signed) 0 See below10 property1 Integer (signed) 0 Refers to a lock type,

or an item ID.11 property2 Integer (signed) 0 Refers to a lock type,

or an item ID.12 property3 Integer (signed) 0 Refers to a lock type,

or an item ID.13 property4 Integer (signed) 0 Refers to a lock type,

or an item ID.14 property5 Integer (signed) 0 Refers to a lock type,

or an item ID.15 property6 Integer (signed) 0 Refers to a lock type,

or an item ID.16 property7 Integer (signed) 0 Refers to a lock type,

or an item ID.17 property8 Integer (signed) 0 Refers to a lock type,

or an item ID.18 skill1 Integer (signed) 0 Required skill to un-

lock.19 skill2 Integer (signed) 0 Required skill to un-

lock.20 skill3 Integer (signed) 0 Required skill to un-

lock.21 skill4 Integer (signed) 0 Required skill to un-

lock.22 skill5 Integer (signed) 0 Required skill to un-

lock.23 skill6 Integer (signed) 0 Required skill to un-

lock.24 skill7 Integer (signed) 0 Required skill to un-

lock.25 skill8 Integer (signed) 0 Required skill to un-

lock.Continued on next page

4.1. File Format Guide 375

mangos-zero, Release 0.2.0

Table 4.7 – continued from previous pageID Name Type Default Description26 action1 Integer (signed) 0 References the action

displayed in-game,e.g. opening, closing.

27 action2 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

28 action3 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

29 action4 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

30 action5 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

31 action6 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

32 action7 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

33 action8 Integer (signed) 0 References the actiondisplayed in-game,e.g. opening, closing.

Fields

type This field determine which kind of lock the entry is about.

• 0: none,

• 1: requires an item to unlock,

• 2: matching Index refers to LockType.dbc.

Relations

• property[1-8] may reference the primary key of LockType.dbc if type is 2.

LockType.dbc

The lock type table contains definitions for available lock types.

376 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the locktype.

3 resourceName String (localized) • The resource gatheredby unlocking.

4 verb String (localized) • The action performedwhen using the lock.

5 cursorName String • The icon to displaywhen using the lock.

MailTemplate.dbc

The mail template table contains definitions for mails sent by non-player characters.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 body String (localized) • The mail templatesbody content.

Map.dbc

The map table contains definitions for available maps. Think of continents and instances — these are their own maps— rather than specific zones.

4.1. File Format Guide 377

mangos-zero, Release 0.2.0

378 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 internalName String • The directory namewhere the map filesare located in thegame data archives.

3 instanceType Integer (signed) 0 See below.4 isBattleground Integer (signed) 0 See below.5 mapName String (localized) • The name of the map.

6 minLevel Integer (signed) 0 Minimum level re-quired to enter amap. Only set forbattleground maps.

7 maxLevel Integer (signed) 0 Maximum level al-lowed to enter a map.Only set for battle-ground maps.

8 maxPlayers Integer (signed) 0 Maximum amount ofplayers allowed to en-ter a map. Only set forbattleground maps.

9 field17 Integer (signed) 0 TODO10 field18 Integer (signed) 0 TODO11 field19 Integer (signed) 0 TODO12 areaTable Integer 0 References the area

which is the main areafor the map.

13 mapDescription0 String (localized) • Map description forHorde players.

14 mapDescription1 String (localized) • Map description forAlliance players.

15 loadingScreen Integer 0 References the load-ing screen to be usedfor the map.

16 raidOffset Integer (signed) 0 If set to a value, themap is available inmultiple tiers. This isscaled by taking intoaccount minLevel andmaxLevel and addingraidOffset to them upto the current maxi-mum level for char-acters. Currently thisis only in place forArathi Basin and War-song Gulch.

17 field41 Integer (signed) 0 TODO18 field42 Integer (signed) 0 TODO

4.1. File Format Guide 379

mangos-zero, Release 0.2.0

Fields

instanceType

• 0: normal map,

• 1: group instance map,

• 2: raid instance map,

• 3: battleground instance map.

isBattleground

• 0: map is no PVP map,

• 1: map is a PVP map.

Relations

• areaTable references the primary key of AreaTable.dbc.

• LoadingScreen references the primary key of LoadingScreens.dbc.

Material.dbc

The material table contains definitions for sound to be made by specific materials.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) 0 TODO3 foleySound Integer 0 References to sound

to use for the material.

Fields

flags TODO

Relations

• foleySound references the primary key of SoundEntries.dbc.

NameGen.dbc

The name gen table contains definitions for random names for characters.

380 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • A given randomplayer name.

3 race Integer 0 References a race towhich this applies

4 sex Integer (signed) 0 References the sex towhich this applies.

Fields

sex

• 0: male,

• 1: female.

Relations

• race references the primary key of ChrRaces.dbc.

NamesProfanity.dbc

The names profanity table contains definitions for characters names which are disallowed.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name consideredas profanity.

NamesReserved.dbc

The names reserved table contains definitions for characters names which are reserved for creatures, or unavailabledue to being a real persons name.

4.1. File Format Guide 381

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name or a namepattern reserved.

NPCSounds.dbc

The non-player creature sounds table contains definitions for which sounds a creature will make upon being clicked.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 soundEntry1 Integer (signed) 0 References the soundentry to be played.

3 soundEntry2 Integer (signed) 0 References the soundentry to be played.

4 soundEntry3 Integer (signed) 0 References the soundentry to be played.

5 soundEntry4 Integer (signed) 0 References the soundentry to be played.

Relations

• soundEntry[1-4] reference the primary key of SoundEntries.dbc.

Package.dbc

The package table contains definitions for mail icons.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 icon String • The name of the iconto be used.

3 cost Integer (signed) 0 Price for sending mailin copper.

4 name String (localized) • The name of the pack-age.

382 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

PageTextMaterial.dbc

The page text material table contains definitions for backgrounds used for in-game dialogues.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • The name for the ma-terial

PaperDollItemFrame.dbc

The paper doll item frame table contains definitions for textures used to display the character screen and bags.

Table structure

ID Name Type Default Description1 itemButtonName String • Name of the slot.

2 slotIcon String • The path to the sloticon.

3 slotNumber Integer (signed) 0 The slot number.

PetLoyalty.dbc

The pet loyalty table contains definitions for pet loyalty levels.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the loy-alty level.

PetPersonality.dbc

The pet personality table contains definitions for pet personality levels.

4.1. File Format Guide 383

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the per-sonality level.

3 happinessThreshold1 Integer (signed) 0 Level for pet beingunhappy.

4 happinessThreshold2 Integer (signed) 0 Level for pet beingcontent.

5 happinessThreshold3 Integer (signed) 0 Level for pet beinghappy.

6 happinessDamage1 Float 0 Damage for pet beingunhappy.

7 happinessDamage2 Float 0 Damage for pet beingcontent.

8 happinessDamage3 Float 0 Damage for pet beinghappy.

9 damageModifier1 Float 0 Damage modifier forpet being unhappy.

10 damageModifier2 Float 0 Damage modifier forpet being content.

11 damageModifier3 Float 0 Damage modifier forpet being happy.

QuestInfo.dbc

The quest info table contains definitions for quest types.

Table structure

ID Name Type Default Description1 ID Integer (signed) • Unique ID

2 name String (localized) • The name of the questtype.

QuestSort.dbc

The quest sort table contains definitions for quest categories. Entries from AreaTable.dbc may also be used as questcategories.

384 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer (signed) • Unique ID

2 name String (localized) • The name of the questcategory.

Resistances.dbc

The resistances table contains definitions for available resistance types.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) 0 See below.3 fizzleSoundEntry Integer 0 The sound entry to be

played.4 name String (localized) • The name of the resis-

tance.

Fields

flags

• 0: non-physical damage,

• 1: physical damage

Relations

• fizzleSoundEntry references the primary key of SoundEntries.dbc.

ServerMessages.dbc

The server messages table contains definitions for chat messages sent by the game server.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 text String (localized) • The server messagetext.

4.1. File Format Guide 385

mangos-zero, Release 0.2.0

SheatheSoundLookups.dbc

The sheathe sound lookups table contains definitions for which sound to play when sheathing items.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 itemClass Integer (signed) 0 The item class towhich the soundapplies.

3 itemSubclass Integer (signed) 0 The items subclass towhich the sound ap-plies.

4 itemEnvTypes Integer (signed) 0 See below.5 isShield Integer (signed) 0 See below.6 sheathSound Integer 0 The sound entry to be

played when sheath-ing the item.

7 undsheathSound Integer 0 The sound entry tobe played when un-sheathing the item.

Fields

itemEnvTypes

• 0: shield,

• 1: metal weapon,

• 2: wood weapon.

isShield

• 0: a shield,

• 1: not a shield.

Relations

• itemClass references the primary key of ItemClass.dbc.

• itemSubclass references the primary key of ItemSubClass.dbc.

• sheathSound and sheathSound reference the primary key of SoundEntries.dbc.

SkillCostsData.dbc

The skill costs data table contains definitions for prices of skills.

386 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 skillCosts Integer (signed) 0 TODO3 cost1 Integer (signed) 0 Cost in copper.4 cost2 Integer (signed) 0 Cost in copper.5 cost3 Integer (signed) 0 Cost in copper.

SkillLineAbility.dbc

The skill line ability table contains definitions for skills, spells and the required dependencies.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 skillLine Integer 0 References the theskill to which thisapplies.

3 spell Integer 0 References a spell.4 raceMask Integer (signed) 0 See notes.5 classMask Integer (signed) 0 See notes.6 excludeRace Integer (signed) 0 See notes.7 excludeClass Integer (signed) 0 See notes.8 minSkillLineRank Integer (signed) 0 Minimum skill rank.9 supersededBySpell Integer 0 References a spell

which superseded theability.

10 aquireMethod Integer (signed) 0 See below.11 trivialSkillLineRankHighInteger (signed) 0 Rank when the skill

becomes gray.12 trivialSkillLineRankLow Integer (signed) 0 Rank when the skill is

green.13 characterPoints Integer (signed) 0 TODO14 characterPoints Integer (signed) 0 TODO15 numSkillUps Integer (signed) 0 Skill-ups for this skill.

Fields

aquireMethod

• 0: TODO,

• 1: TODO,

• 2: TODO

4.1. File Format Guide 387

mangos-zero, Release 0.2.0

Relations

• skillLine references the primary key of SkillLine.dbc.

• spell and supersededBySpell reference the primary key of Spell.dbc.

SkillLineCategory.dbc

The skill line category table contains definitions for category of skill lines.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the cate-gory

3 sortIndex Integer (signed) 0 Sets the sort order fordisplaying categoriesin-game.

SkillLine.dbc

The skill line table contains definitions for skills.

Skills include attributes, weapon skills, class skills, armor skills, secondary skills, languages, professions and hiddenskills.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 category Integer (signed) 0 References the skillline category.

3 skillCosts Integer 0 References the skilllearning costs.

4 displayName String (localized) • The name of the skillline.

5 description String (localized) • The description of theskill line.

6 spellIcon Integer 0 References the iconused for the skill line.

Relations

• category references the primary key of SkillLineCategory.dbc.

388 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

• skillCosts references the primary key of SkillCostsData.dbc.

• spellIcon references the primary key of SpellIcon.dbc.

SkillRaceClassInfo.dbc

The skill race/class info table contains definitions for which races / classes have access to what skills.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 skill Integer 0 References the skillline.

3 raceMask Integer (signed) 0 The race.4 classMask Integer (signed) 0 The class.5 flags Integer (signed) 0 See below.6 minLevel Integer (signed) 0 Minimum Level to ac-

cess this skill.7 skillTier Integer 0 A skill tier.8 skillCostIndex Integer (signed) 0 A cost index.

Fields

flags TODO

Relations

• skill references the primary key of SkillLine.dbc.

• raceMask references the primary key of ChrRaces.dbc.

• classMask references the primary key of ChrClasses.dbc.

• skillTier references the primary key of SkillTiers.dbc.

• skillCostIndex references the primary key of SkillCostsData.dbc.

SkillTiers.dbc

The skill tiers table contains definitions for the costs of each skill tier.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

Continued on next page

4.1. File Format Guide 389

mangos-zero, Release 0.2.0

Table 4.8 – continued from previous pageID Name Type Default Description2 cost1 Integer (signed) 0 Price in copper for the

tier.3 cost2 Integer (signed) 0 Price in copper for the

tier.4 cost3 Integer (signed) 0 Price in copper for the

tier.5 cost4 Integer (signed) 0 Price in copper for the

tier.6 cost5 Integer (signed) 0 Price in copper for the

tier.7 cost6 Integer (signed) 0 Price in copper for the

tier.8 cost7 Integer (signed) 0 Price in copper for the

tier.9 cost8 Integer (signed) 0 Price in copper for the

tier.10 cost9 Integer (signed) 0 Price in copper for the

tier.11 cost10 Integer (signed) 0 Price in copper for the

tier.12 cost11 Integer (signed) 0 Price in copper for the

tier.13 cost12 Integer (signed) 0 Price in copper for the

tier.14 cost13 Integer (signed) 0 Price in copper for the

tier.15 cost14 Integer (signed) 0 Price in copper for the

tier.16 cost15 Integer (signed) 0 Price in copper for the

tier.17 cost16 Integer (signed) 0 Price in copper for the

tier.18 value1 Integer (signed) 0 Skill rank of the tier.19 value2 Integer (signed) 0 Skill rank of the tier.20 value3 Integer (signed) 0 Skill rank of the tier.21 value4 Integer (signed) 0 Skill rank of the tier.22 value5 Integer (signed) 0 Skill rank of the tier.23 value6 Integer (signed) 0 Skill rank of the tier.24 value7 Integer (signed) 0 Skill rank of the tier.25 value8 Integer (signed) 0 Skill rank of the tier.26 value9 Integer (signed) 0 Skill rank of the tier.27 value10 Integer (signed) 0 Skill rank of the tier.28 value11 Integer (signed) 0 Skill rank of the tier.29 value12 Integer (signed) 0 Skill rank of the tier.30 value13 Integer (signed) 0 Skill rank of the tier.31 value14 Integer (signed) 0 Skill rank of the tier.32 value15 Integer (signed) 0 Skill rank of the tier.33 value16 Integer (signed) 0 Skill rank of the tier.

390 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

SoundAmbience.dbc

The sound ambience table contains definitions for day and night ambience sounds.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 daySoundEntry Integer 0 Sound ambience forthe day.

3 nightSoundEntry Integer 0 Ambience sound forthe night.

Relations

• daySoundEntry and nightSoundEntry reference the primary key of SoundEntries.dbc.

SoundEntries.dbc

The sound entries table contains definitions for available sound files.

4.1. File Format Guide 391

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 soundType Integer (signed) 0 See below.3 name String • The name of the sound

entry.

4 file1 String • File name for thesound entry.

5 file2 String • File name for thesound entry.

6 file3 String • File name for thesound entry.

7 file4 String • File name for thesound entry.

8 file5 String • File name for thesound entry.

9 file6 String • File name for thesound entry.

10 file7 String • File name for thesound entry.

11 file8 String • File name for thesound entry.

12 file9 String • File name for thesound entry.

13 file10 String • File name for thesound entry.

14 freq1 Integer 1 TODO15 freq2 Integer 1 TODO16 freq3 Integer 1 TODO17 freq4 Integer 1 TODO18 freq5 Integer 1 TODO19 freq6 Integer 1 TODO20 freq7 Integer 1 TODO21 freq8 Integer 1 TODO22 freq9 Integer 1 TODO23 freq10 Integer 1 TODO24 directoryBase String • Base path for all

sound files.

25 volumeFLoat Float 0 TODO26 flags Integer (signed) 0 TODO27 minDistance Float 0 TODO28 distanceCutoff Float 0 TODO29 soundEntriesAdvancedIDInteger 0 TODO

392 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Fields

soundType

• 0: Unused/Miscellaneous,

• 1: Spells,

• 2: UI,

• 3: Footsteps,

• 4: Weapons/Impact,

• 6: Weapons/Miss,

• 9: Pick Up/Put Down,

• 10: NPC Combat,

• 12: Errors,

• 14: Objects,

• 16: Death,

• 17: NPC Greetings,

• 18: Test/Temporary,

• 19: Armor/Foley,

• 20: Footsteps,

• 21: Water/Character,

• 22: Water/Liquid,

• 23: Tradeskills,

• 25: Doodads,

• 26: Spell Fizzle,

• 27: NPC Loops,

• 28: Zone Music,

• 29: Emotes,

• 30: Narration Music,

• 31: Narration,

• 50: Zone Ambience

SoundProviderPreferences.dbc

The sound provider preferences table contains definitions for fmod properties.

4.1. File Format Guide 393

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 description String • TODO

3 flags Integer (signed) 0 TODO4 EAXEnvironmentSelectionInteger (signed) 0 TODO5 EAXDecayTime Float 0 TODO6 EAX2EnvironmentSize Float 0 TODO7 EAX2EnvironmentDiffusionFloat 0 TODO8 EAX2Room Integer (signed) 0 TODO9 EAX2RoomHF Integer (signed) 0 TODO10 EAX2DecayHFRatio Float 0 TODO11 EAX2Reflections Integer (signed) 0 TODO12 EAX2ReflectionsDelay Float 0 TODO13 EAX2Reverb Integer (signed) 0 TODO14 EAX2ReverbDelay Float 0 TODO15 EAX2RoomRolloff Float 0 TODO16 EAX2AirAbsorption Float 0 TODO17 EAX3RoomLF Integer (signed) 0 TODO18 EAX3DecayLFRatio Float 0 TODO19 EAX3EchoTime Float 0 TODO20 EAX3EchoDepth Float 0 TODO21 EAX3ModulationTime Float 0 TODO22 EAX3ModulationDepth Float 0 TODO23 EAX3HFReference Float 0 TODO24 EAX3LFReference Float 0 TODO

SoundSamplePreferences.dbc

The sound sample preferences table contains definitions for preferences used to play sound samples to test the soundproviders.

It is assumed that the values here related to channel settings.

394 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 field2 Integer (signed) 0 TODO3 field3 Integer (signed) 0 TODO4 field4 Integer (signed) 0 TODO5 field5 Integer (signed) 0 TODO6 field6 Integer (signed) 0 TODO7 field7 Integer (signed) 0 TODO8 field8 Integer (signed) 0 TODO9 field9 Float 0 TODO10 field10 Float 0 TODO11 field11 Integer (signed) 0 TODO12 field12 Integer (signed) 0 TODO13 field13 Integer (signed) 0 TODO14 field14 Float 0 TODO15 field15 Integer (signed) 0 TODO16 field16 Float 0 TODO17 field17 Integer (signed) 0 TODO

SoundWaterType.dbc

The sound water type table contains definitions for connecting liquids and matching sounds.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 liquidType Integer 0 References the liquidtype to which thesound applies.

3 fluidSpeed Integer (signed) 0 See below.4 soundEntry Integer 0 The sound to apply to

the liquid type.

Fields

fluidSpeed

• 0: still,

• 4: slow,

• 8: fast.

4.1. File Format Guide 395

mangos-zero, Release 0.2.0

Relations

• liquidType references the primary key of LiquidType.dbc.

• soundEntry references the primary key of SoundEntries.dbc.

SpamMessages.dbc

The spam messages table contains definitions for regular expressions used to decide if a chat message is spam.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 text String • The regular expres-sion.

SpellCastTimes.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 base Integer (signed) 0 Base cast time.3 perLevel Integer (signed) 0 Per level increase.4 minimum Integer (signed) 0 Minimum cast time.

SpellCategory.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 flags Integer (signed) • See below.

Fields

flags TODO

396 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

SpellChainEffects.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 avgSegLen Float 0 TODO3 width Float 0 TODO4 noiseScale Float 0 TODO5 texCoordScale Float 0 TODO6 segDuration Integer (signed) 0 TODO7 segDelay Integer (signed) 0 TODO8 texture String • TODO

SpellDispelType.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • TODO

3 mask Integer (signed) 0 See below.4 immunityPossible Integer (signed) 0 See below.

Fields

mask TODO

immunityPossible TODO

SpellDuration.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 duration Integer (signed) 0 TODO3 durationPerLevel Integer (signed) 0 TODO4 maxDuration Integer (signed) 0 TODO

4.1. File Format Guide 397

mangos-zero, Release 0.2.0

SpellEffectCameraShakes.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 cameraShake1 Integer 0 TODO3 cameraShake2 Integer 0 TODO4 cameraShake3 Integer 0 TODO

Relations

• cameraShake[1-3] references the primary key of CameraShakes.dbc.

SpellFocusObject.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • TODO

SpellIcon.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 textureFilename String • TODO

398 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

SpellItemEnchantment.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 enchantmentType1 Integer (signed) 0 TODO3 enchantmentType2 Integer (signed) 0 TODO4 enchantmentType3 Integer (signed) 0 TODO5 effectPointsMin1 Integer (signed) 0 TODO6 effectPointsMin2 Integer (signed) 0 TODO7 effectPointsMin3 Integer (signed) 0 TODO8 effectPointsMax1 Integer (signed) 0 TODO9 effectPointsMax2 Integer (signed) 0 TODO10 effectPointsMax3 Integer (signed) 0 TODO11 effectArg1 Integer (signed) 0 TODO12 effectArg2 Integer (signed) 0 TODO13 effectArg3 Integer (signed) 0 TODO14 name String (localized) • TODO

15 itemVisual Integer (signed) 0 TODO15 flags Integer (signed) 0 TODO

SpellMechanic.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 stateName String (localized) • Name of the mechanic

SpellRadius.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 radius Float • TODO

3 radiusPerLevel Float • TODO

4 radiusMax Float • TODO

4.1. File Format Guide 399

mangos-zero, Release 0.2.0

SpellRange.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 rangeMin Float 0 TODO3 rangeMax Float 0 TODO4 flags Integer (signed) 0 TODO5 displayName String (localized) • TODO

6 displayNameShort String (localized) • TODO

Spell.dbc

The spell table contains definitions for available spells.

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 school Integer (signed) 0 References TODO3 category Integer (signed) 0 References TODO4 castUI Integer (signed) 0 TODO5 dispelType Integer (signed) 0 References TODO6 mechanic Integer (signed) 0 References TODO7 attributes Integer (signed) 0 TODO8 attributesEx Integer (signed) 0 TODO9 attributesEx2 Integer (signed) 0 TODO10 attributesEx3 Integer (signed) 0 TODO11 attributesEx4 Integer (signed) 0 TODO12 shapeshiftMask Integer (signed) 0 References TODO13 shapeshiftExclude Integer (signed) 0 References TODO14 targets Integer (signed) 0 See below.15 targetCreatureType Integer (signed) 0 References TODO16 requiresSpellFocus Integer (signed) 0 References TODO17 casterAuraState Integer (signed) 0 TODO18 targetAuraState Integer (signed) 0 TODO19 castingTimeIndex Integer (signed) 0 References TODO20 recoveryTime Integer (signed) 0 TODO21 categoryRecoveryTime Integer (signed) 0 TODO22 auraInterruptFlags Integer (signed) 0 TODO23 channelInterruptFlags Integer (signed) 0 TODO24 procTypeMask Integer (signed) 0 TODO

Continued on next page

400 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.9 – continued from previous pageID Name Type Default Description25 procChance Integer (signed) 0 TODO26 procCharges Integer (signed) 0 TODO27 maxLevel Integer (signed) 0 TODO28 baseLevel Integer (signed) 0 TODO29 spellLevel Integer (signed) 0 TODO30 durationIndex Integer (signed) 0 References TODO31 powerType Integer (signed) 0 TODO32 manaCost Integer (signed) 0 TODO33 manaCostPerLevel Integer (signed) 0 TODO34 manaCostPerSecond Integer (signed) 0 TODO35 manaCostPerSecondPerLevelInteger (signed) 0 TODO36 rangeIndex Integer (signed) 0 References TODO37 speed Float 0 TODO38 modalNextSpell Integer (signed) 0 References TODO39 stackAmount Integer (signed) 0 TODO40 totem Integer (signed) 0 TODO41 totem Integer (signed) 0 TODO42 reagent1 Integer (signed) 0 TODO43 reagent2 Integer (signed) 0 TODO44 reagent3 Integer (signed) 0 TODO45 reagent4 Integer (signed) 0 TODO46 reagent5 Integer (signed) 0 TODO47 reagent6 Integer (signed) 0 TODO48 reagent7 Integer (signed) 0 TODO49 reagent8 Integer (signed) 0 TODO50 reagentCount1 Integer (signed) 0 TODO51 reagentCount2 Integer (signed) 0 TODO52 reagentCount3 Integer (signed) 0 TODO53 reagentCount4 Integer (signed) 0 TODO54 reagentCount5 Integer (signed) 0 TODO55 reagentCount6 Integer (signed) 0 TODO56 reagentCount7 Integer (signed) 0 TODO57 reagentCount8 Integer (signed) 0 TODO58 equippedItemClass Integer (signed) 0 This is a reference

mask.59 equippedItemSubclass Integer (signed) 0 This is a reference

mask.60 equippedItemInvType Integer (signed) 0 This is a reference

mask for allowed in-ventory slots in whichthe item may be.

61 effect1 Integer (signed) 0 TODO62 effect2 Integer (signed) 0 TODO63 effect3 Integer (signed) 0 TODO64 effectDieSides1 Integer (signed) 0 TODO65 effectDieSides2 Integer (signed) 0 TODO66 effectDieSides3 Integer (signed) 0 TODO67 effectBaseDice1 Integer (signed) 0 TODO68 effectBaseDice2 Integer (signed) 0 TODO

Continued on next page

4.1. File Format Guide 401

mangos-zero, Release 0.2.0

Table 4.9 – continued from previous pageID Name Type Default Description69 effectBaseDice3 Integer (signed) 0 TODO70 effectDicePerLevel1 Float 0 TODO71 effectDicePerLevel2 Float 0 TODO72 effectDicePerLevel3 Float 0 TODO73 effectRealPointsPerLevel1Float 0 TODO74 effectRealPointsPerLevel2Float 0 TODO75 effectRealPointsPerLevel3Float 0 TODO76 effectBasePoints1 Integer (signed) 0 TODO77 effectBasePoints2 Integer (signed) 0 TODO78 effectBasePoints3 Integer (signed) 0 TODO79 effectMechanic1 Integer (signed) 0 References TODO80 effectMechanic2 Integer (signed) 0 References TODO81 effectMechanic3 Integer (signed) 0 References TODO82 implicitTargetA1 Integer (signed) 0 TODO83 implicitTargetA2 Integer (signed) 0 TODO84 implicitTargetA3 Integer (signed) 0 TODO85 implicitTargetB1 Integer (signed) 0 TODO86 implicitTargetB2 Integer (signed) 0 TODO87 implicitTargetB3 Integer (signed) 0 TODO88 effectRadiusIndex1 Integer (signed) 0 References TODO89 effectRadiusIndex2 Integer (signed) 0 References TODO90 effectRadiusIndex3 Integer (signed) 0 References TODO91 effectAura1 Integer (signed) 0 TODO92 effectAura2 Integer (signed) 0 TODO93 effectAura3 Integer (signed) 0 TODO94 effectAmplitude1 Float 0 TODO95 effectAmplitude2 Float 0 TODO96 effectAmplitude3 Float 0 TODO97 effectMultipleValue1 Float 0 TODO98 effectMultipleValue2 Float 0 TODO99 effectMultipleValue3 Float 0 TODO100 effectChainTarget1 Integer (signed) 0 TODO101 effectChainTarget2 Integer (signed) 0 TODO102 effectChainTarget3 Integer (signed) 0 TODO103 effectItemType1 Integer (signed) 0 References TODO104 effectItemType2 Integer (signed) 0 References TODO105 effectItemType3 Integer (signed) 0 References TODO106 effectMiscValue1 Integer (signed) 0 References TODO107 effectMiscValue2 Integer (signed) 0 References TODO108 effectMiscValue3 Integer (signed) 0 References TODO109 effectTriggerSpell1 Integer (signed) 0 References TODO110 effectTriggerSpell2 Integer (signed) 0 References TODO111 effectTriggerSpell3 Integer (signed) 0 References TODO112 effectPointsPerCombo1 Float 0 TODO113 effectPointsPerCombo2 Float 0 TODO114 effectPointsPerCombo3 Float 0 TODO115 spellVisual1 Integer (signed) 0 References TODO116 spellVisual2 Integer (signed) 0 References TODO117 spellIcon Integer (signed) 0 References TODO

Continued on next page

402 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table 4.9 – continued from previous pageID Name Type Default Description118 activeIcon Integer (signed) 0 References TODO119 spellPriority Integer (signed) 0 TODO120 name String (localized)

•TODO

121 nameSubtext String (localized)•

TODO

122 description String (localized)•

TODO

123 auraDescription String (localized)•

TODO

124 manaCostPct Integer (signed) 0 TODO125 startRecoveryCategory Integer (signed) 0 TODO126 startRecoveryTime Integer (signed) 0 TODO127 maxTargetLevel Integer (signed) 0 TODO128 spellClassSet Integer (signed) 0 References TODO129 spellClassMask1 Integer (signed) 0 TODO130 spellClassMask2 Integer (signed) 0 TODO131 maxTargets Integer (signed) 0 TODO132 defenseType Integer (signed) 0 TODO133 preventionType Integer (signed) 0 TODO134 stanceBarOrder Integer (signed) 0 TODO135 DamageMultiplier1 Float 0 TODO136 DamageMultiplier2 Float 0 TODO137 DamageMultiplier3 Float 0 TODO138 minFaction Integer (signed) 0 TODO139 minReputation Integer (signed) 0 TODO140 requiredAuraVision Integer (signed) 0 TODO

Fields

targets

• 0: TODO,

• 2: TODO,

• 16: TODO,

• 32: TODO,

• 64: TODO,

• 128: TODO,

• 256: TODO,

• 512: TODO,

• 1024: TODO,

• 16384: TODO,

4.1. File Format Guide 403

mangos-zero, Release 0.2.0

• 32768: TODO.

Relations

• spellClassSet references the field classMask of ChrClasses.dbc.

• targetCreatureType references the primary key of CreatureType.dbc.

• equippedItemClass references the primary key of ItemClass.dbc.

• equippedItemSubclass references the primary key of ItemSubClass.dbc.

• school references the primary key of Resistances.dbc.

• modalNextSpell, effectTriggerSpell1, effectTriggerSpell2 andeffectTriggerSpell2 reference the primary key of Spell.dbc.

• castingTimeIndex references the primary key of SpellCastTimes.dbc.

• category references the primary key of SpellCategory.dbc.

• dispelType references the primary key of SpellDispelType.dbc.

• durationIndex references the primary key of SpellDuration.dbc.

• requiresSpellFocus references the primary key of SpellFocusObject.dbc.

• spellIcon references the primary key of SpellIcon.dbc.

• effectMiscValue1, effectMiscValue2 and effectMiscValue3 reference the primary key ofSpellItemEnchantment.dbc.

• mechanic, effectMechanic1, effectMechanic2 and effectMechanic3 reference the primarykey of SpellMechanic.dbc.

• effectRadiusIndex1, effectRadiusIndex2 and effectRadiusIndex3 reference the primarykey of SpellRadius.dbc.

• rangeIndex references the primary key of SpellRange.dbc.

• shapeshiftMask and shapeshiftexclude reference the primary key of SpellShapeshiftForm.dbc.

• spellVisual1 and spellVisual2 reference the primary key of SpellVisual.dbc.

SpellShapeshiftForm.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 bonusActionBar Integer (signed) 0 TODO3 name String (localized) • TODO

4 flags Integer (signed) 0 TODO5 creatureType Integer (signed) 0 TODO6 spellIcon Integer 0 TODO

404 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Relations

• spellIcon references the primary key of SpellIcon.dbc.

SpellVisualEffectName.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • TODO

3 fileName String • TODO

4 areaEffectSize Float 0 TODO5 scale Float 0 TODO

SpellVisualKit.dbc

Table structure

ID Name Type Default Description1 ID Integer

•Unique ID

2 startAnim Integer (signed) 0 TODO3 anim Integer (signed) 0 TODO4 animKit Integer (signed) 0 TODO5 headEffect Integer (signed) 0 TODO6 chestEffect Integer (signed) 0 TODO7 baseEffect Integer (signed) 0 TODO8 leftHandEffect Integer (signed) 0 TODO9 rightHandEffect Integer (signed) 0 TODO10 breathEffect Integer (signed) 0 TODO11 leftWeaponEffect Integer (signed) 0 TODO12 rightWeaponEffect Integer (signed) 0 TODO13 specialEffect1 Integer (signed) 0 TODO14 specialEffect2 Integer (signed) 0 TODO15 specialEffect3 Integer (signed) 0 TODO16 worldEffect Integer (signed) 0 TODO17 sound Integer (signed) 0 TODO18 shake Integer (signed) 0 TODO19 charProc1 Float 0 TODO20 charProc2 Float 0 TODO21 charProc3 Float 0 TODO22 charProc4 Float 0 TODO

Continued on next page

4.1. File Format Guide 405

mangos-zero, Release 0.2.0

Table 4.10 – continued from previous pageID Name Type Default Description23 charParamZero1 Float 0 TODO24 charParamZero2 Float 0 TODO25 charParamZero3 Float 0 TODO26 charParamZero4 Float 0 TODO27 charParamOne1 Float 0 TODO28 charParamOne2 Float 0 TODO29 charParamOne3 Float 0 TODO30 charParamOne4 Float 0 TODO31 charParamTwo1 Float 0 TODO32 charParamTwo2 Float 0 TODO33 charParamTwo3 Float 0 TODO34 charParamTwo4 Float 0 TODO35 flags Integer (signed) 0 TODO

Relations

• startAnim and anim reference the primary key of AnimationData.dbc.

• animKit references the primary key of AttackAnimKits.dbc.

• headEffect, chestEffect, baseEffect, leftHandEffect, rightHandEffect,breathEffect, leftWeaponEffect, rightWeaponEffect, specialEffect1,specialEffect2, specialEffect3 and‘‘worldEffect‘‘ reference the primary key of SpellVisual-EffectName.dbc.

• sound references the primary key of SoundEntries.dbc.

• shake references the primary key of CameraShakes.dbc.

SpellVisualPrecastTransitions.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 loadAnimation String • The loading anima-tion.

3 holdAnimation String • The holding anima-tion.

406 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

SpellVisual.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 precastKit Integer 0 TODO3 castKit Integer 0 TODO4 impactKit Integer 0 TODO5 stateKit Integer 0 TODO6 stateDoneKit Integer 0 TODO7 channelKit Integer 0 TODO8 hasMissile Integer (signed) 0 TODO9 missileModel Integer (signed) 0 TODO10 missilePathType Integer (signed) 0 TODO11 missileDestinationAttachmentInteger (signed) 0 TODO12 missileSound Integer 0 TODO13 animEventSound Integer 0 TODO14 flags Integer (signed) 0 TODO15 casterImpactKit Integer (signed) 0 TODO16 targetImpactKit Integer (signed) 0 TODO

Relations

• precastKit, castKit, impactKit, stateKit, stateDoneKit, channelKit,casterImpactKit and targetImpactKit reference the primary key of SpellVisualKit.dbc.

• missileSound and animEventSound reference the primary key of SoundEntries.dbc.

StableSlotPrices.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 cost Integer (signed) 0 Price in coppers.

4.1. File Format Guide 407

mangos-zero, Release 0.2.0

Startup_Strings.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String • TODO

3 startupString String (localized) • TODO

Stationery.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 item Integer 0 TODO3 texture String • TODO

4 flags Integer (signed) 0 TODO

StringLookups.dbc

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 path String • TODO

Talent.dbc

The talent table contains definitions for all available class talents and their requirements.

408 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 tab Integer (signed) 0 TODO3 tier Integer (signed) 0 TODO4 columnIndex Integer (signed) 0 TODO5 spellRank1 Integer 0 TODO6 spellRank2 Integer 0 TODO7 spellRank3 Integer 0 TODO8 spellRank4 Integer 0 TODO9 spellRank5 Integer 0 TODO10 spellRank6 Integer 0 TODO11 spellRank7 Integer 0 TODO12 spellRank8 Integer 0 TODO13 spellRank9 Integer 0 TODO14 prereqTalent1 Integer 0 TODO15 prereqTalent2 Integer 0 TODO16 prereqTalent3 Integer 0 TODO17 prereqRank1 Integer (signed) 0 TODO18 prereqRank2 Integer (signed) 0 TODO19 prereqRank3 Integer (signed) 0 TODO20 flags Integer (signed) 0 TODO21 requiredSpell Integer 0 The only talent with

this value set is Na-ture’s Grasp, whichhas this set to 339.

Relations

• tab references the primary key of TalentTab.dbc.

• spellRank[1-9] and requiredSpell reference the primary key of Spell.dbc.

TalentTab.dbc

The talent tab table contains definitions for the class talent tabs as seen ingame on the talent window.

4.1. File Format Guide 409

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String (localized) • The name of the talenttree.

3 spellIcon Integer 0 The talent tree’s icon.4 raceMask Integer (signed) 0 The race(s) to which

the talent tab applies,might not be ID, butrather masked ID.

5 classMask Integer (signed) 0 The class(es) to whichthe talent tab applies,might not be ID, butrather masked ID.

6 orderIndex Integer 0 An order for the tab.7 backgroundFile String 0 The base name of

the talent trees’ back-ground image.

Relations

• raceMask reference the primary key of ChrRaces.dbc.

• classMask reference the primary key of ChrClasses.dbc.

• spellIcon reference the primary key of SpellIcon.dbc.

Notes

The backgroundFile column only references the base name of the talent tree’s background image. The full imageis contained in Interface\TalentFrame\, split into four parts, named backgroundFile-BottomLeft,backgroundFile-TopLeft, backgroundFile-TopRight, and backgroundFile-BottomRight.

TaxiNodes.dbc

The taxi nodes table contains definitions for names, and locations of flight nodes.

410 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 The map on which thetaxi node is located.

3 locationX Float 0 X coordinate4 locationY Float 0 Y coordinate5 locationZ Float 0 Z coordinate6 name String (localized) • The name of the taxi

node.

7 mountCreatureDisplayInfo1Integer 0 A mount model to dis-play for Alliance.

8 mountCreatureDisplayInfo2Integer 0 A mount model to dis-play for Horde.

Relations

• map references the primary key of Map.dbc.

• mountCreatureDisplayInfo[1-2] references the primary key of CreatureDisplayInfo.dbc.

TaxiPathNode.dbc

The taxi path node table contains definitions for every point along a flight path.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 taxiPath Integer 0 Path that these coordi-nates are on.

3 nodeIndex Integer (signed) 0 The point numberalong the path.

4 map Integer 0 Map that the coordi-nates are on.

5 locationX Float 0 X coordinate6 locationY Float 0 Y coordinate7 locationZ Float 0 Z coordinate8 flags Integer (signed) 0 Rarely used, may be

related to boats / trams/ Zeppelins

9 delay Integer (signed) 0 Delay in seconds be-fore moving to nextpoint (used on boats /trams / Zeppelins)

4.1. File Format Guide 411

mangos-zero, Release 0.2.0

Relations

• taxiPath references the primary key of TaxiPath.dbc.

• map references the primary key of Map.dbc.

TaxiPath.dbc

The taxi path table contains definitions for transports, including source, destination and price.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 sourceTaxiNode Integer 0 Where the transportstarts.

3 destinationTaxiNode Integer 0 Where the transportends.

4 cost Integer (signed) 0 Price for the transportin copper.

Relations

• sourceTaxiNode and destinationTaxiNode references the primary key of TaxiNodes.dbc.

TerrainType.dbc

The terrain type table contains definitions for available terrain types and the use of sound and footsteps on them.

412 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 description String • The name of the ter-rain type.

3 footstepSprayRun Integer 0 Visual effect shownwhen a character isrunning on this ter-rain.

4 footstepSprayWalk Integer 0 Visual effect shownwhen a character iswalking on this ter-rain.

5 soundEntry Integer 0 The sound entry to beplayed when a charac-ter is moving on thisterrain.

6 flags Integer (signed) 0 See below.

Fields

flags

• 0: do not display footsteps.

• 1: display footsteps on this terrain type.

Relations

• footstepSprayRun and footstepSprayWalk reference the primary key of SpellVisualEffect-Name.dbc.

• terrainTypeSound references the primary key of TerrainTypeSounds.dbc.

TerrainTypeSounds.dbc

The terrain type sounds table contains definitions for sounds available for each terrain type.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

4.1. File Format Guide 413

mangos-zero, Release 0.2.0

TransportAnimation.dbc

The transport animation table contains definitions most likely used to play animations during characters being on atransport.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 transport Integer 0 TODO3 timeIndex Integer (signed) 0 TODO4 locationX Float 0 TODO5 locationY Float 0 TODO6 locationZ Float 0 TODO7 sequence Integer 0 The animation se-

quence

Relations

• sequence references the primary key of AnimationData.dbc.

UISoundLookups.dbc

The UI sound lookups table contains definitions for sounds used in various sections of the user interface.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 soundEntry Integer 0 The sound to beplayed.

3 internalName String • Most likely the hard-coded name used inthe clients’ interfaceand LUA scripts.

Relations

• soundEntry references the primary key of SoundEntries.dbc.

UnitBloodLevels.dbc

The unit blood level table contains definitions for the levels of blood to be displayed on a creature.

414 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 violenceLevel1 Integer (signed) 0 TODO3 violenceLevel2 Integer (signed) 0 TODO4 violenceLevel3 Integer (signed) 0 TODO

UnitBlood.dbc

The unit blood table contains definitions for the unit blood to be displayed on a creature.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 combatBloodSpurtFrontSmallInteger (signed) 0 TODO3 combatBloodSpurtFrontLargeInteger (signed) 0 TODO4 combatBloodSpurtBackSmallInteger (signed) 0 TODO5 combatBloodSpurtBackLargeInteger (signed) 0 TODO6 texture1 String • TODO

7 texture2 String • TODO

8 texture3 String • TODO

9 texture4 String • TODO

10 texture5 String • TODO

VideoHardware.dbc

The video hardware table most likely contains definitions for supported video hardware.

4.1. File Format Guide 415

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 field2 Integer 0 TODO3 field3 Integer 0 TODO4 field4 Integer 0 TODO5 field5 Integer 0 TODO6 field6 String • TODO

7 field7 Integer 0 TODO8 field8 String • TODO

9 field9 String • TODO

10 field10 String • TODO

11 field11 Integer 0 TODO12 field12 String • TODO

13 field13 String • TODO

14 field14 Integer 0 TODO15 field15 Integer 0 TODO16 field16 Integer 0 TODO17 field17 Integer 0 TODO18 field18 String • TODO

19 field19 String • TODO

20 field20 String • TODO

21 field21 String • TODO

22 field22 Integer 0 TODO

Notes

This is no man’s land. We have found no matches for the contents herein, not even BIOS checksums for graphicscards.

VocalUISounds.dbc

The vocal UI sounds table contains definitions for UI error sounds for all the different races and genders.

416 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 vocalUIEnum Integer (signed) 0 TODO3 race Integer 0 The race.4 normalMaleSoundEntry Integer (signed) 0 Male sound.5 normalFemaleSoundEntryInteger (signed) 0 Female sound.6 pissedMaleSoundEntry Integer (signed) 0 Male sound.7 pissedFemaleSoundEntryInteger (signed) 0 Female sound.

Relations

• race references the primary key of ChrRaces.dbc.

• normalMaleSoundEntry, normalFemaleSoundEntry, pissedMaleSoundEntry andpissedFemaleSoundEntry reference the primary key of SoundEntries.dbc.

WeaponImpactSounds.dbc

The weapon impact sounds table contains definitions for which sound is played when a weapon hits.

4.1. File Format Guide 417

mangos-zero, Release 0.2.0

418 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 weaponSubclass Integer (signed) 0 TODO3 parrySoundType Integer (signed) 0 TODO4 impactSound Integer 0 The sound entry to be

played upon weaponswing.

5 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

6 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

7 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

8 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

9 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

10 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

11 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

12 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

13 impactSound Integer 0 The sound entry to beplayed upon weaponswing.

14 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

15 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

16 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

17 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

18 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

19 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

20 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

21 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

22 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

23 critImpactSound Integer 0 The sound entry to beplayed upon weaponswing.

4.1. File Format Guide 419

mangos-zero, Release 0.2.0

Relations

• impactSound[1-10] references the primary key of SoundEntries.dbc.

• critImpactSound[1-10] references the primary key of SoundEntries.dbc.

Notes

Impact and critical sounds have multiple entries, and it is not yet known which purpose these serve.

WeaponSwingSounds2.dbc

The weapon swing sounds table contains definitions for which sound is played when a weapon swings.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 swingType Integer (signed) 0 The weight of theweapon used.

3 isCritical Integer (signed) 0 See below.4 soundEntry Integer 0 The sound entry to be

played upon weaponswing.

Fields

swingType

• 0: light. E.g. a knife.

• 1: medium. E.g. 1H sword/axe.

• 2: heavy. E.g. 2H sword/stave.

isCritical

• 0: non-critical hit

• 1: critical hit

Relations

• soundEntry references the primary key of SoundEntries.dbc.

WMOAreaTable.dbc

The world map object area table contains definitions for connecting areas to the actual models.

420 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 wmoID Integer 0 The ID from a WMOfiles’ header chunk.

3 nameSetID Integer 0 TODO4 wmoGroupID Integer (signed) 0 Referenced from a

WMO group fileschunk.

5 soundProviderPreferencesInteger (signed) 0 TODO6 soundProviderPreferencesUnderwaterInteger (signed) 0 TODO7 soundAmbience Integer (signed) 0 TODO8 zoneMusic Integer (signed) 0 TODO9 zoneIntroMusicTable Integer (signed) 0 TODO10 flags Integer 0 Flags seem to be re-

lated to outdoor state.11 areaTable Integer 0 The area related to this

object entry. If 0 theunderlying terrain isqueried for its’ Id.

12 name String (localized) NULL The name of the area.If NULL, AreaT-able.dbc is queried forthe name.

Relations

• soundProviderPreferencesID, and soundProviderPreferencesIDUnderwater referencesthe primary key of SoundProviderPreferences.dbc.

• soundAmbienceID references the primary key of SoundAmbience.dbc.

• zoneMusicID references the primary key of ZoneMusic.dbc.

• zoneIntroMusicTableID references the primary key of ZoneIntroMusicTable.dbc.

• areaTableID references the primary key of AreaTable.dbc.

WorldMapArea.dbc

The world map area table contains definitions for texture overlays used for an area (aka. zone) on the world map.

4.1. File Format Guide 421

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 worldMapContinent Integer 0 The continent towhich an area be-longs.

3 areaTable Integer 0 The map in which anarea (aka. zone) is lo-cated.

4 areaName String • Name of thedirectory inInterface\WorldMap\containing images foran area.

5 locationLeft Float 0 Map coordinate6 locationRight Float 0 Map coordinate7 locationTop Float 0 Map coordinate8 locationBottom Float 0 Map coordinate

Fields

worldMapContinent

• 0: Eastern Kingdoms

• 1: Kalimdor

Relations

• worldMapContinent references the primary key of WorldMapContinent.dbc.

• areaTable references the primary key of AreaTable.dbc.

WorldMapContinent.dbc

The world map continent table contains definitions for texture overlays used for a continent on the world map.

422 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 The map to which thecontinent overlay be-longs.

3 leftBoundary Integer 0 TODO4 rightBoundary Integer 0 TODO5 topBoundary Integer 0 TODO6 bottomBoundary Integer 0 TODO7 continentOffsetX Float 0 TODO8 continentOffsetY Float 0 TODO9 scale Float 0 TODO10 taxiMinX Float 0 TODO11 taxiMinY Float 0 TODO12 taxiMaxX Float 0 TODO13 taxiMaxY Float 0 TODO

Relations

• map references the primary key of Map.dbc.

Notes

Overlays are stored in Interface\WorldMap\MapName\MapNameHighlight.blp.

WorldMapOverlay.dbc

The world map overlay table contains definitions for texture overlays used for a sections of an area on the world map.

4.1. File Format Guide 423

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 worldMapArea Integer 0 The zone in which theoverlay is used.

3 areaTable1 Integer 0 TODO4 areaTable2 Integer 0 TODO5 areaTable3 Integer 0 TODO6 areaTable4 Integer 0 TODO7 locationX Integer 0 TODO8 locationY Integer 0 TODO9 textureName String • Base texture name.

10 textureWidth Integer 0 TODO11 textureHeight Integer 0 TODO12 offsetX Integer 0 TODO13 offsetY Integer 0 TODO14 hitRectTop Integer 0 TODO15 hitRectLeft Integer 0 TODO16 hitRectBottom Integer 0 TODO17 hitRectRight Integer 0 TODO

Relations

• worldMapArea references the primary key of WorldMapArea.dbc.

• areaTable[1-4] references the primary key of AreaTable.dbc.

Notes

Textures are placed on areas of a map, relative to its pixel size. The texture is split in a varying number of sub-textures.Each texture can not exceed the size of 256x256 pixels.

Textures are found in the world map area directory which itself resides in the Interface\WorldMap direc-tory. The base texture name is suffixed with an 1-based index, and prefixed with the world map area’s name (e.g.Interface\WorldMap\Tirisfal\Monastery1.blp. Here the world map area directory is Tirisfal, the basetexture name is Monastery, with sub-texture index of 1).

The world map area (aka. zone) where the overlay is placed, is referenced by worldMapAreaID, while the corre-sponding area is referenced in areaTableID1.

WorldSafeLocs.dbc

The world safe location table contains specifies coordinates where graveyards are located.

424 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer • The map on which thegraveyard is located.

3 locationX Float 0 X coordinate of thegraveyard in theworld.

4 locationY Float 0 Y coordinate of thegraveyard in theworld.

5 locationZ Float 0 Z coordinate of thegraveyard in theworld.

6 areaName String (localized) • The name of thegraveyard location.

Relations

• map references the primary key of Map.dbc.

WorldStateUI.dbc

The world state UI table contains definitions for PvE and PvP events in the world.

4.1. File Format Guide 425

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 map Integer 0 TODO3 areaTable Integer 0 TODO4 icon String • TODO

5 stateVariable String (localized) • TODO

6 tooltip String (localized) • TODO

7 state Integer (signed) 0 TODO8 worldState Integer 0 TODO9 type Integer (signed) 0 TODO10 dynamicIcon String • TODO

11 dynamicTooltip String (localized) • TODO

12 extendedUI String • TODO

13 field37 Integer 0 TODO14 field38 Integer 0 TODO15 field39 Integer 0 TODO

Relations

• map references the primary key of Map.dbc.

• areaTable references the primary key of AreaTable.dbc.

WowError_Strings.dbc

The Wow error strings table contains definitions for error messages used in the World of Warcraft crash reportingutility.

Note: This file is not reference from any other DBC files and does not reference other DBC files.

426 Chapter 4. File Format Guide

mangos-zero, Release 0.2.0

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 errorName String • A hard-coded nameused in the crash re-porting utility to iden-tify and load the errorstring.

3 errorString String (localized) • The actual string to beprinted in the crash re-porting utilities inter-face.

ZoneIntroMusicTable.dbc

The zone intro music table contains definitions for ambience sounds to be played upon entering various areas.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 name String 0 The name of the ambi-ence sound.

3 introSound Integer 0 The sound entry beingplayed upon enteringan area.

4 priority Integer 1 See below.5 minDelay Integer 10 The number of sec-

onds playing the intromusic will be delayedupon zone entering.

Fields

priority

• 0: no priority over default ambience sound.

• 1: has priority over default ambience sound.

Relations

• introSound references the primary key of SoundEntries.dbc.

4.1. File Format Guide 427

mangos-zero, Release 0.2.0

ZoneMusic.dbc

The zone music table contains definitions for ambience sounds to be played during day and night time in various areas.

Table structure

ID Name Type Default Description1 ID Integer • Unique ID

2 setName String • The name of the ambi-ence sound.

3 silenceIntervalMinDay Integer 180000 The minimum amountof milliseconds towait before replayingthe ambience soundduring day time.

4 silenceIntervalMinNight Integer 180000 The minimum amountof milliseconds towait before replayingthe ambience soundduring night time.

5 silenceIntervalMaxDay Integer 300000 The maximumamount of millisec-onds to wait beforereplaying the ambi-ence sound duringday time.

6 silenceIntervalMaxNight Integer 300000 The maximumamount of millisec-onds to wait beforereplaying the ambi-ence sound duringnight time.

7 daySoundEntry Integer 0 The sound entry be-ing played during daytime.

8 nightSoundEntry Integer 0 The sound entry beingplayed during nighttime.

Relations

• daySoundEntry and nightSoundEntry reference the primary key of SoundEntries.dbc.

If you have suggestions for topics we should cover here, please file an issue.

• Client File Formats

• Server File Formats

• Client File Formats

• Server File Formats

428 Chapter 4. File Format Guide

CHAPTER 5

Contributing

A guide to help you contribute to mangos-zero.

5.1 Contributing

This section will teach you the basics if you want to contribute to the development of mangos-zero.

5.1.1 The Roadmap

As mangos-zero is under heavy development, this document intends to provide an overview of the road ahead.

We are working hard on the architecture and the most basic features required to run a successful World of Warcraftserver. This phase will involve several Backwards Compatibility breaks, but we will do our best to provide upgradeinstructions for the brave Early Adopters.

Version 1.0.0

• Build system rewrite, for better cross platform build support, initially targeting Linux, Windows, Mac OS x andFreeBSD.

• Documentation! You are reading it right now. For the first time ever since the founding of the MaNGOS project,we will provide documentation for all aspects of the software.

Version 1.1.0

• Hot on the heels we will work hard to improve game features, refactor where needed and clean up existing code.

• Documentation will be expanded, including development information, such as reverse engineered informationof client file formats, or the client/server communication protocol.

5.1.2 Contributing Code

Reporting a Bug

Whenever you find a bug in mangos-zero, we kindly ask you to report it. It helps us make a better server for World ofWarcraft.

429

mangos-zero, Release 0.2.0

Caution: If you think you’ve found a security issue, please use the special procedure instead.

Before submitting a bug:

• Double-check the official documentation to see if you’re not misusing the framework;

If your problem definitely looks like a bug, report it using the official bug tracker and follow some basic rules:

• Use the title field to clearly describe the issue;

• Describe the steps needed to reproduce the bug with short code examples;

• Give as much detail as possible about your environment (OS, Compiler, library versions, CMake version, ...);

• (optional) Attach a patch.

Submitting a Patch

Patches are the best way to provide a bug fix or to propose enhancements to mangos-zero.

Step 1: Setup your Environment

Install the Software Stack Before working on mangos-zero, setup a C++ friendly environment with the followingsoftware:

• Git;

• GCC 4.7 or above;

• MySQL 5.5 or above;

• CMake 2.8 or above;

• zlib;

• bzip2;

• OpenSSL;

• ACE 6.0 or above;

Configure Git Set up your user information with your real name and a working email address:

$ git config --global user.name "Your Name"$ git config --global user.email [email protected]

Tip: If you are new to Git, you are highly recommended to read the excellent and free ProGit book.

Tip: If your IDE creates configuration files inside the project’s directory, you can use global .gitignore file (forall projects) or .git/info/exclude file (per project) to ignore them.

Tip: Windows users: when installing Git, the installer will ask what to do with line endings, and suggests replacingall LF with CRLF. This is the wrong setting if you wish to contribute to mangos-zero. Selecting the as-is method isyour best choice, as Git will convert your line feeds to the ones in the repository. If you have already installed Git, youcan check the value of this setting by typing:

430 Chapter 5. Contributing

mangos-zero, Release 0.2.0

$ git config core.autocrlf

This will return either “false”, “input” or “true”; “true” and “false” being the wrong values. Change it to “input” bytyping:

$ git config --global core.autocrlf input

Replace –global by –local if you want to set it only for the active repository

Get the mangos-zero Source Code Get the mangos-zero source code:

• Create a BitBucket account and sign in;

• Fork the mangos-zero repository (click on the “Fork” button);

• After the “forking action” has completed, clone your fork locally (this will create a server directory):

$ git clone [email protected]:YOURUSERNAME/server.git

• Add the upstream repository as a remote:

$ cd server$ git remote add upstream [email protected]:mangoszero/server.git

Step 2: Work on your Patch

The License Before you start, you must know that all the patches you are going to submit must be released underthe GPL version 2 license, unless explicitly specified in your commits.

Create a Topic Branch Each time you want to work on a patch for a bug or on an enhancement, create a topicbranch:

$ git checkout -b BRANCH_NAME develop

Tip: Use a descriptive name for your branch (issue_XXX where XXX is the GitHub issue number is a goodconvention for bug fixes).

The above checkout commands automatically switch the code to the newly created branch (check the branch you areworking on with git branch).

Work on your Patch Work on the code as much as you want and commit as much as you want; but keep in mindthe following:

• Read about the mangos-zero conventions and follow the coding standards (use git diff --check to checkfor trailing spaces – also read the tip below);

• Do atomic and logically separate commits (use the power of git rebase to have a clean and logical history);

• Squash irrelevant commits that are just about fixing coding standards or fixing typos in your own code;

• Never fix coding standards in some existing code as it makes the code review more difficult (submit CS fixes asa separate patch);

• Write good commit messages (see the tip below).

5.1. Contributing 431

mangos-zero, Release 0.2.0

Tip: A good commit message is composed of a summary (the first line), optionally followed by a blank line anda more detailed description. The summary should start with the Component you are working on in square brackets([Core], [Documentation], ...). Use a verb (fixed ..., added ..., ...) to start the summary and don’tadd a period at the end.

Prepare your Patch for Submission When your patch is not about a bug fix (when you add a new feature or changean existing one for instance), it must also include the following:

• An explanation of the changes in the relevant CHANGELOG file(s) (the [BC BREAK] or the [DEPRECATION]prefix must be used when relevant);

• An explanation on how to upgrade an existing application in the relevant UPGRADE file(s) if the changes breakbackward compatibility or if you deprecate something that will ultimately break backward compatibility.

Step 3: Submit your Patch

Whenever you feel that your patch is ready for submission, follow the following steps.

Rebase your Patch Before submitting your patch, update your branch (needed if it takes you a while to finish yourchanges):

$ git checkout develop$ git fetch upstream$ git merge upstream/develop$ git checkout BRANCH_NAME$ git rebase develop

When doing the rebase command, you might have to fix merge conflicts. git status will show you the un-merged files. Resolve all the conflicts, then continue the rebase:

$ git add ... # add resolved files$ git rebase --continue

Push your branch remotely:

$ git push --force origin BRANCH_NAME

Make a Pull Request You can now make a pull request on the mangoszero/server BitBucket repository.

To ease the core team work, always include the modified components in your pull request message, like in:

[Core] Fixed something[BuildSystem] Supported something

The pull request description must include the following checklist at the top to ensure that contributions may be re-viewed without needless feedback loops and that your contributions can be included into mangos-zero as quickly aspossible:

| Q | A| ------------- | ---| Bug fix? | [yes|no]| New feature? | [yes|no]| BC breaks? | [yes|no]

432 Chapter 5. Contributing

mangos-zero, Release 0.2.0

| Deprecations? | [yes|no]| Tests pass? | [yes|no]| Fixed tickets | [comma separated list of tickets fixed by the PR]| License | GPL version 2| Doc PR | [The reference to the documentation PR if any]

An example submission could now look as follows:

| Q | A| ------------- | ---| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Fixed tickets | #12, #43| License | GPL version 2| Doc PR | mangoszero/documentation#123

The whole table must be included (do not remove lines that you think are not relevant). For simple typos, minorchanges in the PHPDocs, or changes in translation files, use the shorter version of the check-list:

| Q | A| ------------- | ---| Fixed tickets | [comma separated list of tickets fixed by the PR]| License | GPL version 2

Some answers to the questions trigger some more requirements:

• If you answer yes to “Bug fix?”, check if the bug is already listed in the issues and reference it/them in “Fixedtickets”;

• If you answer yes to “New feature?”, you must submit a pull request to the documentation and reference it underthe “Doc PR” section;

• If you answer yes to “BC breaks?”, the patch must contain updates to the relevant CHANGELOG and UPGRADEfiles;

• If you answer yes to “Deprecations?”, the patch must contain updates to the relevant CHANGELOG andUPGRADE files;

If some of the previous requirements are not met, create a todo-list and add relevant items:

- [ ] Submit changes to the documentation- [ ] Document the BC breaks

If the code is not finished yet because you don’t have time to finish it or because you want early feedback on yourwork, add an item to todo-list:

- [ ] Finish the feature- [ ] Gather feedback for my changes

As long as you have items in the todo-list, please prefix the pull request title with “[WIP]”.

In the pull request description, give as much details as possible about your changes (don’t hesitate to give codeexamples to illustrate your points). If your pull request is about adding a new feature or modifying an existing one,explain the rationale for the changes. The pull request description helps the code review.

In addition to this “code” pull request, you must also send a pull request to the documentation repository to update thedocumentation when appropriate.

5.1. Contributing 433

mangos-zero, Release 0.2.0

Rework your Patch Based on the feedback on the pull request, you might need to rework your patch. Beforere-submitting the patch, rebase with upstream/develop, don’t merge; and force the push to the origin:

$ git rebase -f upstream/develop$ git push --force origin BRANCH_NAME

Note: When doing a push --force, always specify the branch name explicitly to avoid messing other branchesin the repo (--force tells Git that you really want to mess with things so do it carefully).

Often, mangos-zero team members will ask you to “squash” your commits. This means you will convert manycommits to one commit. To do this, use the rebase command:

$ git rebase -i upstream/develop$ git push --force origin BRANCH_NAME

After you type this command, an editor will popup showing a list of commits:

pick 1a31be6 first commitpick 7fc64b4 second commitpick 7d33018 third commit

To squash all commits into the first one, remove the word pick before the second and the last commits, and replaceit by the word squash or just s. When you save, Git will start rebasing, and if successful, will ask you to edit thecommit message, which by default is a listing of the commit messages of all the commits. When you are finished,execute the push command.

Security Issues

This document explains how mangos-zero issues are handled by the core team.

Reporting a Security Issue

If you think that you have found a security issue in mangos-zero, don’t use the bug tracker and do not post it publicly.Instead, all security issues must be sent to theluda [at] getmangos.com. Emails sent to this address are forwarded tothe core team members.

Resolving Process

For each report, we first try to confirm the vulnerability. When it is confirmed, the team works on a solution followingthese steps:

1. Send an acknowledgement to the reporter;

2. Work on a patch;

3. Write a security announcement for the official mangos-zero blog about the vulnerability. This post shouldcontain the following information:

• a title that always include the “Security release” string;

• a description of the vulnerability;

• the affected versions;

• the possible exploits;

434 Chapter 5. Contributing

mangos-zero, Release 0.2.0

• how to patch/upgrade/workaround affected applications;

• credits.

4. Send the patch and the announcement to the reporter for review;

5. Apply the patch to all maintained versions of mangos-zero;

6. Publish the post on the official mangos-zero blog;

7. Update the security advisory list (see below).

Note: Releases that include security issues should not be done on Saturday or Sunday, except if the vulnerability hasbeen publicly posted.

Note: While we are working on a patch, please do not reveal the issue publicly.

Coding Standards

When contributing code to mangos-zero, you must follow its coding standards.

mangos-zero follow a modified version of the ANSI coding standard.

Here is a short example containing most features described below:

#include <string>

// Database exceptionsclass Exception{

public:Exception(const std::string& message): message(message){ }virtual ~Exception(){ }const std::string& getMessage() {return message;}

private:std::string message;

};

Structure

• Add a single space after each comma delimiter;

• Add a single space around operators (==, &&, ...);

• Add a comma after each array item in a multi-line array, even after the last one;

• Add a blank line before return statements, unless the return is alone inside a statement-group (like an ifstatement);

• Use braces to indicate control structure body regardless of the number of statements it contains;

• Define one class per file - this does not apply to private helper classes that are not intended to be instantiatedfrom the outside;

• Declare class properties before methods;

5.1. Contributing 435

mangos-zero, Release 0.2.0

• Declare public methods first, then protected ones and finally private ones;

• Use parentheses when instantiating classes regardless of the number of arguments the constructor has;

• Exception message strings should be concatenated using sprintf().

Naming Conventions

• Use camelCase, not underscores, for variable, function and method names, arguments;

• Use underscores for option names and parameter names;

• Use namespaces for all classes;

• Prefix abstract classes with Abstract.

• Suffix interfaces with Interface;

• Suffix exceptions with Exception;

• Use alphanumeric characters and underscores for file names;

• Don’t forget to look at the more verbose Conventions document for more subjective naming considerations.

Documentation

• Add Doxygen blocks for all classes, methods, and functions;

• Omit the \return tag if the method does not return anything;

License

• mangos-zero is released under the GNU GPL version 2 license, and the license block has to be present at thetop of every file.

Conventions

This document describes coding standards and conventions used in the mangos-zero codebase to make it more con-sistent and predictable.

Method Names

We have not yet agreed on a convention for naming functions.

Deprecations

From time to time, some classes and/or methods are deprecated; that happens when a feature implementation cannotbe changed because of backward compatibility issues, but we still want to propose a “better” alternative. In that case,the old implementation can simply be deprecated.

A feature is marked as deprecated by adding a @deprecated Doxygen comment to relevant classes, methods,properties, ...:

436 Chapter 5. Contributing

mangos-zero, Release 0.2.0

/*** @deprecated Deprecated since version 1.X, to be removed in 2.Y. Use XXX instead.

*/

The deprecation message should indicate the version when the class/method was deprecated, the version when it willbe removed, and whenever possible, how the feature was replaced.

A deprecation error must also be triggered to help people with the migration starting one or two minor versions beforethe version where the feature will be removed (depending on the criticality of the removal):

DEBUG_LOG("XXX() is deprecated and will be removed in 2.Y. Use XXX instead.");

Git

This document explains some conventions and specificities in the way we manage the mangos-zero code with Git.

Pull Requests

Whenever a pull request is merged, all the information contained in the pull request is saved in the repository.

You can easily spot pull request merges as the commit message always follows this pattern:

merged branch USER_NAME/BRANCH_NAME (PR #1111)

The PR reference allows you to have a look at the original pull request on BitBucket:https://bitbucket.org/mangoszero/server/pull-request/1111.

Often, this can help understand what the changes were about and the reasoning behind the changes.

Code License

Version 2, June 1991

Copyright © 1989, 1981 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, theGNU General Public License is intended to guarantee your freedom to share and change free software – to make surethe software is free for all its users. This General Public License applies to most of the Free Software Foundation’ssoftware and to any other program whose authors commit to using it 1. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed tomake sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), thatyou receive source code or can get it if you want it, that you can change the software or use pieces of it in new freeprograms; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you tosurrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of thesoftware, or if you modify it.

1 Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.

5.1. Contributing 437

mangos-zero, Release 0.2.0

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients allthe rights that you have. You must make sure that they, too, receive or can get the source code. And you must showthem these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legalpermission to copy, distribute and/or modify the software.

Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warrantyfor this free software. If the software is modified by someone else and passed on, we want its recipients to know thatwhat they have is not the original, so that any problems introduced by others will not reflect on the original authors’reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributorsof a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this,we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying itmay be distributed under the terms of this General Public License. The “Program”, below, refers to any such programor work, and a “work based on the Program” means either the Program or any derivative work under copyright law: thatis to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated intoanother language. (Hereinafter, translation is included without limitation in the term “modification”.) Each licensee isaddressed as “you”.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.The act of running the Program is not restricted, and the output from the Program is covered only if its contentsconstitute a work based on the Program (independent of having been made by running the Program). Whether that istrue depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium,provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimerof warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any otherrecipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protectionin exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on theProgram, and copy and distribute such modifications or work under the terms of Section 1 above, provided that youalso meet all of these conditions:

• a) You must cause the modified files to carry prominent notices stating that you changed the files and the dateof any change.

• b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived fromthe Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of thisLicense.

• c) If the modified program normally reads commands interactively when run, you must cause it, when startedrunning for such interactive use in the most ordinary way, to print or display an announcement including anappropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty)and that users may redistribute the program under these conditions, and telling the user how to view a copy of

438 Chapter 5. Contributing

mangos-zero, Release 0.2.0

this License. (Exception: if the Program itself is interactive but does not normally print such an announcement,your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived fromthe Program, and can be reasonably considered independent and separate works in themselves, then this License, andits terms, do not apply to those sections when you distribute them as separate works. But when you distribute thesame sections as part of a whole which is a work based on the Program, the distribution of the whole must be on theterms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and everypart regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather,the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based onthe Program) on a volume of a storage or distribution medium does not bring the other work under the scope of thisLicense.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executableform under the terms of Sections 1 and 2 above provided that you also do one of the following:

• a) Accompany it with the complete corresponding machine-readable source code, which must be distributedunder the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

• b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge nomore than your cost of physically performing source distribution, a complete machine-readable copy of thecorresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarilyused for software interchange; or,

• c) Accompany it with the information you received as to the offer to distribute corresponding source code. (Thisalternative is allowed only for noncommercial distribution and only if you received the program in object codeor executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executablework, complete source code means all the source code for all modules it contains, plus any associated interfacedefinition files, plus the scripts used to control compilation and installation of the executable. However, as a specialexception, the source code distributed need not include anything that is normally distributed (in either source or binaryform) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs,unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offeringequivalent access to copy the source code from the same place counts as distribution of the source code, even thoughthird parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminateyour rights under this License. However, parties who have received copies, or rights, from you under this License willnot have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants youpermission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you donot accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program),you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing ormodifying the Program or works based on it.

5.1. Contributing 439

mangos-zero, Release 0.2.0

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives alicense from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. Youmay not impose any further restrictions on the recipients’ exercise of the rights granted herein. You are not responsiblefor enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgement or allegation of patent infringement or for any other reason (not limitedto patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict theconditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as tosatisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequenceyou may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistributionof the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfyboth it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of thesection is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contestvalidity of any such claims; this section has the sole purpose of protecting the integrity of the free software distributionsystem, which is implemented by public license practices. Many people have made generous contributions to the widerange of software distributed through that system in reliance on consistent application of that system; it is up to theauthor/donor to decide if he or she is willing to distribute software through any other system and a licensee cannotimpose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrightedinterfaces, the original copyright holder who places the Program under this License may add an explicit geographicaldistribution limitation excluding those countries, so that distribution is permitted only in or among countries not thusexcluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from timeto time. Such new versions will be similar in spirit to the present version, but may differ in detail to address newproblems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License whichapplies to it and “any later version”, you have the option of following the terms and conditions either of that versionor of any later version published by the Free Software Foundation. If the Program does not specify a version numberof this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are dif-ferent, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation,write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by thetwo goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse ofsoftware generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THEPROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATEDIN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS”WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIM-ITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR-POSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.

440 Chapter 5. Contributing

mangos-zero, Release 0.2.0

SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVIC-ING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANYCOPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PRO-GRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPE-CIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USETHE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED IN-ACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMTO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEENADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

13. In addition, as a special exception, permission is granted to link the code of with the OpenSSL project’s OpenSSLlibrary <http://openssl.org/> (or with modified versions of it that use the same license as the OpenSSL library), anddistribute the linked executables. You must obey the GNU General Public License in all respects for all of the codeused other than OpenSSL.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achievethis is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to mosteffectively convey the exclusion of warranty; and each file should have at least the “copyright” line and a pointer towhere the full notice is found.

<one line to give the program's name and a brief idea of what it does.>Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.

You should have received a copy of the GNU General Public License alongwith this program; if not, write to the Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of authorGnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w`.This is free software, and you are welcome to redistribute itunder certain conditions; type `show c' for details.

5.1. Contributing 441

mangos-zero, Release 0.2.0

The hypothetical commands show w and show c should show the appropriate parts of the General Public License.Of course, the commands you use may be called something other than show w and show c; they could even bemouse-clicks or menu items–whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a “copyright dis-claimer” for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your programis a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. Ifthis is what you want to do, use the GNU Lesser General Public License instead of this License.

5.1.3 Build System

Overview

mangos-zero does not provide any platform specific build files, such as GNU Makefiles or Visual Studio project files.

Instead we chose to use CMake, the Cross Platform Make toolkit, which basically allows us to define dependencies,libraries, servers and command line tools in simple text files which CMake then can turn into any build system youhave available at your hands.

Note: We currently use CMake version 2.8.x. The current build system has not yet been tested with CMake 3.

Best Practices

mangos-zero relies on CMake to produce build definitions and project files on various platforms, such as Linux,Windows or Mac OS X.

To ensure that our project can be built on most platforms we enforce a few rules when crafting CMakeLists.txtfiles.

Caution: These rules are preliminary and based on the experiences with our new unified CMake build definitions.Rules may change. Make sure to check back.

442 Chapter 5. Contributing

mangos-zero, Release 0.2.0

Introduction

Since we removed any platform specific build files, and just kept CMake build definitions, we have found a few ruleswhich will greatly ease maintaining our build system, and ensuring it works on all platforms.

As with all things, there is a certain order to CMake definitions that ensures thins will run smooth.

Includes First

CMake modules required come first

Sub directories

Any sub directories should follow.

Provide Options

Build switches a user can select.

Define the source

Source lists, includes, dependencies - based on build switches

Configure it

Variables and files to be combined

Build it

Add library, executable - link dependencies, based on build switches

Tune it

Set up compile time flags - based on build switches

Install it

Install built app/library, configured files, and others - based on build switches

5.1.4 Contributing Documentation

Some may say documentation is not important but we strongly believe documentation is what makes the differencebetween a normal project and an awesome project.

5.1. Contributing 443

mangos-zero, Release 0.2.0

Contributing to the Documentation

Documentation is as important as code. It follows the exact same principles: DRY, tests, ease of maintenance, exten-sibility, optimization, and refactoring just to name a few. And of course, documentation has bugs, typos, hard to readtutorials, and more.

Tip: If this is your first time thinking about writing documentation, have a look at Writing great documentation fromJacob Kaplan-Moss, one of the authors of Django, an awesome Python web framework.

Contributing

Before contributing, you need to become familiar with the markup language used by the documentation.

The mangos-zero documentation is hosted on BitBucket:

https://bitbucket.org/mangoszero/documentation

If you want to submit a patch, fork the official repository on BitBucket and then clone your fork:

$ git clone [email protected]:YOURUSERNAME/documentation.git

The develop branch holds the documentation for the development branch of the code.

Create a dedicated branch for your changes (for organization):

$ git checkout -b improving_foo_and_bar

You can now make your changes directly to this branch and commit them. When you’re done, push this branch to yourBitBucket fork and initiate a pull request.

Creating a Pull Request Following the example, the pull request will default to be between yourimproving_foo_and_bar branch and the documentation develop branch.

Note: The mangos-zero documentation is licensed under a Creative Commons Non-Commercial Attribution-ShareAlike 3.0 Unported License.

You can also prefix the title of your pull request in a few cases:

• [WIP] (Work in Progress) is used when you are not yet finished with your pull request, but you would like it tobe reviewed. The pull request won’t be merged until you say it is ready.

• [WCM] (Waiting Code Merge) is used when you’re documenting a new feature or change that hasn’t beenaccepted yet into the core code. The pull request will not be merged until it is merged in the core code (or closedif the change is rejected).

Pull Request Format Unless you’re fixing some minor typos, the pull request description must include the follow-ing checklist to ensure that contributions may be reviewed without needless feedback loops and that your contributionscan be included into the documentation as quickly as possible:

| Q | A| ------------- | ---| Doc fix? | [yes|no]| New docs? | [yes|no] (PR # on mangoszero/server if applicable)| Fixed tickets | [comma separated list of tickets fixed by the PR]

444 Chapter 5. Contributing

mangos-zero, Release 0.2.0

An example submission could now look as follows:

| Q | A| ------------- | ---| Doc fix? | yes| New docs? | yes (mangoszero/server#1250)| Fixed tickets | #1075

Tip: Online documentation is rebuilt on every code-push to BitBucket.

Documenting new Features or Behavior Changes

If you’re documenting a brand new feature or a change that’s been made in mangos-zero, you should precede yourdescription of the change with a .. versionadded:: 1.X tag and a short description:

.. versionadded:: 1.1The ``getCreaturesInRange`` method was introduced in **mangos-zero** 1.1.

Standards

All documentation in the mangos-zero Documentation should follow the documentation standards.

Reporting an Issue

The most easy contribution you can make is reporting issues: a typo, a grammar mistake, a bug in a code example, amissing explanation, and so on.

Steps:

• Submit new issue in the BitBucket tracker;

• (optional) Submit a patch.

Documentation Format

The mangos-zero documentation uses reStructuredText as its markup language and Sphinx for building the output(HTML, PDF, ...).

reStructuredText

reStructuredText “is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system”.

You can learn more about its syntax by reading existing mangos-zero documents or by reading the reStructuredTextPrimer on the Sphinx website.

If you are familiar with Markdown, be careful as things are sometimes very similar but different:

• Lists starts at the beginning of a line (no indentation is allowed);

• Inline code blocks use double-ticks (‘‘like this‘‘).

5.1. Contributing 445

mangos-zero, Release 0.2.0

Sphinx

Sphinx is a build system that adds some nice tools to create documentation from reStructuredText documents. Assuch, it adds new directives and interpreted text roles to standard reST markup.

Syntax Highlighting All code examples uses C++ as the default highlighted language. You can change it with thecode-block directive:

.. code-block:: text

############################################# MaNGOS realmd configuration file #############################################

[RealmdConf]ConfVersion=2010062001

Note: A list of supported languages is available on the Pygments website.

Configuration Blocks Whenever you show a configuration, you must use the code-block directive to show theconfiguration Text only format.

.. code-block:: text

############################################# MaNGOS realmd configuration file #############################################

[RealmdConf]ConfVersion=2010062001

The previous reST snippet renders as follow:

############################################# MaNGOS realmd configuration file #############################################

[RealmdConf]ConfVersion=2010062001

The current list of supported formats are the following:

Markup format Displayedcpp C++sql SQL Statementstext Text Only

Adding Links To add links to other pages in the documents use the following syntax:

:doc:`/path/to/page`

Using the path and filename of the page without the extension, for example:

446 Chapter 5. Contributing

mangos-zero, Release 0.2.0

:doc:`/contributing/code/license`

The link text will be the main heading of the document linked to. You can also specify alternative text for the link:

:doc:`License </contributing/code/license>`

Testing Documentation To test documentation before a commit:

• Install Sphinx;

• Run the Sphinx quick setup;

• Run make html and view the generated HTML in the build directory.

Documentation Standards

In order to help the reader as much as possible and to create code examples that look and feel familiar, you shouldfollow these standards.

Sphinx

• The following characters are chosen for different heading levels: level 1 is =, level 2 -, level 3 ~, level 4 . andlevel 5 ";

• Each line should break approximately after the first word that crosses the 72nd character (so most lines end upbeing 72-78 characters);

• The :: shorthand is preferred over .. code-block:: php to begin a PHP code block (read the Sphinxdocumentation to see when you should use the shorthand);

• Inline hyperlinks are not used. Separate the link and their target definition, which you add on the bottom of thepage;

• Inline markup should be closed on the same line as the open-string;

ExampleExample=======

When you are working on the docs, you should follow the`mangos-zero Documentation`_ standards.

Level 2-------

A C++ example would be::

#include <iostream>

int main(){

std::cout << "Hello World!";}

Level 3~~~~~~~

5.1. Contributing 447

mangos-zero, Release 0.2.0

.. code-block:: cpp

#include <iostream>

int main(){

std::cout << "Hello World!";}

.. _`mangos-zero Documentation`: http://docs.getmangos.com/en/latest/contributing/documentation/standards.html

Code Examples

• The code follows the Coding Standards;

• To avoid horizontal scrolling on code blocks, we prefer to break a line correctly if it crosses the 85th character;

• When you fold one or more lines of code, place ... in a comment at the point of the fold. These commentsare: // ... (cpp), # ... (bash/text), -- ... (sql);

• When you fold a part of a line, e.g. a variable value, put ... (without comment) at the place of the fold;

• Description of the folded code: (optional) If you fold several lines: the description of the fold can be placedafter the ... If you fold only part of a line: the description can be placed before the line;

• If useful to the reader, a C++ code example should start with the namespace declaration;

• When referencing classes, be sure to show the use statements at the top of your code block. You don’t need toshow all use statements in every example, just show what is actually being used in the code block;

• If useful, a codeblock should begin with a comment containing the filename of the file in the code block.Don’t place a blank line after this comment, unless the next line is also a comment;

• You should put a $ in front of every bash line.

Formats Configuration examples should show recommended formats using configuration blocks. The recommendedformats (and their orders) are:

• Configuration: text

Exampleclass adt_MCVT{

union{

uint32 fcc;char fcc_txt[4];

};uint32 size;

public:float height_map[(ADT_CELL_SIZE + 1) * (ADT_CELL_SIZE + 1) + ADT_CELL_SIZE* ADT_CELL_SIZE];

bool prepareLoadedData();};

448 Chapter 5. Contributing

mangos-zero, Release 0.2.0

Language Standards

• For sections, use the following capitalization rules: Capitalization of the first word, and all other words, exceptfor closed-class words:

The Vitamins are in my Fresh California Raisins

• Do not use Serial (Oxford) Commas;

• You should use a form of you instead of we (i.e. avoid the first person point of view: use the second instead);

• When referencing a hypothetical person, such as “a user with a session cookie”, gender-neutral pronouns(they/their/them) should be used. For example, instead of:

– he or she, use they

– him or her, use them

– his or her, use their

– his or hers, use theirs

– himself or herself, use themselves

Documentation License

The mangos-zero documentation is licensed under a Creative Commons Non-Commercial Attribution-Share Alike3.0 Unported License.

You are free:

• to Share — copy and redistribute the material in any medium or format;

• to Adapt — remix, transform, and build upon the material.

Under the following conditions:

• Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes weremade. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you oryour use;

• NonCommercial — You may not use the material for commercial purposes;

• Share Alike — If you remix, transform, or build upon the material, you must distribute your contributions underthe same license as the original.

With the understanding that:

• Waiver — Any of the above conditions can be waived if you get permission from the copyright holder;

• Public Domain — Where the work or any of its elements is in the public domain under applicable law, thatstatus is in no way affected by the license;

• Other Rights — In no way are any of the following rights affected by the license:

– Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;

– The author’s moral rights;

– Rights other persons may have either in the work itself or in how the work is used, such as publicity orprivacy rights.

• Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The bestway to do this is with a link to this web page.

5.1. Contributing 449

mangos-zero, Release 0.2.0

This is a human-readable summary of the Legal Code (the full license).

5.1.5 Community

Support

We have very friendly community which provides support for all mangos-zero users seeking help!

Statistics

You can always check getmangos.com/community to see an overview of our community at work!

Below, you can find more useful links:

• Server Pull Requests

• Recent Server patches

• Server issues

In addition to that, we also provide support for scripting using ScriptDev2:

• ScriptDev2 Pull Requests

• Recent ScriptDev2 patches

Finally, there is our own content database which is in active development:

• Database Pull Requests

• Recent Database patches

• Database issues

Note: Content related issues for both database content and scripts are tracked only on the database issue tracker.

• Code

– Bugs

– Patches

– Security

– Coding Standards

– Code Conventions

– Git

– License

• Build System

– Overview

– Best Practices

• Documentation

– Overview

– Format

450 Chapter 5. Contributing

mangos-zero, Release 0.2.0

– Standards

– License

• Community

– Support

– Statistics

• Code

– Bugs

– Patches

– Security

– Coding Standards

– Code Conventions

– Git

– License

• Build System

– Overview

– Best Practices

• Documentation

– Overview

– Format

– Standards

– License

• Community

– Support

– Statistics

5.1. Contributing 451