Commit graph

1120 commits

Author SHA1 Message Date
zergtmn
6498941ead [11430] Introduce GuildMgr
Move all guild-related functions from our overpowered ObjectMgr to GuildMgr.
Thx leak for idea.
2011-05-06 19:27:36 +06:00
VladimirMangos
66598c8815 [11397] Prevent happens one from cases "alive ghost" state.
Sometime levelup possible for dead player, prevent reset health in this case.
2011-04-26 04:48:15 +04:00
TOM_RUS
730a907252 Use enum InventoryResult as return type for few functions. 2011-04-24 02:48:35 +04:00
Lynx3d
23a861e4a6 [11390] Fully fix equipment set save...hopefully. 2011-04-23 08:21:17 +02:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
VladimirMangos
6c22335e9a [11362] Really reset UNIT_DYNAMIC_FLAGS at player death 2011-04-15 18:43:18 +04:00
NoFantasy
2c09c11091 [11357] Replace some 0-values with UNIT_DYNFLAG_NONE
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-15 11:07:55 +02:00
VladimirMangos
adcb84a325 [11355] Use ArenaType enum instead raw values
* Drop duplicate ArenaTeamTypes
* Use enum type where appropriate
* More strict check integrity arena team data at loading.
2011-04-15 03:19:12 +04:00
BThallid
919ab70452 [11352] Send SMSG_NEW_WORLD after teleport destination set.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-04-14 17:53:47 +04:00
TOM_RUS
0f8c46878b Updated some structs and enums. 2011-04-14 08:14:03 +04:00
VladimirMangos
16c562b7a0 [11331] Fixed equipment set save.
This resolve problem with wrong equipment set name show after relog
but only for new saved equipment sets. Old sets still have wrong names.
2011-04-11 23:55:21 +04:00
zergtmn
4687fa8cb4 [11299] Handle aura durations in SpellAuraHolder
- Unit::CalculateSpellDuration split into two functions
    - CalculateSpellDuration taking into account combo points and caster-side spell mods
    - Unit::CalculateAuraDuration taking into account target-side spell mods
- Diminishing is now applied before duration reduction mods
- Implement saving per-effect periodic timers to DB (required for auras affected by haste)
2011-03-30 23:29:01 +06:00
VladimirMangos
c6794ce48b [11297] Comment fix 2011-03-28 13:55:22 +04:00
VladimirMangos
2aef552668 [11295] Load achievment system state before laoding other character data.
This prevent lost detected achievement criteria update or have unexpected criteria update event
at character data loading like skills/spells/itemts/etc.

Achievment system state load by self not dependent from other character data (checked after
all data loading in CheckAllAchievementCriteria() call.
2011-03-28 00:55:44 +04:00
zergtmn
37fd225a89 [11292] Strip trailing whitespace after [11284] 2011-03-27 23:40:42 +06:00
VladimirMangos
989d229968 [11288] Check IsPositiveEffect in IsPositiveSpell only for existed effects.
Thanks to NoFantasy for problem research.

Also make IsPositiveEffect use SpellEntry* arg instead spell id.
2011-03-26 03:10:26 +03:00
Ambal
40ef9cbf2f [11284] Implement prepared statements for INSERT+DELETE+UPDATE SQL requests. Should improve player save performance + lower MySQL server CPU usage.
Note: PostgreSQL does not have prepared statements implemented using native APIs.

Huge thanks to Undergarun, kero99 and Vinolentus.

Signed-off-by: Ambal <pogrebniak@gala.net>
2011-03-25 22:17:59 +02:00
zergtmn
0bc4bc1d75 [11282] Use uint32 datatype for aura charges and stacks
* Some spells have StackAmount > 255, for example 22735, 54314
* In SMSG_AURA_UPDATE maximum stack amount is limited by 255
* Move duplicate code into SpellAuraHolder::BuildUpdatePacket function
* Cleanup some weird type casts in _LoadAuras
2011-03-25 14:40:09 +05:00
VladimirMangos
77e612cbf7 [11281] Code cleanup in Player::CastItemCombatSpell 2011-03-25 10:47:13 +03:00
VladimirMangos
0751a35342 [11278] Fixed auras stack size check at loading.
For non stacking auras preserve stack size 1 as auras created instead reset it to 0 at mnext load.
For client no difference in show and most non stacking auras not dependent from stack size value
at server side code, but any way set stack size to 0 can generate unexpected wrong caluclation results
in spell code.
2011-03-23 05:37:38 +03:00
NoFantasy
5fc4a839e3 [11270] Let GM (.gm on) always see gossip options regardless of conditions set.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-03-21 10:13:49 +01:00
VladimirMangos
a7405fd673 [11255] Fixed receive BoA item from deleted character by mail. 2011-03-16 03:01:42 +03:00
VladimirMangos
52b0748282 [11246] Provide mail template items for offline players
Implemented generation mail template items at mails loading in case when
original mail send in time when receiver has been offline. Before like
receiver not receive items.

Small change in mail.has_items meaning. Now it set also in cases when items
generated for template but none items really added to mail. This not affect
mostly existed code work aceept case when mail with template loading.
2011-03-14 23:20:37 +03:00
VladimirMangos
ad6ab0bc49 [11227] Fixed item search by guid in bank item slots. 2011-03-06 18:55:18 +03:00
NoFantasy
ceaca46604 [11213] Always PrepareQuestMenu in PrepareGossipMenu when no conditions are set
This will make life easier for DB devs, as GOSSIP_OPTION_QUESTGIVER no longer need to be filled in to gossip_menu_option table.

Menu option with GOSSIP_OPTION_QUESTGIVER and conditions will work as before.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-03-02 00:08:48 +01:00
zergtmn
65b631a8e4 [11209] Some refactoring in Player::BuyItemFromVendorSlot 2011-02-28 01:48:14 +05:00
VladimirMangos
cd1465b1e4 [11207] Fixed cheating with item loot with some conditionas.
Thanks to zergtmn for explictly pointing to problematic line.
2011-02-27 21:19:18 +03:00
laise
35c89b68e7 [11198] Implement max stack effect of enchantment applied by spell 2823 and ranks.
Thanks to "maly32167" for additional input.
2011-02-22 20:52:01 +01:00
VladimirMangos
43bdd4910a [11195] Allow have bonus talent points from quests for any classes.
For non-custom cases DB expected have class req. settings.
2011-02-22 10:36:31 +03:00
zergtmn
972c08a878 [11187] Minimize direct access to honor and arena points fields 2011-02-18 17:14:45 +05:00
Schmoozerd
bbdd04d1ab [11172] Implement ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN (type 74)
Also implement new criteria requirements:
  - ACHIEVEMENT_CRITERIA_REQUIRE_NTH_BIRTHDAY
  - ACHIEVEMENT_CRITERIA_REQUIRE_KNOWN_TITLE

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-16 02:17:57 +03:00
VladimirMangos
04c21c95d3 [11159] Remove now redundent GetDBTableGUIDLow support.
Now any creatures/gameobjects loaded base at DB data
in non-instanceable/instanceable maps always have same guid
as in DB data.

* Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
2011-02-14 07:20:09 +03:00
nos4r2zod
9adb955f2a [11147] Fix a potential exploit with multicast bars - allow place only totem spells in these slots
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-02-12 17:03:31 +02:00
VladimirMangos
cf685da47a [11139] Use for Creature/GameObject local per-map guids
* Creature/GameObject guid generators moved to Map
* For avoid wrong not converted cases generic function in ObjectMgr has been replaced by
  specilized guid generation function like sObjectMgr.GeneratePlayerLowGuid().
  This let catch all cases that need update in custom code or scripts.
* Drop many ObjectAcessor.h now dead code. This is also make mangos more thread safe.
* Restore one more time unix build broken in prev. commits.

Note: many cases when something not wotk in instance but work in continents
possible magicly start work after this commit. For example, some gm commands.
From large systems that need more chnages for start work in full power in instances
can be referecned pool/gamevent system. Last need just small hacks drop changes but
in will addded in independent commit.
2011-02-12 09:52:16 +03:00
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