Commit graph

1085 commits

Author SHA1 Message Date
VladimirMangos
099f375961 [10618] Properly update objects usable state at GM-mode on/off. 2010-10-18 05:59:47 +04:00
SilverIce
c4ddbead04 [10616] Simplified trade distance checks, GROUP_UPDATE_FLAG_POSITION flag handling moved out of Map
note: need avoid Map::PlayerRelocation calls now and use Player::SetPosition instead
2010-10-17 19:19:47 +03:00
DasBlub
fc5dd54f37 [10612] Revert "[10611] Made some values const"
Reason: It makes no sense to make a local variable const.

This reverts commit 49e3184d69056738701bc15d9b7f982bf11d7bbc.
2010-10-15 22:29:10 +02:00
Reve
47d971c7f9 [10611] Made some values const
Signed-off-by: DasBlub <dasblub@gmail.com>
2010-10-15 22:14:42 +02:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02:00
Lynx3d
d090bce461 [10609] I consider it proven that all classes shall benefit from intellect for weapon skill increase.
But better formula for chance would still welcome...
2010-10-14 15:50:05 +02: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
bc2f2916e9 [10575] Fix world states related to arena season.
Replace the "in progress" option in config (as no such thing exist) with the expected "previous arena season id".

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-02 11:29:06 +02:00
VladimirMangos
fa8f9ad522 [10574] Fixed non-weapon offhand equip after my recent commit. 2010-10-02 06:32:17 +04:00
VladimirMangos
85f8219ecf [10571] Properly remove dual-wield flag at spell unlearn. 2010-10-01 16:39:36 +04:00
zergtmn
ead698e881 [10569] Don't save holders from channeled spells
Signed-off-by: Laise <fenrisse@gmail.com>
2010-10-01 12:02:43 +02:00
VladimirMangos
02b51fb976 [10560] Remove reundenant spell store for temporary unsummoned pet.
We not use this data and now always have proeprtly save current pet
when it temporary unsummoned and avoid it overwrite by another cases.
2010-09-30 17:50:44 +04:00
NoFantasy
bc04ae4b4c [10559] Add world state id in comments for all hard coded state id's
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-29 23:59:13 +02:00
VladimirMangos
7f49bd357e [10548] Implement missing part spell 47568 functionality.
Original patch prowided by False.Genesis.
2010-09-26 23:36:32 +04:00
VladimirMangos
b236e83e70 [10546] Fixed EffectActivateRune activate only expected runes amount of some rune type. 2010-09-26 22:04:43 +04:00
False.Genesis
0ec380e380 [10540] Fixed structure SMSG_RESYNC_RUNES
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-26 17:09:24 +04:00
VladimirMangos
2170c9c919 [10529] Water level in movement use fixes.
* Move selection allowed upper and lower heights for target point
  into near point core function used for contact/close point selection.
  Selection base at possibility target point searcher fly/swim(or walk by water bottom).
* Use vamp water level data so have proper water level in instances in movements.
* Use increased ground search distance for water level case.
2010-09-25 08:01:28 +04:00
darkstalker
3a8ad26a5e [10526] Implement server side global cooldown check.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also pet/controlled unit global cooldown code replaced by new placed in charmInfo structure.

Thanks to nos4r2zod for testing and gcd range check implement.
2010-09-24 06:07:26 +04:00
VladimirMangos
b0edd807d7 [10513] Clear grid *Check/*Searcher clases use
* Check class considered have all info select  object in world from suggested but grid walker list in some grid.
  This also meaning that Check must always have focus object around that (and in same phase) fit objects must be.
* Searcher only must ask Check and know how from all objects fiting to Check select result object(s).

For this reason and for better compatibility removed first arg (searcher) form all Searcher classes.
Instead expected used Check::GetFocusObject() object if need ( by always need check and simolify Check classes
phase checked in Search classes). This also restore source code compatibilty in related lines with prev.client
version branches code.

* While focus object adding fixed possible wrong phase object selection at stealth detection and at corpse searches.
2010-09-22 06:25:21 +04:00
Lynx3d
47397ff19b [10509] Fix some "foo initialized after bar" gcc warnings and remove some unused variables. 2010-09-20 10:07:25 +02:00
NoFantasy
d7994c1df4 [10480] Fix a bug causing creature dynamic flags to be removed at normal loot preparation.
In addition add use of UNIT_DYNFLAG_TAPPED_BY_PLAYER
Added check to see if creature is tapped for isAllowedToLoot()

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-13 10:34:53 +02:00
VladimirMangos
84a915e1b1 [10475] Implement SPELL_AURA_HEAL_ABSORB (301)
Used for example in spells 66237 and 70659.

Also rename CalculateAbsorbAndResist -> CalculateDamageAbsorbAndResist
2010-09-12 02:45:26 +04:00
Darkrulerz
214c65baa1 [10449] Typos in enum names and comments
Also typos find by darkstalker and Neo2003

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-06 15:48:37 +04:00
zhenya
e621af3b97 [10443] Fixed expected packet size for SMSG_SET_PROFICIENCY
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-05 00:54:26 +04:00
VladimirMangos
acd0716297 [10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.

In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
2010-09-02 05:13:16 +04:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
VladimirMangos
c545392f2e [10401] Some code style cleanups. 2010-08-22 22:02:08 +04:00
NoFantasy
c252ca5bc4 [10394] Remove redundant use of this-> in recent implemented script calls
Thanks porteyoplait for pointing it out /bonk author

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-21 16:37:42 +02:00
NoFantasy
3332ed72a6 [10393] Add script call for InstanceData, OnPlayerDeath
Called when a player really dies and also unrelated to the source of the death (for example a player can die indirectly from some mob ability, but must be registered. Achievements, other special events)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-21 13:19:55 +02:00
VladimirMangos
5fd06abf44 [10379] More wide use ObjectGuid in arena team code.
As always in this commits line fixes for uint32->uint64 guid assigns.
2010-08-19 12:22:45 +04:00
VladimirMangos
9b3d37f0cf [10378] Avoid double lookup member slot in guild operations.
Also more wide use ObjectGuid in guild code
and fixed some uint32->uint64 guid assigns.
2010-08-19 11:17:33 +04:00
VladimirMangos
dbe9c6f190 [10371] More wide use ObjectGuid in group code.
Also drop some unused functions.
And fix some uint32 -> uint6 guid assigns.
2010-08-18 13:43:55 +04:00
Lynx3d
40f70138da [10364] Restore build with gcc and cleanup includes a bit. 2010-08-17 19:42:20 +02:00
VladimirMangos
5f44c4da21 [10363] More wide use ObjectGuid in way remove MAKE_NEW_GUID uses.
Also
* Fixed some amount wrong uses low guids as full player guids.
* Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid.
  In some cases need assign "0" guid, then use ObjectGuid() instead.
* Fixed .pdump commands work.
2010-08-17 08:22:28 +04:00
Schmoozerd
12aa1bc606 [10352] Implement support explcitly started timed achievements.
* Player::StartTimedAchievementCriteria can be used for activate timer
  for specific explicitly starting timed achievement by timedRequirementId
  in script.

* for ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST this done in core.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 23:28:18 +04:00
Lynx3d
29281d476a [10345] Fix passive spells that are active without shapeshift and certain shapeshift forms only.
Currently, 63411 is the only affected spell, but implementation is hopefully generic enough to cover future cases.
2010-08-11 19:42:20 +02:00
VladimirMangos
a202b33702 [10339] Restore lines ends in Player.cpp :/ 2010-08-10 23:37:14 +04:00
VladimirMangos
45cdc67f58 [10338] Create Map version for GetPlayer/GetUnit fucntions
* This let make map local way access for cases when player/all units
  expected to be at same map (for scripts cases for example).
  Ofc, still exist many places where code expect world wide player search.
  Spell casting for support far target cases, groups/guilds/chat/etc packets

* Function Unit::GetUnit depricated and will removed soon.
* Function GetCreatureOrPetOrVehicle renamed to less horriable GetAnyTypeCreature name.
2010-08-10 23:22:11 +04:00
VladimirMangos
779e40d5ff [10332] Save cast item guid for auras also.
This must fix another way duplicate aura adding to DB error.
It also prevent wrong stacking work for weapon equip bufs
in cases when its allowed for both wepoan indepndently apply.
2010-08-09 06:17:23 +04:00
Lynx3d
a977c068f0 [10327] Implement reputation rates and aura effects for Spell::EffectReputation().
Also apply rates after percentage aura modifiers, so auras always
give expected percentage of final value independant of "hidden" rates.
2010-08-07 21:19:59 +02:00
lasyan3
ad7b628ebf [10317] Rogue's energy rate in mangos.conf
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-04 02:46:24 +04:00
Lynx3d
28d1ac66c3 [10298] Clear tavern rest when leaving building and prevent forced unmount when in GM mode. 2010-07-31 09:54:43 +02:00
NoFantasy
25d9fd265b [10293] Correct a not exitan...non-existin... a word that is often spelled wrong
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 18:26:08 +02:00
VladimirMangos
6a4cae890e [10273] Avoid some redundent and recursive calls to SpellMgr singleton. 2010-07-26 16:51:52 +04:00
NoFantasy
756e29f891 [10258] Correct old typo in GetReputationOnKillEntry function name
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-24 13:49:46 +02:00
NoFantasy
61990de6dd [10252] Implement reputation_reward_rate for quests and creatures
* In addition, implement "flat" reputation for quests, where a value in RewRepValueN is given. Human diplomacy will not affect the total. The rate however will be applied, where a faction is defined with a rate for quests. Value in database are expected to be *100 of the actual value given (before rate are applied).
* New database storage can contain rates for quest/creature/spell reputation and will affect the base value given as reward. When for example the quest reward for a faction should receive 30% more reputation points, the rate can be set to 1.3.
* This will fix issues with certain quests that are using the expected RewRepValueId but where the outcome has been lower than expected.
* Note that if the rate is set to 0.0 it will disable reputation gain for the faction and type.
* Reputation rate for spells (spell effect) is not yet implemented

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-23 17:50:36 +02:00
VladimirMangos
9350c9990d [10250] Select auction store by house id only.
After this commit auction auctioneer guid used only for select auction house in packet or loading.
Next task replace it in DB by houseid, dependence DB data from creature guid isn't good.
2010-07-23 18:06:08 +04:00
Lynx3d
33e7d46519 [10248] Implement applying proper penalty spell when making use of talent 46917. 2010-07-23 07:45:57 +02:00
VladimirMangos
9d8b66cf93 [10246] Restore work killCredit and kill achievements in regular difficulty instances. 2010-07-22 13:11:34 +04:00
VladimirMangos
9381e8680c [10229] Small cleanup in taxi related checks 2010-07-20 00:42:58 +04:00