Commit graph

558 commits

Author SHA1 Message Date
zergtmn
a1e0111638 [10909] Code style cleanups in scripting related functions 2010-12-23 19:01:30 +05:00
VladimirMangos
4a7638c80e [10905] Fixed vendor templates work.
* Avoid unexpected errors at template loading for shared templates for many npc.
* Really use vendor template in work.
2010-12-21 19:39:43 +03:00
VladimirMangos
1d84a8de1d [10897] Small typos in error message. 2010-12-20 23:03:13 +03:00
VladimirMangos
add4ceb999 [10896] Detect self-referenced model info in creature_model_info. 2010-12-20 20:33:31 +03:00
Warlord123
3e1c04fc6e [10893] Speedup check code at gossip_menu_option loading.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-19 21:54:00 +03:00
NoFantasy
f59edc66ad [10882] No error output for empty npc_trainer* tables
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-12-17 12:28:37 +01:00
VladimirMangos
1d8f222621 [10867] Implement templates for trainer spell data in npc_trainer_template.
New table let avoid duplication similar trainer spells for different trainers.
2010-12-13 16:39:53 +03:00
Quriq14
c7205a6837 [10862] Fixed not show and lost mail items in returned expire mails.
Also
* Use typename for mail item info vector.
* Include tools/characters_mail_items_cleanup.sql for cleanup lost mail items.
  It also included as sql update part. Sql update also fix receiver for stored
  in DB expired mail items.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-12 09:10:08 +03:00
VladimirMangos
80712b928a [10825] Move specific SQLStorage defines to game dir
This let have in shared dir only generic declarations of class SQLStorage
Not game specific details.
2010-12-05 03:29:11 +03:00
VladimirMangos
938622bedc [10802] Use ObjectGuid in Mail code.
Some catched bugs fixed in mixed uint32/guid values using cases.
2010-12-01 15:11:08 +03:00
NoFantasy
afe50cd549 [10797] Check for valid sheath state in creature addon at startup.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-11-30 09:42:51 +01:00
VladimirMangos
abc6dfca98 [10792] Fixed warnings and need in redundent char* casts in database access code. 2010-11-29 00:47:11 +03:00
VladimirMangos
cc0655a402 [10782] Use Team enum types in all appropriate cases and catches bug in result fix.
* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
2010-11-25 01:11:17 +03:00
VladimirMangos
fe5fc994a6 [10776] Not mark reputation_spillover_template empty state as error
Now expected by default data used from dbc fields.
2010-11-22 12:38:58 +03:00
VladimirMangos
c2096380cf [10752] Convert to objetguids map scripts and finally drop IS_PLAYER_GUID. 2010-11-20 02:38:56 +03:00
Ambal
f67d89f109 [10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-11-16 21:08:28 +02:00
VladimirMangos
4aa239ac8c [10720] Implement check gossip_menu_option.npc_option_npcflag.
For cases main menu options used by creature but impossible show in result absent
related npcflags for any creatures used that menu.
2010-11-11 18:08:53 +03:00
VladimirMangos
bfec27707a [10714] Avoid unexpected error at action_menu_id < 0 after recent loading checks adding. 2010-11-10 04:38:27 +03:00
VladimirMangos
a87648c56b [10712] Startup checks for gossip_menu and gosip_menu_option table data.
Existance `gosup_menu` id refercned from gameobject field and unused meni ids
activated only with disabled LogFilter_DbStrictedCheck.
2010-11-10 01:00:14 +03:00
VladimirMangos
534ff29f15 [10711] Check localization data for existance main table entres.
Data will skipped for nonexistent entries, and reported with
disabled LogFilter_DbStrictedCheck filter.
2010-11-09 20:26:59 +03:00
NoFantasy
7032423d6f [10704] Add the option to close gossip window in gossip system
Field action_menu_id in gossip_menu_option table can be set to -1 where close gossip is expected, instead of sending a new menu.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-11-08 23:18:58 +01:00
blueboy
ee8cc71e38 [10692] Fixed wrongly use %d for guids in DB queries.
This can affect correct result in cases big guid values
(out of range for possitive part of int32 range) at x86 platforms.

Some other cases addded in addition to original patch fixes
where %d wrongly/unsafe used for unsigned values.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-07 22:10:37 +03:00
VladimirMangos
10d3d3ce24 [10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
2010-11-07 21:30:55 +03:00
VladimirMangos
2f144d9d29 [10682] New table 'item_convert' for convertion items.
* Implment vendor at show replace BoA item with reputation requirement
  by identical item without rep. reqs for player that fit this requirements
  of original item.

* Table also can be used for store item convertion data form one team items
  to similar other team items. This case not impement but added function easy
  used for it.

* Note: strict single convert for item not created problem for both way use:
  item converted for same team or all, can't be original item for conversion to
  another team.
2010-11-05 00:41:16 +03:00
VladimirMangos
0bf8b0aa79 [10679] New table npc_vendor_template for comon item data for diff vendors.
In vendor list show own vedor items + template ites if any.
Vendor template item lists selected by id stored in creature_template.vendor_id
2010-11-04 20:22:47 +03:00
VladimirMangos
97ff7e6006 [10668] Implement CONDITION_*ITEM_WITH_BANK conditions.
Similar CONDITION_*ITEM but including character bank content in counting.
2010-11-01 06:26:20 +03:00
Deleterios
549b44d8ec [10664] Rename arena_team_stats fields for better fit to stored values.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-01 02:37:10 +03:00
VladimirMangos
f48e768a70 [10662] Implement partly item looting
* Not deleted normal item loot at first loot window close.
* Save current item loot content to DB for later continue looting.
* Cleanup spell effect SPELL_EFFECT_OPEN_LOCK check code
* Cleanup Player::AutoStoreLoot calls
2010-11-01 02:04:08 +03:00
NoFantasy
506e93d15d [10658] Add enum as argument for quest special/flags functions
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-30 01:47:37 +02:00
NoFantasy
b6e367bf3c [10657] Separate quest_template.QuestFlags from SpecialFlags
Create enum for SpecialFlags (database flags and internally computed)
Added related functions for specialFlags and update code accordingly.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-30 01:14:17 +02:00
NoFantasy
1210c6d978 [10656] Rename quest function HasFlag to HasQuestFlag
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-29 21:19:35 +02:00
NoFantasy
a38f97f71c [10655] Add support for monthly quests
Quest that can repeated each month are set by quest_template.SpecialFlags |0x04 flag
Quest are reset at midnight the first day of each month.
Note: for the time being, quest must also be set repeatable (SpecialFlags |0x01)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-29 20:39:01 +02:00
VladimirMangos
b09838fe3b [10644] Remove wrong check preventing lootable itesm have at-use spell casts.
But note: like at use spells cast at loot open not implemnted yet.

Also fixed typo in ITEM_DYNFLAG_READABLE.
2010-10-26 10:43:38 +04:00
VladimirMangos
46d740bbf4 [10641] Fixed use item dynamic/item proto flags.
* List its independelty. Each from this 2 fields have own flags. Cleanup lists.
* Not copy proto flags to item flags update field. This fix heroic item versions
  show in client in result mixed use ITEM_DYNFLAG_WRAPPED (0x8) with ITEM_FLAG_HEROIC (0x8)
* Update uses to proto case use for some cases where before wrongly has been used item dyn.flags
* For ITEM_DYNFLAG_UNLOCKED (0x4) set for item at unlock and check for prevent re-unlocking.
  This mostly for future case when will be implemented partly loting items support.
* For ITEM_FLAG_LOOTABLE (0x4) check loot absent or conflicting setting with containers/casted at use items.
  Report wrong cases art loading.
* Better check related loot tables content using ITEM_FLAG_PROSPECTABLE and ITEM_FLAG_MILLABLE
2010-10-25 16:27:14 +04:00
Tasssadar
d53fe93e9d [10640] Implement instance guids with proper HIGHGUID_INSTANCE use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-10-24 14:54:11 +04:00
NoFantasy
77b064e19a [10621] Add new field RequiredClasses for quest_template
* SkillOrClass is converted to RequiredSkill (and then field can contain skill id only)
* Field ZoneOrSort has no longer a function in quest requirement, and RequiredClasses must be used instead where class limits are expected.

To restrict a quest to one class or more, use bitmask of class in RequiredClasses. RequiredSkill works like before.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-19 00:33:16 +02:00
VladimirMangos
d3c1780f55 [10617] Fixed array access in SCRIPT_COMMAND_TALK loading check. 2010-10-18 04:56:27 +04:00
zerg
2fa5fa43bd [10594] Use equal_range instead of lower_bound/upper_bound pairs
(based on zergtmn's repo commit 0499169)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-10-09 01:37:57 +04:00
NoFantasy
0caa0e32dd [10593] Cleaning up code a bit, in related functions for recent commits
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 22:11:26 +02:00
NoFantasy
795c3e1f2f [10592] Make GO type 2 activate/deactivate
As with similar GO's that are not interactable (gameobject_template.flags|4) as default, GO's of type 2 becomes active when player can take a quest (or deliver quest).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 20:48:51 +02:00
kamikazetg
8bb27ebd8e [10591] Simplify LoadGameObjectForQuests for case GO type 3
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 12:45:36 +02:00
NoFantasy
b0d5e3e51a [10589] Always activate GO type 3 when quest id is defined (and active)
GO may be "lootless", but events at looting can happen

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 10:21:52 +02:00
NoFantasy
fc2e66231b [10588] Make GO type 8 activate and sparkle at related quest active
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 09:40:28 +02:00
NoFantasy
657894786a [10587] Make GO type 5 sparkle at related quest active
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 09:10:38 +02:00
virusav
9f2e36c7f0 [10520] Implement CONDITION_QUEST_NONE
For case when need check that quest not taken and not completed in past.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-23 12:33:43 +04:00
NoFantasy
8ccf9c7464 [10508] Arrange case SCRIPT_COMMAND_ in correct order, also in ObjectMgr
Some additional code style corrections.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-20 00:20:41 +02:00
NoFantasy
29a723e41e [10507] Extend SCRIPT_COMMAND_TALK with option to set language for text
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-19 20:50:18 +02:00
NoFantasy
a1fd19b6b3 [10506] Implement 5 new SCRIPT_COMMAND_*
All commands can only have creature as the affected by command
*_SET_ACTIVEOBJECT - switch activeObject state on/off
*_SET_FACTION - changes faction
*_MORPH_TO_ENTRY_OR_MODEL - changes model to model from creature_template entry or model id explicit
*_MOUNT_TO_ENTRY_OR_MODEL - mounts on model from creature_template entry or model id explicit
*_SET_RUN - switch walkmode on/off

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-19 19:27:33 +02:00
zergtmn
20f4a16f01 [10503] Move *_respawn tables to characters DB.
This allow have in `mangos` DB only world static state data.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-19 00:45:21 +04:00
NoFantasy
0245efecb7 [10500] Extend SCRIPT_COMMAND_TALK to support random selected text
In addition to adding fields for text id storage (in total 4 text id's), also added a comments field for developers notes in scripts (it may help those being old of age to remember what goes on in a script).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-18 01:55:29 +02:00