Commit graph

1186 commits

Author SHA1 Message Date
VladimirMangos
249fb836ca [11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
2011-05-15 22:04:57 +04:00
zergtmn
777ffe8dc2 [11483] Change postfix iterator increments to prefix where possible 2011-05-14 16:53:55 +06:00
zergtmn
4cfa51d799 [11482] Reorder some fields for better memory layout 2011-05-14 16:52:32 +06:00
VladimirMangos
719e298795 [11470] Final cleanup uint64 guid cases
Also drop logout player update fields cleanup that in any cases not saved.
2011-05-11 21:36:27 +04:00
VladimirMangos
5ff698f53a [11468] Finally remove all uses Object::GetGUID from core sources.
GetGUID() is now depricted function and will removed soon.
Still exist just for give time for update patches/scripts.
2011-05-11 01:47:34 +04:00
VladimirMangos
ef6a48fe03 [11465] non-ObjectGuid guids in random places.
Only ChannelMgr code wide use uint64 guids now, and Map object stores.
2011-05-10 21:27:49 +04:00
VladimirMangos
a925db80fa [11464] Some item related guids convertion to ObjectGuids 2011-05-10 16:37:34 +04:00
VladimirMangos
44f2c26389 [11459] More ObjectGuid using in Aura/SpellAuraHolder code.
Also fix build in PetAI code. Thanks to rsa for fix code.
2011-05-09 23:17:39 +04:00
VladimirMangos
151e5eae9c [11458] Non-item related uint64 guids replaced by ObjectGUids in Player.h
Also let ObjectAccessor::FindPlayer optimize empty guid case work.
2011-05-09 21:54:09 +04:00
VladimirMangos
1d781cd431 [11457] Use ObjectGuid way work with PLAYER_DUEL_ARBITER. 2011-05-09 20:40:21 +04:00
VladimirMangos
b647835469 [11454] Use ObjectGuid in class Loot 2011-05-09 19:17:38 +04:00
VladimirMangos
a4e91c3593 [11448] Fixed typo as source for recent crashes at quest start.
Also more stricjed typecheck for Object::isType arg value.
2011-05-09 01:21:24 +04:00
NoFantasy
4c3b61d4f5 [11443] Implement SPELL_AURA_MIRROR_IMAGE (247) and related receive/reply packets
Inspired by different patches posted in forum, thanks guys for the help it was :D

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-05-08 18:58:01 +02:00
VladimirMangos
a5fe00d6f6 [11438] Clarify code for quest start/source/req items adding/remove at quest start.
* Fix problem with complete quest when quest start item == quest source item.
  And source item not have max items amount setting.
* Avoid remove start item for case when it will re-added at next code line as source item
2011-05-08 05:56:33 +04:00
BThallid
7237fe7f62 [11436] Really save/load item 5/6 objectives counters in quest status.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-05-08 01:55:32 +04:00
Lynx3d
3f531024f7 [11434] Implemented diminishing returns (DR) for dodge and parry chances.
Also updated base dodge and agility=>dodge conversion values for 3.2 and later

Base stats and percentage based talents/buffs are not affected by DR,
it basically prevents items and stat buffs becoming disproportionally
powerful in terms of survivability as characters approach 100% avoidance.

TODO: implement DR for chance to be missed from defense rating
2011-05-07 20:19:53 +02:00
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