Commit graph

156 commits

Author SHA1 Message Date
zergtmn
0d6f990e4e [10912] Move scripting related functions from ObjectMgr to ScriptMgr 2010-12-24 00:23:37 +05:00
zergtmn
d9579dd44a [10902] Simplify code for triggering linked trap 2010-12-21 15:34:06 +05:00
VladimirMangos
38118d17d7 [10886] Fixed crash at GO use in case GO owner/first user offline state. 2010-12-18 11:13:48 +03:00
NoFantasy
6aab362980 [10860] Handle GAMEOBJECT_TYPE_TRAP in Use, as done for other GO types.
This just move parts of existing code from TriggeringLinkedGameObject and does not affect summoned trap type GO's (or related to summoned).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-12-11 21:38:06 +01:00
NoFantasy
a2e068659c [10859] Search for linked GO using the original used GO as base of the search
Add some comments for future improvements of this function.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-12-11 14:28:52 +01:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +03:00
Schmoozerd
16cd545df8 [10761] Basic support for target-name in MonsterSay/etc
Change MonsterSay's target to pointer.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-20 21:27:21 +03:00
VladimirMangos
6154cb3b43 [10749] Convert Gameobject owner to objectguid use. 2010-11-19 20:55:19 +03:00
VladimirMangos
3b0e926788 [10717] Revert "[10716][10688] New version of patch for send real diff from last update."
This reverts commit 8398a55fa274471daae115e00c627b299a3fdbbd.
This reverts commit 06e2d6859ba3d7fd47be72c23a64e68ae039701f.
2010-11-10 06:29:49 +03:00
VladimirMangos
bffc07e4bc [10689] Restore some item checkes for temporary loot case. 2010-11-07 02:20:10 +03:00
VladimirMangos
e219ee99bb [10688] New version of patch for send real diff from last update.
In new version last update time stopred for specific Cell that store all world objects
placed in it. All objects of Cell updated (or not updated) in same time.

Original version provided by ciphercom.
2010-11-06 22:59:54 +03:00
VladimirMangos
0847d4c8cd [10683] Revert "[10677] Send to creature/etc Update call real diff from last update and use it."
This reverts commit 10784a8c7cc81c468b5411e973d36ecf31de9603.

Main reason: impossibility for me as commiter test problem and fix all corner cases problems.
2010-11-05 19:54:31 +03:00
cipherCOM
555c1a9094 [10677] Send to creature/etc Update call real diff from last update and use it.
Now in case when creature/etc some tices not updates in result stay
in not active (no near players or active objects) cell some important
timers (corpse decay, summon timers, group loot expire, aura durations, etc) will
updates at real diff time from last prev. update call.

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

For some systems added exclude use real diff time because current limitations
like move generators. So its stay use last tick diff and considered freeze and
skip all time while creature in not active map part.
2010-11-03 07:07:13 +03:00
VladimirMangos
c955941b55 [10627] Use ObjectGuid for player's selection and unit's target 2010-10-20 08:19:48 +04: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
Schmoozerd
c44438a517 [10607] Handle GAMEOBJECT_TYPE_GENERIC at Use() to trigger despawn of GO
In addition, a check is added to prevent unexpected call to Use() at received opcode. Despawn of this type GO can then only be used with explicit call to Use()

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-14 14:44:57 +02:00
NoFantasy
edbe9ed886 [10603] Replace one hard coded value w/enum name. Additional code style cleanup
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-13 09:41:44 +02:00
NoFantasy
2fe45365c0 [10600] Correct size of animprogress for GO Create()
Add a default define and use it instead of hard coded value.
Some additional minor corrections for transport GO's

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-10 13:27:25 +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
0caa0e32dd [10593] Cleaning up code a bit, in related functions for recent commits
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 22:11:26 +02:00
NoFantasy
795c3e1f2f [10592] Make GO type 2 activate/deactivate
As with similar GO's that are not interactable (gameobject_template.flags|4) as default, GO's of type 2 becomes active when player can take a quest (or deliver quest).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 20:48:51 +02:00
NoFantasy
66555530a8 [10590] Check if GO is requirement of quest to activate sparkle if it is
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 12:14:28 +02:00
NoFantasy
b0d5e3e51a [10589] Always activate GO type 3 when quest id is defined (and active)
GO may be "lootless", but events at looting can happen

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 10:21:52 +02:00
NoFantasy
fc2e66231b [10588] Make GO type 8 activate and sparkle at related quest active
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 09:40:28 +02:00
NoFantasy
657894786a [10587] Make GO type 5 sparkle at related quest active
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-08 09:10:38 +02: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
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
0649b508e4 [10383] Store guid instaed pointer for first user of GAMEOBJECT_TYPE_SUMMONING_RITUAL
This is more safe way in pointer store comparison with.
LAso Some related code cleanups.
2010-08-20 12:58:32 +04:00
NoFantasy
2c165670b1 [10326] Process GAMEOBJECT_TYPE_FISHINGHOLE in normal way as for other GO's
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-06 15:30:47 +02:00
NoFantasy
027261e295 [10325] Improve process for Use() of GAMEOBJECT_TYPE_SUMMONING_RITUAL
This allow GO's not summoned by any to be processed and use the spells as defined in GO template as expected.
In addition some new checks to determine if GO should despawn and if group membership should be checked or not to allow use.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-06 14:34:20 +02:00
NoFantasy
787fb83763 [10303] Clarify bool used for script call ProcessEventId
isStart is default true. For transport/taxi cases, it may be false for event id's at arrival (event id ending)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-01 02:19:31 +02:00
NoFantasy
2ad9cd34b2 [10299] Add new script call ProcessEventId
Let script library know when some event is about to start. Event id's may be found in several sources, such as spells, GO's and transport/taxi paths.
Database scripts may be prevented by returning true from script side whenever needed. If false, DB script will run like normal.
New database table event_id_scripts will need a ScriptName for the event id, in same way as for example areatrigger_scripts.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-31 17:52:38 +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
Lutik
c4c21d3fb6 [10226] Fixed GO_JUST_DEACTIVATED for despawned by default gameobject.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-19 11:43:55 +04:00
VladimirMangos
6192bdbe1b [10224] Small code style cleanup. 2010-07-19 08:21:17 +04: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
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
VladimirMangos
6ebbcd8dbb [10028] Reward group for shareable quests at cast event to creature/go. 2010-06-04 20:01:57 +04:00
VladimirMangos
d86dcd60d7 [9925] Add more log filters
* damage - different direct damage calculation tracing
* combat - combat state updates, roll attack result and etc
* spell_cast - spell cast progress and aura apply
2010-05-18 12:38:52 +04:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
VladimirMangos
15dd77873e [9779] Drop trailing whitespaces. 2010-04-23 05:28:51 +04:00
SilverIce
e3f3f3410a [9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-12 15:15:55 +04:00
VladimirMangos
b658b25ff8 [9618] More use ObjectGuid in spell/etc code 2010-03-25 13:59:46 +03:00
NoFantasy
dbe089b66d [9572] Add script calls for GameObject GossipHello and GossipSelect
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-11 15:35:13 +01:00
Yehonal
31f4850486 [9524] Use cooldown data from gameobejct trap tamplate if provided.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-03-05 10:06:21 +03:00
VladimirMangos
7fb5d850bf [9510] Gameobject casting improvements.
* Add IsHostileTo/IsFriendlyTo and implement expected way checks for diff. world object types.
  For controlled object check redirected to specific owner, for wild gameobject base at gameobject faction.
  If faction not set expected to be hostile to anyone.
* Update grid searchers to be usable with world object instead only unit case.
  Some grid searches lost redundent second object arg, AnyAoETargetUnitInObjectRangeCheck lost hitHidden arg
  (for hitHidden==true case added new AnyAoEVisibleTargetUnitInObjectRangeCheck)
* Updated grid searchers used with gameobject area casts now.
  Note: Gameobject area spell cast animation will still wrong show around cast triggering target instead
  center around gameobject.
* In case gameobject aura apply to target for restored use target itself as caster because
  we not have currently another way apply aura form wild gameobject.
2010-03-04 07:38:26 +03:00
NoFantasy
6ec9dd5d93 [9499] Add replacement spells for GO type 10 that may have dummy spellId in _template
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-01 16:52:25 +01:00
Lynx3d
b2718378ef [9392] Update creature/gameobject pool at despawn instead spawn prepare.
This let solve problem with not despawned creature/gameobject at pool update in case when related grid not loaded.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-15 21:43:06 +03:00