Skip to content

Create ObjectNames sql output is broken #222

Open
@Vincent-Michael

Description

@Vincent-Michael

Support current:

[DBFieldName("ObjectType", true)]
public ObjectType? ObjectType;

public enum ObjectType
{
Object = 0,
Item = 1,
Container = 2,
Unit = 3,
Player = 4,
GameObject = 5,
DynamicObject = 6,
Corpse = 7,
AreaTrigger = 8,
SceneObject = 9,
Conversation = 10,
Map = 11
}

Should but:

public enum StoreNameType
{
None,
Spell,
Map,
LFGDungeon,
Battleground,
Unit,
GameObject,
Item,
Quest,
QuestObjective,
QuestGreeting,
Opcode, // Packet
PageText,
NpcText,
Gossip,
Zone,
Area,
AreaTrigger,
Phase,
Player,
Currency,
Achievement
}

public static void GrabNameData()
{
if (!SQLConnector.Connected())
throw new DataException("Cannot get DB data without an active DB connection.");
foreach (StoreNameType objectType in ObjectTypes)
NameStores.Add(objectType, GetDict<int, string>(
$"SELECT `Id`, `Name` FROM `ObjectNames` WHERE `ObjectType`='{objectType}';"));
}

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29479773-create-objectnames-sql-output-is-broken?utm_campaign=plugin&utm_content=tracker%2F457228&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F457228&utm_medium=issues&utm_source=github).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions