mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 22:37:04 +00:00
Tree-like design idea by Faramir118, thanks for that! * Add `conditions` table to store conditions. * REPLACE current handling of conditions for the *_loot_template tables Convert the old conditions in *_loot_template to the new system by SQL-Queries * ADD support for new conditions to gossip_menu and gossip_menu_option. If for these tables no condition_id (new system) is provided, the old conditions will still be used * Add a small helper python script to contrib/convertConditions, see README there for details * Add new command to reload the `conditions` table (.reload conditions) * Add two Meta-Condition types CONDITION_AND (-1) and CONDITION_OR (-2) which are used as: value1 (as condition_entry) AND / OR value2 (as condition_entry) With these meta-conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest)) NOTE about conversion: For easier convertion all the old table data is still preserved, but will be removed eventually (within a circle of the moon approximately) The python script will not create an optimal initial fill of the `conditions` table. You might want to tweak it manually or suggest some optimized algorithm :) Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
38 lines
1.3 KiB
C
38 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef MANGOS_SQLSTORAGES_H
|
|
#define MANGOS_SQLSTORAGES_H
|
|
|
|
#include "Common.h"
|
|
#include "Database/SQLStorage.h"
|
|
|
|
extern SQLStorage sCreatureStorage;
|
|
extern SQLStorage sCreatureDataAddonStorage;
|
|
extern SQLStorage sCreatureInfoAddonStorage;
|
|
extern SQLStorage sCreatureModelStorage;
|
|
extern SQLStorage sGameObjectDataAddonStorage;
|
|
extern SQLStorage sEquipmentStorage;
|
|
extern SQLStorage sGOStorage;
|
|
extern SQLStorage sPageTextStore;
|
|
extern SQLStorage sItemStorage;
|
|
extern SQLStorage sInstanceTemplate;
|
|
extern SQLStorage sWorldTemplate;
|
|
extern SQLStorage sConditionStorage;
|
|
|
|
#endif
|