Commit graph

922 commits

Author SHA1 Message Date
Laise
a32b3063a2 [10156] Add shared object for auras of same spell and move spell proc code to its own file, also spread procs by auras and effect indexes. 2010-07-07 19:08:26 +03:00
VladimirMangos
232db2b306 [10154] Fixed crash at loot item and etc after recent check add. 2010-07-05 14:05:55 +04:00
Lightguard
091b69500d [10151] Prevent autostoring not empty bags
Thanks to The_Game_Master for detailed information about the bug.
2010-07-04 22:58:42 +02:00
VladimirMangos
ebf27938fb [10145] Use better (but still hack) way for gameobject size calculation
* This is also hack because some float with unknown exactly value used as 'size'
* Another not resolved problem: go size used in creature target autoselection, so for large 'virtual' go
  creature can seelct strange points near in attempt select 'free' place near target.
2010-07-03 23:26:59 +04:00
VladimirMangos
5724fa1d43 [10140] Reuse GiveQuestSourceItem code for check case
Also show correct amount added item in case partly existed amount.
2010-07-02 23:24:57 +04:00
Oniryck
f3049e6dd7 [10137] Fixed item/go checks for active raid quests.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-02 17:31:12 +04:00
VladimirMangos
41f8cfb14c [10123] Fixed recent problem with enter to dungeons in group.
Problem related to implicit get map id from player in Group::GetBoundInstance
when in some cases check done before player mapid update.
2010-06-30 00:45:14 +04:00
NoFantasy
1713caae17 [10115] Add function to update model_info at changes to scale or model.
* At every change to model or scale, the related data (bounding_radius/combat_reach) is now updated accordingly (note that player combat_reach are not changed like creature).
* UpdateModelData is called from within SetDisplayId while changes to scale has explicit call to UpdateModelData after new scale is set (mostly for aura scale)
* The updated values are calculated by (scale*bounding_radius)/(scale*combat_reach)
* Database values for bounding_radius/combat_reach are expected to be relative to scale like 1.0

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-28 12:10:56 +02:00
VladimirMangos
67a7892075 [10114] Store associated InstanceSave for dungeon map in Map object 2010-06-27 21:11:26 +04:00
VladimirMangos
6f4481a591 [10113] Some cleanups in Instance loading code.
* Remove reduncent chekc and args for MapInstanced::CreateInstance(const uint32 mapId, Player * player)
* Rename for avoid name duplication raw InstanceMap creating to MapInstanced::CreateInstanceMap
* Move lookup code of player/group bounde instance save to Player::GetBoundInstanceSaveForSelfOrGroup
2010-06-27 19:50:52 +04:00
NoFantasy
0757b43929 [10111] Move code for initialize player model data and scale to same function, InitDisplayIds
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 13:13:12 +02:00
NoFantasy
2375a1cb71 [10110] Add function Get/SetObjectScale and update code where scale is set.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 12:39:29 +02:00
NoFantasy
bb3b0bd598 [10109] Add and use actual bounding_radius/combat_reach per model for characters.
Data are stored in same table as for creature (like dbc models data), and provides the default values for playable races.
Currently the bounding and reach are applied only at creation and load. Note that these values are modified by scale. For player case, scale is always 1.0 as default.

For later, auras and spell effects that change scale and/or modelid must in addition make sure bounding_radius are updated accordingly to the new scale and/or model (combat_reach does not seem to be affected by such changes, and is always 1.5 for players).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 01:31:51 +02:00
VladimirMangos
593f1e81b9 [10103] More cleanups in InstanceSave
* Use single function for erase element from save list.
* Make lock bool checks class local (it need be replaced by normal lock object in future)
* Remove redundent now friend class declarations.
2010-06-24 09:10:57 +04:00
VladimirMangos
e63dc32f4d [10080] Fixed ghost teleport and cleanup code. 2010-06-19 22:44:36 +04:00
VladimirMangos
07a931e141 [10074] Add IsPassive(SpellEntry*) function and use in cases wjern entry already known.
Some other small code cleanups
2010-06-18 02:17:51 +04:00
SilverIce
6ca609629c [10073] Make object active at applying view on it
also isActiveObject check moved to WorldObject - all worldobjects are inactive by default, excluding players
this is a final part of cameras implementation

(based on commit efc9623)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also remove template-way code selection for object for Map::AddToActive/Map::RemoveFromActive.
This simplify function use from not Map code.
2010-06-18 00:19:12 +04:00
ApoC
7dd5456401 [10066] Some tuning in consts.
Signed-off-by: ApoC <apoc@nymfe.net>
2010-06-16 23:31:23 +02:00
VladimirMangos
5b15cd5dd2 [10063] Cleanup recent added code. 2010-06-15 17:19:45 +04:00
ApoC
38dbd27569 Added missing return statement.
Signed-off-by: ApoC <apoc@nymfe.net>
2010-06-15 14:48:32 +02:00
Laise
9811858d44 Implement 49220 and ranks 2010-06-15 15:27:08 +03:00
VladimirMangos
2326292981 [10059] Cleanup in Player::m_mover uses
* Also fix triggered by related checks unread packet tail spam cases.
* Fix one case when expected death at fall controlled player
  under ground has been possible avoided
2010-06-15 03:50:52 +04:00
Laise
10634ac5be [10054] Fix crash when not saved action buttons are removed during spec switch 2010-06-14 12:25:42 +03:00
VladimirMangos
b4b45333d8 [10053] Use UNIT_STAT_CONTROLED for mark unit state under direct player control.
* This allow prevent move home/to caster at apply
* Also replace AI and reset movegens at control time
* Also stop combat and clear threat/hostile list at lost control for prevent combat with freindly units.
2010-06-14 10:27:44 +04:00
SilverIce
e427ce80cc [10052] Camera System
(based on SilverIce's repo commit 4f2f4ab + next 3 more)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-14 07:23:03 +04:00
VladimirMangos
64f959fb82 [10050] Implement apply non-trade slot item enchanting at trade complete.
Base at original patch provided by arrai.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-11 22:46:16 +04:00
VladimirMangos
9dd45d5cf0 [10048] Move trade data to dynamic created structure.
Also possible fix old bug with spam trade cancel after logout.
2010-06-09 00:27:26 +04:00
zergtmn
6986ecbd9b [10046] Store guids instead slot data for trade items.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-08 20:48:59 +04:00
VladimirMangos
a7b80733df [10043] Fixed share quest in case completed objectives.
* Also fixed CONDITION_QUESTTAKEN for same case.
* Aslo fixed exclusive prev quests check.
2010-06-07 23:48:20 +04:00
VladimirMangos
5eabf12111 [10042] Implement CONDITION_QUESTAVAILABLE.
Also do come constatification of quest status check functions
and fix one unsafe use std::map operator[].
Never never use std::map operator [] for _read_ access.
Good chance corrupt related structure state ;)
Not in found case but in general.
2010-06-07 22:35:47 +04:00
VladimirMangos
6ebbcd8dbb [10028] Reward group for shareable quests at cast event to creature/go. 2010-06-04 20:01:57 +04:00
SilverIce
d6c5207867 [10020] Drop unused member in VisibleNotifier structure and related functions
(based on SilverIce's repo commit e678555)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also applied mangos code style to GridNotifiersImpl.h
2010-06-02 09:56:51 +04:00
VladimirMangos
0a24a170d1 [10016] Remove unused RewardSinglePlayerAtKill result. 2010-06-01 05:17:12 +04:00
VladimirMangos
5e526ef0d9 [10014] Revert "[10013] Implement CONDITION_QUESTTARGET"
This reverts commit 4e460746c0947f6cfc1f1150a8eb90257819eae2.
2010-06-01 02:26:45 +04:00
VladimirMangos
59367bc19f [10013] Implement CONDITION_QUESTTARGET
For cases when loot dependent from some quest objective complete state.
2010-06-01 01:13:59 +04:00
XTZGZoReX
28c3de5093 [9995] Move GridMap class (and related structs/enums) to separate cpp/h.
Also rename some structs/enums and fix some code style.
2010-05-28 13:34:14 +02:00
Wowka321
6ce82e4914 [9983] Leave at AFK applied only to battlegrounds (not arena)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also restore build...
2010-05-27 17:36:18 +04:00
VladimirMangos
67b8ca03b5 [9957] Alow sell item for money and extanded coset without momey in same time.
npc_vendor.ExtandedCost can be negative now that meaning:
price excluded default item BuyPrice and use only abs(ExtandedCost) items).
For example expected used for item 36908.
2010-05-22 19:49:07 +04:00
NoFantasy
0aac44e091 [9953] Remove two not needed cast to Creature* and make code more safe
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-22 12:04:35 +02:00
NoFantasy
f14c0e319f [9941] Add additional check for UNIT_NPC_FLAG_GOSSIP before using TalkedToCreature
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-20 09:29:03 +02:00
NoFantasy
b881c06104 [9938] Correct premature call of TalkedToCreature.
Only use TalkedToCreature when gossip does not have any following sub menu (and of course when the prepared npc options does not include any gossip)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-20 00:06:49 +02:00
VladimirMangos
d4f1b510ae [9934] Skinning related fixes
* Show skinning tooltip only after creature loot
  (when creature can be explcitly skinned).
* Allow reopen skinning loot if still have not looted items.
2010-05-19 15:35:20 +04:00
bloutix
a457f35b21 [9928] Fix build...
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-05-19 01:21:24 +04:00
VladimirMangos
d5c7e7b7d2 [9927] Support new raid allowed quest types. 2010-05-18 15:36:50 +04:00
VladimirMangos
696a4b6db0 [9918] Fixed player's tapped creature loot access by group in diff cases
* If player tap creature in group and leave then group will have access to creature loot if not disbanded
* If player tap creature and after join to group then creature loot will accesable only by player
* Also RewardPlayerAndGroupAtKill divided to simgle player and group reward versions used for group tap
  and single player tap cases.
2010-05-17 12:56:57 +04:00
VladimirMangos
96d50bf55a [9917] Fixes in loot roll timer work and related cleanups.
* Changes include (in fact as part cleanup) fix got NeedBeforeGreed locked item after expire roll timer
  suggested by somedruid@mangos.lighthouseapp.com.
* Added cancel rolling at creatuer corpse remove.
* For NeedBeforeGreed and GroupLoot sued common code for prepare item roll.
2010-05-17 05:29:01 +04:00
LordJZ
0828c3aa81 [9910] Implement expected from 3.2.x time limit for BattleGroundWS.
With updates and fixes from zergtmn.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-05-16 07:56:44 +04:00
VladimirMangos
df6bd3df30 [9909] Prevent SQL injection in equipment sets code.
Author of original verison: Machiavelli
2010-05-16 05:25:02 +04:00
darkstalker
c018563669 [9905] Correct SMSG_INSTANCE_DIFFICULTY structure (fixes raid difficulty display).
Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
2010-05-16 00:31:53 +02:00
VladimirMangos
aaa33d5385 [9904] Add new config option for wait mode at startup error.
Note: it not applied to crashes and shutdowns after mangosd/relamd startup completed.
You can continue without delay (as now) and fast exist, or wait <Enter>, or some secs
for continue. Last can be helpful for see for example not applied sql update revision
data and etc.
2010-05-16 02:19:40 +04:00