Commit Graph

105 Commits

Author SHA1 Message Date
click
ee705bba32 Core/OjectMgr: Properly load guildbank items (and some minor cleanups)
- fixes issues where guildbanks looked empty but weren't
- kudos to Linencloth for the discussion and thorough breakdown of this issue
Closes issue 4199.

--HG--
branch : trunk
2010-09-27 04:16:41 +02:00
click
461590832a Core: Generic cleanup (tab2spaces/whitespace removal)
--HG--
branch : trunk
2010-09-25 22:03:57 +02:00
Machiavelli
3c6dc32030 Core/DBLayer:
- Rewrite Field class to be able to store both binary prepared statement data and data from adhoc query resultsets
- Buffer the data of prepared statements using ResultSet and Field classes and let go of mysql c api structures after PreparedResultSet constructor. Fixes a race condition and thus a possible crash/data corruption (issue pointed out to Derex, basic suggestion by raczman)
- Conform PreparedResultSet and ResultSet to the same design standards, and using Field class as data buffer class for both
* NOTE: This means the fetching methods are uniform again, using ¨Field* fields = result->Fetch();¨ and access to elements trough fields[x].
* NOTE: for access to the correct row in prepared statements, ¨Field* fields = result->Fetch();¨ must ALWAYS be called inside the do { }while(result->NextRow()) loop.
* NOTE: This means that Field::GetString() returns std::string object and Field::GetCString() returns const char* pointer.

Still experimental and all that jazz, not recommended for production servers until feedback is given.

--HG--
branch : trunk
2010-09-24 22:16:21 +02:00
azazel
eae0e5c822 Scripts/DB_Scripts: massive cleanup of SCRIPT_COMMAND_* related staff
* add union into ScriptInfo structure (thanks NoFantasy for the idea);
* move scripts methods from Map.cpp to new file MapScripts.cpp;
* remove magic numbers and introduce eScriptFlags enumeration.

It's just a beginning and more changes to come. Stay tuned!

--HG--
branch : trunk
2010-09-22 18:13:57 +06:00
Shauren
d8ddf38453 Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements
Core/Items: Fixed loading of enchantments

Closes issue #4130.

--HG--
branch : trunk
2010-09-21 21:55:16 +02:00
Rat
cf93313316 Scripts/DB_Scripts: enable DB scripts to use CHAT_MSG_RAID_BOSS_WHISPER (42) as chat type
--HG--
branch : trunk
2010-09-20 21:58:14 +02:00
Shauren
a509976369 Core/DBLayer: Converted player login queries into prepared statements
Core/DBLayer: Added missing implementation for SQLQueryHolder::SetPreparedQuery

--HG--
branch : trunk
2010-09-20 18:20:40 +02:00
Machiavelli
188165b7bf Core/ObjectMgr: Fix another possible crash in guild loading. This should be the last of them.
--HG--
branch : trunk
2010-09-19 17:37:59 +02:00
Machiavelli
21c85a155c Core/ObjectMgr:
- Fix a startup crash in guild loading when loading from the guild subtables with an invalid guild ID.
- Abort loading guild subtables if no entries were found in guild table
- Code style cleanup in affected functions
Fixes issue #4095

--HG--
branch : trunk
2010-09-19 15:41:26 +02:00
Machiavelli
a25ef43223 Core/DBLayer,ObjectMgr: ´linkedGuid´ parameter WORLD_REP_CRELINKED_RESPAWN should be uint32
--HG--
branch : trunk
2010-09-19 10:53:20 +02:00
silinoron
65a50ed3a2 Core/DBLayer: Some more prepared statements in ObjectMgr.
Core/ObjectMgr: Some additional cleanup.

--HG--
branch : trunk
2010-09-18 19:49:17 -07:00
silinoron
1e127eef73 Core/DBLayer: Change some regular statements to prepared statements.
Patch by thyros82@gmx.de.
Fixes issue #3774

--HG--
branch : trunk
2010-09-18 19:21:03 -07:00
linencloth
6bad14d5a2 Core: Revert async query handling in the guild loading code to remove coding style issues.
Also fixes the compiling on Linux.

--HG--
branch : trunk
2010-09-19 01:31:39 +02:00
linencloth
33babfa2d2 Core: Optimize guild loading
--HG--
branch : trunk
2010-09-18 21:24:05 +02:00
linencloth
19a76020bc Core: more cleanup at locale handling.
Also fixes some problems mainly with non English languages.

--HG--
branch : trunk
2010-09-17 19:55:54 +02:00
Shauren
164d6cce65 Core: Better tracking of quest POI loading (progress bar)
--HG--
branch : trunk
2010-09-17 14:58:30 +02:00
linencloth
d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
linencloth
5de48a67c6 Core: Optimize quest POI points loading
--HG--
branch : trunk
2010-09-17 04:25:00 +02:00
Shauren
05ccd476be Core/Quests: Added index column for quest poi points forcing them to load in certain order
--HG--
branch : trunk
2010-09-16 19:58:06 +02:00
azazel
236356628a Scripts/Quests:
* add support for quest 12634 Some Make Lemonade, Some Make Liquor (implement 51840 spell and Adventurous Dwarf AI, thanks akadabeer)
* implement dummy effect for 49587 Seeds of Nature's Wrath spell (used in quest 12459 That Which Creates Can Also Destroy)
* implement dummy effect for 19512 Apply Salve spell (used in quest 6124/6129 Curing the Sick)
Scripts/Misc: some cleanup in chat log
Core/Locales: fix issue when default locale for trinity_string strings was not used (thanks Aokromes for testing).

--HG--
branch : trunk
2010-09-16 13:14:14 +06:00
Shauren
102e51d620 Core/Pools: Implemented quest pooling
Core/DBLayer: Added GetNumRows() method to PreparedResultSet

--HG--
branch : trunk
2010-09-14 13:56:27 +02:00
Spp
c7289967b0 Code Style: Tab to spaces
--HG--
branch : trunk
2010-09-13 09:51:40 +02:00
Spp
6e55c22a12 Core: Add function to find players by low guid
--HG--
branch : trunk
2010-09-13 09:16:57 +02:00
click
bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
Machiavelli
a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
Spp
279d40efdc Core/Groups: Store group member roles to DB
--HG--
branch : trunk
2010-09-10 13:40:20 +02:00
silinoron
be7d94f24e Add support for character race and faction transfers.
Based (loosely) on patch by Ner'zhul, DarkXuan, and darkshines@sakha.net.
Fixes issue #3429.

--HG--
branch : trunk
2010-09-05 13:12:24 -07:00
Shauren
0f9fe8dbeb Core/Players: Don't set instanceId to 0 when player is on transport during loading, there CAN be transports inside instances
Core/Scripts: Added waypoint id to OnRelocate transport hook
Core/Scripts: Make use of ZoneScript::GetGameObjectEntry at gameobject creation (makes it possible to override gameobject entries in instances)
Core/Transports: Call InstanceScript::EventInform for transport events
Core/Transports: Use guid from db for transports, not just its entry - adds partial support for instancing them (still cannot use transports table for it, but can spawn manually now)
Scripts/Icecrown Citadel: Fixed crash in Deathbringer Saurfang when event is started by more than one person (can't do this anymore)

Closes isssue #3749.

--HG--
branch : trunk
2010-09-02 10:40:32 +02:00
Machiavelli
2c1c391597 Core/DBLayer:
- Example implementation of prepared statement in ObjectMgr::SaveCreatureRespawntime
- #include "MYSQLThreading.h" -> #include "MySQLThreading.h" (*really* fixes Linux build)

--HG--
branch : trunk
2010-09-03 00:44:27 +02:00
Shauren
cd182a1e8f Fixed build
Fixed wrong header includes in new database files, thx Thyros

--HG--
branch : trunk
2010-09-02 20:22:19 +02:00
Shauren
e9ff90a967 Fix *SOME* build errors
--HG--
branch : trunk
2010-09-02 18:20:59 +02:00
Machiavelli
0117af4c37 Core/DBLayer:
- Implement deriviate classes of MySQLConnection for every database type (world, realm, characters)
- Make DatabaseWorkerPool templatized and use the above mentioned classes as parameter
- Implementation of the new types in code
(This is in preparation of prepared statement interface)

--HG--
branch : trunk
2010-09-02 17:47:50 +02:00
Spp
866c28fbec Core/Groups: Fix a crash loading groups from DB
Fixes issue 3693

--HG--
branch : trunk
2010-08-31 11:50:07 +02:00
Spp
405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
silinoron
08205afcc9 Rewrite much of the GM ticket system
* Extract storage and manipulation of tickets to TicketMgr (from ObjectMgr)
* Extract ticket commands to TicketCommands.cpp
* Adds support for sending GM responses and GM surveys.
* Fix structure of several ticket-related packets.
* Add support for understanding lag reports.
* Thanks Zor for some of the packet structures, and Cyrax for some sniffs
* Please report any issues encountered via the tracker.

--HG--
branch : trunk
2010-08-29 20:28:14 -07:00
Shocker
e3b92f9630 Implement .reload all_gossips, .reload quest_poi, .reload locales_gossip_menu_option. Original code by VladimirMangos, ported by Ramus. Closes issue #3466, issue #3637 and issue #3477
--HG--
branch : trunk
2010-08-28 01:44:35 +03:00
Liberate
9bd804dece Updates the arena rating system to use Matchmaker Rating.
The arena_team_stats sql in this commit sets all ratings to 0.
You start with 0 Team Rating and 1500 Matchmaker Rating.
Personal rating is moved to character_arena_stats, and will not reset when disbanding an arena team.
This new system is based on all the info I could get, but Blizzard didn't leak much info about the new system.
At least this system is really close to the official system.
Any issues found should be reported in an issue.
Huge thanks go to Aokromes for the intensive testing he has done with me.
Also thanks to Parzival for hearing me out and giving his ideas.
Fixes issue #3189

--HG--
branch : trunk
2010-08-27 18:18:26 +02:00
azazel
e3c2bdb722 Core/Cleanup: move repeating code for locale strings retrieval into separate method. Related code cleanup.
--HG--
branch : trunk
2010-08-27 00:57:49 +06:00
azazel
5fa14f58dc Core/Cleanup:
* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know)
* fix 'signed/unsigned' warnings (at least in VS)
* fix some other warnings and cleanup relative code

--HG--
branch : trunk
2010-08-26 15:54:56 +06:00
Shocker
87e3700981 Typo in previous commit, I apologize
--HG--
branch : trunk
2010-08-26 06:57:50 +03:00
Shocker
2748f86bdb Fix crash when using a pool template with an entry > 65535, fixes issue #3632
--HG--
branch : trunk
2010-08-26 06:49:31 +03:00
silinoron
aaaeecc916 Add support for vehicle scaling based on item level.
Requires database data.
Fixes issue #2754

--HG--
branch : trunk
2010-08-24 15:04:34 -07:00
silinoron
9b75f358ba Implement ACTION_T_MOUNT_TO_ENTRY_OR_MODEL (43) for creature eventAI.
Read doc/EventAI.txt for details.
Originally by NoFantasy.

--HG--
branch : trunk
2010-08-24 10:34:35 -07:00
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
QAston
07a3a1254b *Add AuraScript class for scripting aura objects - scripts are registered same way as SpellScripts, bound to SpellScriptNames table. For more details see example_spell.cpp and SpellScript.h
*Rename SpellHandlerScript to SpellScriptLoader, EffectHandlerFn to SpellEffectFn, HitHandlerFn to SpellHitFn, SpellScript::EffectHandlers to SpellScript::OnEffect, these changes were neccesary to prevent namespace collisions, happily you can solve these by simple find and replace
*Make spells 66244 and 5581 example scripts.

--HG--
branch : trunk
2010-08-24 00:10:49 +02:00
Spp
a136403dee Core: Remove "suggest parentheses around ‘&&’ within ‘||’" and "suggest parentheses around assignment used as truth value" warnings
--HG--
branch : trunk
2010-08-21 21:54:41 +02:00
Spp
e7856a831c Core: Remove "enumeration value 'xxx' not handled in switch" warnings
--HG--
branch : trunk
2010-08-21 20:55:31 +02:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
azazel
812b6694f9 Core/DB scripts:
* provide more information in error messages for DB scripts
* cleanup in DB scripts code

--HG--
branch : trunk
2010-08-20 14:57:05 +06:00
azazel
a200de3b5f Core
* Cleanup in LoadScripts method and related stuff (use enum instead of string to differentiate between script maps)
* Fix creation of id and sanity checks for spell_scripts. Should fix warnings about missing spells with id > 65535

--HG--
branch : trunk
2010-08-20 12:19:14 +06:00