Commit graph

1186 commits

Author SHA1 Message Date
VladimirMangos
108feb993d [11127] Rename src/game/InstanceSaveMgr.* -> src/game/MapPersistentStateMgr.* 2011-02-10 05:35:07 +03:00
VladimirMangos
dde16bc48c [11126] Rewrite InstanceSaveMgr related code.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
  This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.

* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
   - MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
   - DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
   - BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())

   Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.

* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
  return DungeonPersistentState (same pointer in fact with proper subcalss type)

* InstanceResetScheduler renamed to DungeonResetScheduler
2011-02-10 05:20:56 +03:00
VladimirMangos
01178b69e5 [11124] Avoid save in DB instance/respawn data for BGs/Arenas.
* Fixed bug with not unloaded InstanceSave for BGs/ArenasPartly.
  This bug introduced with recent InstanceSave creating for all maps.
* Avoid save respawn data to DB for BGs/Arenas.
  No reason save to DB because BGs/Arenas reset at map unload.
* Always create InstanceSave for Map without recheck suggested data integrity.
  Map::GetInstanceSave expected always return != NULL value.
2011-02-09 18:34:29 +03:00
SilverIce
b2d81eae1b [11114] Reset camera view at removing from world
this helps us to clean reference between viewpoint and camera in some cases
2011-02-07 03:50:04 +02:00
Schmoozerd
8e68d1bcaf [11105] Melee attacks distance
Inspired by patch provided by Feanordev.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-03 01:25:32 +03:00
zergtmn
d30a757e86 [11074] Fix structure of MSG_MOVE_TELEPORT_ACK 2011-01-27 00:31:46 +05:00
Ambal
7ef75985b9 [11055] Save pet related data in one single transaction. Also merge Pet::DeleteFromDB() queries into one single transaction request.
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-01-21 00:07:05 +02:00
VladimirMangos
784c0ca781 [11017] Finaly restore non-crashing non-in-world logout.
For example at close client with far teleport loading screen.
2011-01-16 20:38:48 +03:00
VladimirMangos
f7d49a4254 [11007] Implement use personal loot slot types that fix problems with some loot cases.
For example it fix looting 43016.

Also use enum and clarify uses diff loot slot types.
2011-01-14 19:03:54 +03:00
VladimirMangos
7864d7f07f [11005] Finish structure of inspected item fields.
Also restore items inspect show in case disabled talent inspection.
2011-01-14 11:42:14 +03:00
VladimirMangos
8d62e9dbf7 [11004] Fixed not apply spell for current form at learning.
Some non-passive spells autocasted at shapeshift but without fix
in case already active form at like spell learning it not has been casted
in different from passive similar spells.

This is fix apply dodge chance part of spell 17002 for described case.
2011-01-14 03:59:22 +03:00
VladimirMangos
39e7b19267 [10989] Implement post-3.1 and later fishing changes.
* Fishing now prowide junk loot at fail skill check.
  This can be disabled for old way work using SkillFail.Loot.Fishing option.
  Junk loot expected to be listed in fishing_loot_template entry 0.

* Fishing can gain skill grow at skill fail check case.
  Controlled by SkillFail.Gain.Fishing option.

* Fishing from fishing pool gameobject can't be fail.
  Controlled by SkillFail.Possible.FishingPool
2011-01-09 14:37:56 +03:00
VladimirMangos
324c8c4cd2 [10985] More safe for use PET_FOLLOW_ANGLE define. 2011-01-08 05:48:00 +03:00
Pat S
af50b352b2 [10977] Add ghost speed rate in config: Death.Ghost.RunSpeed.
Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-07 06:45:25 +03:00
VladimirMangos
1b5a82bccd [10975] Report error about not existed item loot data only if item not have money loot. 2011-01-07 02:35:04 +03:00
VladimirMangos
231c6d77ce [10969] Some cleanups in MailDraft API
* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items its can't be just shared
  and need preoprtly cloned, but item close is high price operation (guid use, DB tiuched and etc)
  So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.
2011-01-06 02:11:21 +03:00
NoFantasy
b3076146fc [10958] Rename function to CanUseEquippedWeapon
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-04 10:29:04 +01:00
QAston
4fe41fb335 [10957] Implement auras SPELL_AURA_MOD_DISARM_OFFHAND (254) and SPELL_AURA_MOD_DISARM_RANGED (278).
Thanks to Qsa prepare for mangos.

Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-04 06:42:35 +03:00
VladimirMangos
9cdafee907 [10954] Drop not help clarify code comments. 2011-01-03 19:54:27 +03:00
VladimirMangos
a0e298179c [10952] Don't use singleton to access static functions. 2011-01-03 14:55:55 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
Lynx3d
d4018322b9 [10944] Lock action buttons before unlearning talents on spec switch.
This prevents client from automatically requesting removal of buttons that use unlearned spells.
2010-12-31 00:54:12 +01:00
zergtmn
0b7e78d2a7 [10938] Some adjustments to script calls OnQuestChooseReward replaced with OnQuestRewarded. Also fix compile in VC 8.0 and VC 9.0. 2010-12-30 01:27:13 +05:00
NoFantasy
f8921dbca8 [10928] Uncomment all races in enum Races
Race can also be creature race and needed for future implementation of spells.
RACE_UNDEAD_PLAYER renamed to more proper RACE_UNDEAD

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-12-28 19:53:01 +01:00
Ambal
b11820593c [10924] Send time diff between Update() calls for object - should help with mob respawn on inactive grids etc. Based on patches by VladimirMangos and cipherCOM. All issues from previous patches should be finally fixed now.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-12-27 22:27:20 +02:00
zergtmn
14c1329ea5 [10919] Actually use spell penetration gained by items in calculations 2010-12-24 21:18:23 +05:00
Astellar
a13f8714f2 [10918] Add support for ITEM_MOD_SPELL_PENETRATION
Signed-off-by: zergtmn <zerg@myisp.com>
2010-12-24 19:48:27 +05:00
zergtmn
0d6f990e4e [10912] Move scripting related functions from ObjectMgr to ScriptMgr 2010-12-24 00:23:37 +05:00
zergtmn
72255d1bb1 [10904] Cleanup character_battleground_data when deleting characters from database 2010-12-21 18:37:36 +05:00
zergtmn
2f4e7a9377 [10901] Allow vehicles to have gossip menu
In addition rename IsGameobject -> IsGameObject.
2010-12-21 15:14:52 +05:00
VladimirMangos
090b70c509 [10881] Lost important line in prev. commit. 2010-12-16 21:47:25 +03:00
VladimirMangos
5b79ef7a5d [10880] Avoid constant re-save BG entry data at each save for player at bg/arena. 2010-12-16 21:39:51 +03:00
lightman
26dbb072e5 [10878] Update achievement at maximize skill level by command or config option.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-14 23:13:07 +03:00
Emtec
73859988ad [10870] Properly remove deleted character from friends of online players.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-13 18:56:35 +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
a2e74f182f [10857] Complete set Byte/ShortFlag value functions and use it for PLAYER_FIELD_BYTES proper access.
Not expected any changes in work.
2010-12-11 14:07:09 +03:00
VladimirMangos
4c02094737 [10834] Cleanup shapeshift form code. 2010-12-07 14:41:59 +03:00
TOM_RUS
c7a4f74676 [10824] Fixed copy-paste typo in prev. commit. 2010-12-04 11:41:47 +03:00
VladimirMangos
b967848e42 [10823] Clear way access/set UNIT_FIELD_BYTES_*/PLAYER_BYTES* byte fields.
Fix some bugs when all uint32 field modified instead byte parts.
In some cases added byte way set/get but code line itself need additinal reserch/fix
for use correctness in line pos.
2010-12-04 11:15:19 +03:00
zerg
5f099d5fc0 [10821] Restore anti-cheating check work at buy item
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-04 02:07:59 +03:00
VladimirMangos
534d43daa1 [10820] Speedup and cleanup quest counters update code.
* Always use QuestStatus data for current counters set
  This let be sure that that we not have non sync values in client view and server state.
* Remove some access functions for quest update fields that expected to be only updated/set.
2010-12-03 06:09:00 +03:00
VladimirMangos
957c9331a9 [10813] Use ObjectGuid for aura holder cast item guid.
Still exist 7 GUID_LOPART uses in code.
2010-12-02 08:02:22 +03:00
VladimirMangos
b305f203b9 [10811] Use ObjectGuids in chat commands.
Still exist 15 GUID_LOPART uses in code.
2010-12-02 07:09:11 +03:00
VladimirMangos
c6d3c5e0d6 [10810] More ObjectGuids specially in petition code.
Some uint64<->uin32 bugs fixed at read guids from DB in petition code.

Still exist 29 GUID_LOPART uses in code.
2010-12-02 05:17:00 +03:00
VladimirMangos
090bdf1dc7 [10803] Use ObjectGuid in player loading code. 2010-12-01 15:27:41 +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
VladimirMangos
6d13cd6553 [10800] Use ObjectGuid in some battleground structures.
Also fix some catches bugs in code in result.
2010-12-01 11:24:35 +03:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +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
ce09cb70a2 [10769] Fixed trainer flags uses for pet trainers.
* Not exclude trainer flags for client for pet trainers.
* Not report error for pet trianers empty spell lists.

TODO:
* Add check for redundent trainer spell data for pet trainers at server startup
* Need hide train gossip option for pet trainers, but currently without it gossip
  window not open for pet trainer by some unknown reason.
2010-11-22 00:34:52 +03:00