Commit graph

57 commits

Author SHA1 Message Date
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
VladimirMangos
0236699b0a [10601] Amother attemp fix locale structures corruption.
Possible real source of problem: existing in code mixed
std:: structure templates instanting under pack pragma and out.
And this incompatible structure layouts wrongly mixed used by GCC.

So all std:: strcutures used moved out from pack pragma guards.
2010-10-10 23:14:40 +04: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
cyberbrest2
0205adfde1 [10599] Attempt fix data corruption for some localization structures with GCC use.
By unknown reason GCC generate wrong code for locale structures declared in header after pack pragma.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-10-09 22:43:24 +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
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
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
VladimirMangos
3f5eccd8a9 [9830] Implement taxi/transport event scripts support. 2010-05-03 19:39:53 +04:00
NoFantasy
5570f8c9cd [9752] Add storage for min/maxgold of gameobject
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-04-16 08:45:46 +02:00
XTZGZoReX
34e56c9978 [9641] Fix typo; IN_MILISECONDS -> IN_MILLISECONDS. 2010-03-30 14:44:57 +02: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
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
VladimirMangos
87a35b0489 [9317] Call linkedtrap summon in more cases.
* GAMEOBJECT_TYPE_BUTTON can have linked traps
* Spell::EffectSummonObject also can summon objects with linked traps

Thanks to patman128 for research second case.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-07 02:51:45 +03:00
NoFantasy
dd27fa0f6e [9195] Update some comments for GO autoCloseTime to reflect changes in 9179
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 02:14:33 +01:00
NoFantasy
c4b0406e7d [9179] Update formula for GameObject 'autoclose' time (dataN-field in _template)
This require database support/dataN-fields update for correct calculation of time (now in milliseconds)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-15 00:43:53 +01:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
NoFantasy
4ca8b0defc [8952] Use default gossip menu options if no options exist for "top level" menu.
Also not close gossip menu in cases where no action_menu_id is set.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-08 21:52:05 +01:00
ApoC
45c9c136ba [8653] Implemented per map guids store.
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.

For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-17 00:12:31 +02:00
tomrus88
3882772658 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Player.cpp
2009-08-27 01:54:04 +04:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +04:00
tomrus88
d24461e300 Merge commit 'origin/master' into 320 2009-08-07 23:48:00 +04:00
VladimirMangos
0d96fc06a6 [8320] Imporovements in wild summoned gameobjects work.
* Not set owner for will summoned gameobjects.
  Its not expected to have owner, and must be accessable to all players (or team).
* Set for all objects summoned by spells: despawned by deafult for proper despawn withut owner.
* Cleanup Spell::EffectSummonObjectWild.
2009-08-06 00:54:51 +04:00
tomrus88
4c709772c1 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Player.cpp
	src/game/Totem.cpp
2009-07-21 08:22:30 +04:00
VladimirMangos
39833b0069 [8205] Really use trap GO charges and avoid casting in despawned state.
* Drop horribale hack with stored charges amount, use instead GO info charges data as expected.
* Count trap activations as charge uses if it have limited charges.
* Check trap reactions only in ready spawned state.
2009-07-19 07:41:08 +04:00
tomrus88
1a47420fe8 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Map.cpp
	src/game/MapInstanced.cpp
	src/game/Player.cpp
	src/game/SpellEffects.cpp
	src/game/Totem.cpp
2009-07-15 09:40:13 +04:00
VladimirMangos
9a0abf0e01 [8183] Some gameobject despanw related fixes
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
* Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
* Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
2009-07-15 06:32:08 +04:00
VladimirMangos
a8288b311e [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-02 09:18:42 +04:00
VladimirMangos
9f41772828 [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-01 11:09:34 +04:00
tomrus88
02bcc56919 Added placeholders for new battlegrounds, some other stuff. 2009-06-25 19:08:53 +04:00
tomrus88
885d1256b2 Added new fields to database. 2009-05-27 16:44:50 +04:00
tomrus88
7e938af972 Updated to latest PTR client build 9868. 2009-05-05 10:41:22 +04:00
tomrus88
950a4bf13f Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-04-28 19:08:53 +04:00
VladimirMangos
c2e6dd20dd [7715] Provided way for scripts set alternative gameobject state for client show.
Also use enum for gsmeobject states.
2009-04-26 07:21:11 +04:00
tomrus88
a9e148edac Merge commit 'origin/master' into 310
Conflicts:
	src/game/AchievementMgr.cpp
	src/game/BattleGroundHandler.cpp
	src/game/CreatureEventAIMgr.cpp
	src/game/DBCStructure.h
	src/game/Player.cpp
	src/game/Spell.cpp
	src/shared/revision_nr.h
2009-04-21 15:20:45 +04:00
VladimirMangos
fc0e1ecdf1 [7690] Move GetCreature/GetGameobject to class Map.
* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
2009-04-20 19:08:13 +04:00
tomrus88
769a24252b Merge branch 'master' into 310
Conflicts:
	src/game/BattleGroundHandler.cpp
	src/game/Unit.cpp
2009-04-08 15:01:06 +04:00
VladimirMangos
3226a22e29 [7634] Fixed: select non-despawnable gameobjects base at appropriate for gameobject type dataN fields.
Many in world gameobject that unexpected daspawned before must now work in more expected way.

In tests i not found any damage to bg gameobject work, and at least this restore expected work for non-bg dorrs//buttons broken
after half-year ago patch (that has been reverted partly in this commit)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-04-08 05:46:43 +04:00
tomrus88
abae3cac91 Merge branch 'master' into 310
Conflicts:
	src/game/Unit.cpp
	src/shared/Database/SQLStorage.cpp
2009-03-30 15:01:04 +04:00
VladimirMangos
24f1cf4b83 [7577] Implement YellToZone for different world object types. 2009-03-29 01:09:15 +03:00
NoFantasy
036a74b284 [7560] Implement IconName for gameobject
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also small fix for 7558 sql update (for re-apply support)
2009-03-28 05:59:55 +03:00
tomrus88
a2d3941588 Merged and updated to latest PTR build 9704 2009-03-19 14:18:17 +03:00
VladimirMangos
7589bf7263 [7489] Update gameobject rotation fields if need.
* Fixed update absent in ".gobject turn" command
* Propetly set rotation fields for summoned objects
* Check rotation/coordinates fields values at server loading
2009-03-18 21:04:57 +03:00
VladimirMangos
872d791ca6 [7335] Implement active objects support.
Active objects triggrering grid loading and updating around self like players.
It can be used for event long run movements or escoring quest travels.
Also can be used for proper implementation far vision spells.
Currently only creatures can be activated by function call (from script) cr->SetActiveObjectState(true);
Please avoid lot amount active objects in same time use. Existance active objects support isn't meaning
that each rabbit must be active creature.

Also added independent grid unloading locks for explicit unloading lock,
lock for used by instance copied grids, lock counter for actiove object spawn grids locks.
Last case required for prevent double spawn active creature walk far away from spawn point.
2009-02-25 13:44:49 +03:00
VladimirMangos
bf5e1908d6 Drop Say/Yell/etc string versions.
1) DB based string_id versions must be used.
2) for debug purposes raw WorldObject::MonsterSay/etc versions can be used
2009-02-19 11:59:01 +03:00
VladimirMangos
7d63f4ce02 Fixes and cleanups in loot code.
* Move not-normal loot tables generation in single place (Loot::FillLoot function) for group and non group case.
* Simplify LootView code.
2009-02-07 10:34:02 +03:00
VladimirMangos
aa24bd836e [7207] Phase system development continue for DB/in_game objects
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB

TODO: in game commands.
2009-01-31 06:11:50 +03:00
freghar
11ed0e99a8 [7146] Trailing whitespace code cleanup
Signed-off-by: freghar <compmancz@gmail.com>
2009-01-22 18:10:16 +01:00