Commit graph

149 commits

Author SHA1 Message Date
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
AlexDereka
5368751c13 [9386] Store some config values in Rate emun. 2010-02-15 00:17:44 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
NoFantasy
08c364214b [9335] Clarify error log message after rewrite of monster_* to spline_* flags
Also change name of related field in code.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-02-09 00:32:22 +01:00
VladimirMangos
8e0069f364 [9327] Replace leader based indexing groups by group ids.
* This must repolve problem with loot.
  Before if some mob killed by group member and then leader changed
  then group members can't loot this mob body.
* Possible resolve crashes at loot. Now group storage content not dependent from leader changes.
2010-02-08 08:25:06 +03:00
tomrus88
db547a008a Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
2010-02-07 15:03:36 +03:00
tomrus88
c990e2aaef Fixed error output at creature loading. 2010-02-07 00:54:45 +03:00
tomrus88
d9e92d1987 - Updated unit dynamic flags enum. 2010-01-29 02:12:03 +03:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
VladimirMangos
797dd6d931 [9232] Replace list bool fields with exclusive true values by subtype field in Creature.
Use it in recently added code instead dynamic_cast use.
2010-01-21 22:23:17 +03:00
zhenya
4178d5bb6a [9228] Speedup groups store and other code work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-21 17:43:27 +03:00
VladimirMangos
eaecc467d5 [9212] Implement pet speed synchronization with owner only for follow mode.
* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
2010-01-19 03:56:26 +03:00
NoFantasy
23a77a1d36 [9165] Implement speed reduction at creatures DoFleeToGetAssistance
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-13 02:26:08 +01:00
VladimirMangos
83261d9b9b [9159] Skip invisible/stealthed and not detected targets from threat list at next target selection.
This will fix work spell 58984 and similar in combat.
2010-01-12 10:48:58 +03:00
VladimirMangos
4d90a2e1f2 [9146] More poolmgr cleanps.
* Replace mixed values used type args by function template specializations
* More explcilty show fact that poolmgr work only with db guids.
2010-01-11 12:24:36 +03: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
9c48e32bb7 [9120] Implement option to use delay in ForcedDespawn for creature
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-07 20:19:38 +01:00
NoFantasy
7e1d55c38e [9113] Add helper functions to set/getSummonLocation
This should help the poor homeless that does not have a database defined home at evade (such as "wild summon" without owner).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-05 19:56:22 +01:00
DasBlub
ebb063beb9 [9107] Fix most of the gcc warnings
* use UI64FMTD instead of "%u" for uint64 output
* on most *NIX systems, I64FMT is "%016lX" and not "%016llX"
* also fix typo: renamed GridMap::loadHeihgtData to GridMap::loadHeightData

Note: there are still many warnings from the 3rd party libraries g3dlite and ACE. Those warnings won't be fixed with that commit.
Also, a few warnings from MaNGOS are left, they'll be fixed later.

Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
2010-01-03 15:30:22 +01:00
NoFantasy
090c8b8854 [8923] Restructure gossip menus and make it possible to build selections by database
As result, gossip for GO is now possible. Moved related data structures and remove useless from code.
Please note that after some time, table npc_gossip will be fully removed (use menuId in _template in relation to gossip_menu as replacement).
Special thanks to GriffonHeart for help with research, discussions and ideas of code and thanks to Vladimir for helpful input.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-06 02:27:26 +01:00
NoFantasy
a8bd659872 [8900] Move most gossip related functions from Creature to Player class
Adjust arguments passed in functions accordingly, for easier implementation of gossip for Gameobjects in future.
Some additional code cleanup in affected functions.
2009-12-01 14:19:57 +01:00
balrok
56d694b5fb [8846] corrections for my last commit
thx to vladimir and apoc :)
2009-11-20 13:25:54 +01:00
balrok
1d362eace4 [8845] fixed some gcc warnings 2009-11-20 12:57:19 +01:00
VladimirMangos
fe1fae46ee [8830] Restore build at *nix. Make MAKE_PAIR* users includes explicit.
Comment for recently added field also.
2009-11-18 23:57:20 +03:00
NoFantasy
84432d8459 [8826] Set creatures PvP state flag based on creature faction and rename related enum
Condition with custom flag civilian and player team only is not sufficient. This update also disallow use *_addon -table (second byte of bytes2) to set flag manually (small chance it may be needed)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-11-17 15:41:04 +01:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
33d475caf3 [8786] Rename some files.
* HostilRefManager.cpp/.h -> HostileRefManager.cpp/.h
 * PoolHandler.cpp/.h -> PoolManager.cpp/.h
2009-11-08 04:21:56 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
d594a29af1 [8779] Not output error at empty item loot for mail template at mail creating. 2009-11-06 02:39:51 +03:00
balrok
c50df41b3c [8775] implement all creature difficulties + support bgs with this
former know as heroic_entry we now have 3 of those
which let us chose different creature_templates for different
map-types

normal maps will need a bit more support to use correct
spawnmodes

but for battlegrounds it works already good:
they are divided by levelrange:
    0-59  == normal spawn -> spiritguides level 60
    60-69 == difficulty=1 -> spritiguides level 70
    70-79 == difficulty=2 -> spiritguides level 80
    80    == difficulty=3 -> spiritguides level 80

this is needed mostly for alterac valley to get
right creature-templates spawned
and with that all creature->SetLevel hacks could
get removed from alterac valley code
2009-11-05 10:48:15 +01:00
begemot
e83563b671 [8761] typo fix and codestyle
typo was at PetLevelInfo loading
which didn't display the progressbar right when
there was no petlevelinfo available
2009-11-01 21:04:19 +01:00
VladimirMangos
4284bcc2da [8753] Next version assert fail at grid load fix.
Old version not work in result wrong guid use for check.
Code moved to Creature::LoadFromDB where all data accessable fro proper search.
2009-10-30 05:23:26 +03:00
VladimirMangos
012fac90c8 [8746] Not add pets and other not normal creatures to per-map Creature guid map. 2009-10-28 06:45:29 +03:00
VladimirMangos
fad1fb92f4 [8731] Restore difficulty 1 spawn use for creatures with special difficulty 1 versions.
* Rename creature template `heroic_entry` => `difficulty_entry_1`
  Possible need add 2 more fields for 2-3
* Use 2 more EventAI EFLAG_* flags for 2-3 difficulty support, update checks.
* Update area trigger code.

Note: support for specialized creature version for difficulties 2-3 not added yet
      and will be used same as difficulty 1 mode.

TODO: Rename area triggers heroickey/etc fields ?
2009-10-25 06:23:00 +03:00
ApoC
b4ea5a6d19 [8701] Fixes and inprovements in pool system.
* Fixed object is removed from guid->object map but still spawned in world under some conditions
* Fixed possibility to spawn already spawned object
* Fixed objects despawning (missing part for explicitly chanced objects added)

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-21 23:19:56 +02:00
balrok
46389e4e1c [8689] implement function Unit::isInvisibleForAlive
with that i've implemented all known auras which makes
units invisible for alive.. but that's currently quite hacky
i think best would be if we could set a unit-flag after those auras
getting applied
2009-10-20 23:37:21 +02:00
balrok
e990d5c509 [8688] proper implementation of creatures ghost-flags
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5)
the new flag is from wdb-files so your database should be
already alright

also i've dropped the function Player::CanInteractWithNPCs
cause it was used only in one place and didn't seem to make anything
easier

NOTE for this flag:
it just means that the creature can be seen by ghost-players
too..
so they are still visible for alive players.. unless a special
aura or ther unitflag (spiritguide/healer) disables this..
(see next commit for it)
2009-10-20 23:34:13 +02:00
balrok
a2ff999fd3 [8676] implemented dead-visible creature flags_extra
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures

i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
2009-10-18 21:28:36 +02:00
VladimirMangos
b258a17ba4 [8658] Threat calculation fixes and improvements.
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
2009-10-17 11:02:30 +04: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
NoFantasy
732bcfbbb6 [8622] Add own function to send AI_Reaction packet.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-11 00:01:49 +02:00
balrok
caf4732e38 [8612] better error-check when getting bgTypeId from Battlemasterentry 2009-10-10 01:40:22 +02:00
balrok
45f6a474bf [8608] implement BattleGround Alterac Valley
sql won't be included - please look at your database
providers forum

also note, that creature_loot_template id 0
is used for the loot of dead players in this bg
(after a player died and you remove insignia from him..
he not only drops money - he drops some random items too)

further work must be done in better code for adjusting right
levels to creatures - maybe using something similar like it's
done in heroic instances

also quests and creatures needs some scripts in future

thanks to:
netsky - initial start of this patch
bogie - 2nd person writing on this patch
triply, kapatejib, vladimir - code review and suggestions
arrai - for his great tool and help
and all testers / code contributers - I won't write
down a list, else I would forget most probably one ^^
2009-10-09 18:18:22 +02:00
VladimirMangos
59befa2e0e Merge branch 'master' into 320 2009-10-02 19:09:06 +04:00
XTZGZoReX
63897d56d7 Move visibility update functions to more appropriate classes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-01 19:01:42 +04:00
tomrus88
546f7a7fe5 Merge commit 'origin/master' into 320
Conflicts:
	src/game/BattleGround.cpp
2009-09-28 19:52:54 +04:00
balrok
1f9b4ca4c3 [8553] removed spiritguide from code
they basicaly should
*autocast 22011
*give player after gossiphello buff 2584
*port players away to another spiritguides, when they die

so this can be done by a script
and maybe eventai
2009-09-28 16:45:06 +02:00
balrok
9143f19bef [8550] call Unit::Update() also for spiritguides
cause they are dead i had to add another hack :-/
2009-09-28 16:44:25 +02:00
balrok
538c5c257e [8548] implement db supported battleground eventindexes
those eventindexes will then be used by the battleground-code to decide
which creature belongs to which objective
for example all creatures in alteracvalley which are standing around a tower
will belong to one eventindex then.. the eventindex will be defined through the code
and must be proper documented for db-devs
2009-09-28 16:41:00 +02:00
balrok
1665077dc4 [8547] implemented scriptcall: CorpseRemoved(uint32 & /*respawnDelay*/)
it will be called when the corpse of the scripted creature
get's removed,
it's possible to adjust the next respawn inside the script
2009-09-28 16:14:54 +02:00