Commit graph

207 commits

Author SHA1 Message Date
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
tomrus88
258e19a4a3 Merge commit 'origin/master' into 320 2009-09-22 18:14:06 +04:00
Ambal
cfea99ea62 [8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances.
Please, update your config files and check new options:

Visibility.Distance.Continents    = 90
Visibility.Distance.Instances     = 120
Visibility.Distance.BGArenas      = 180

Thanks everyone involved in patch tests!

Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-21 23:25:29 +03:00
tomrus88
2d86aa4535 Misc fixes. 2009-09-14 18:11:15 +04:00
Trazom
dffa5d43bd [8477] Implemented "on demand" regeneration of power in Spell::CheckPower (limited to 500ms frequency).
Correctly set UNIT_FLAG2_REGENERATE_POWER to notify client to stop/start regen in bar.
thx. also for nos4r2zod

From original patch was removed usage of getMSTime() and rewrited this part.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-06 01:39:13 +02:00
VladimirMangos
7a2df3c309 [8476] Revert some recent cleanup changes, some other fixes and cleanups. 2009-09-05 22:09:37 +04:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
GriffonHeart
349216d5d7 [8204] Avoid call assistance from non-combatants.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-19 05:38:49 +04:00
Ambal
58209ee79a [8182] Store and use Map* pointer in WorldObject instead map ids for speedup
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-15 02:13:52 +04:00
VladimirMangos
21a6a26386 [8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags.
* Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class.
* Cleanups and fix related code.

NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
2009-06-26 01:57:34 +04:00
NoFantasy
ec133404ca [8058] Avoid use error_log in non-scripting DLL code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-21 04:13:07 +04:00
NoFantasy
400c110e1f [8057] Move code from Event AI to class Creature function for reuse in other scripting cases.
Also some outdated and wrong checks remove.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-21 03:39:43 +04:00
NoFantasy
68848314e2 [8040] Implement Creature::ForcedDespawn and ACTION_T_FORCE_DESPAWN for EventAI.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-18 19:11:57 +04:00
Ambal
b76c4c2f3c [8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-06-16 12:47:02 +04:00
VladimirMangos
08fe4933c5 [8015] More dislpay id selection fixes...
* Allow have only A2 or H2 display ids for less strincted DB field data.
* Check model data existance for all provided display ids atserver startup.
* Avoid explicit access to creature info display fields but use display selection functions.
* Rename GetTaxiMount to more clear for returned value GetTaxiMountDisplayId.
* Check display ids in `creature_model_info` at server load.
2009-06-14 21:57:56 +04:00
tomrus88
4236f7c75c Merge branch 'master' into 310 2009-06-05 14:54:05 +04:00
NoFantasy
48fee42129 [7951] Mope call for help code to function form Event AI code to allow use it from C++ scripts also.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-04 05:01:12 +04:00
tomrus88
b9b2e254b5 Merge branch 'master' into 310 2009-06-03 16:03:44 +04:00
NoFantasy
be6e3923d1 [7948] Use SetFaction instead explcit field set, other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-03 15:35:33 +04:00
tomrus88
cae3f0a532 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
2009-05-31 12:16:25 +04:00
NoFantasy
27057843ac [7915] Implement more stricted checks and limitations at loading creature addon data.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-30 05:02:59 +04:00
tomrus88
84ed071e16 Merged and fixed some whitespaces. 2009-05-29 10:40:13 +04:00
NoFantasy
84464e5f3f [7908] Extract class data from creature_*_addon bytes0 fields, drop its, amd add unit_class field to creature_template.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-29 05:51:17 +04:00
VladimirMangos
b83f32fc19 [7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state.
Also related cleanup code in field cases and player Player::SetSheath.
2009-05-29 01:05:39 +04:00
tomrus88
f6e2b55e2c Merge branch 'master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-28 10:16:02 +04:00
NoFantasy
56e86ff05f [7896] Rename creature_template class/race fields to trainer_class/trainer_race for clarify use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-26 18:16:15 +04:00
tomrus88
afd82229d7 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
	src/game/SpellEffects.cpp
2009-05-24 10:11:26 +04:00
ApoC
029b49dec8 [7883] Implemented new NPC extra flag CREATURE_FLAG_EXTRA_NOT_TAUNTABLE.
NPC with this flag is immune to apply aura SPELL_AURA_MOD_TAUNT and immune to SPELL_EFFECT_ATTACK_ME by default.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-05-23 20:06:07 +02:00
VladimirMangos
f72a8bc6dc Merge commit 'origin/master' into 310 2009-05-23 01:55:33 +04:00
NoFantasy
8b5fa13011 [7871] Drop unused second arg in InstanceData::OnCreatureCreate.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-22 06:33:08 +04:00
tomrus88
52effd119c Merge commit 'origin/master' into 310
Conflicts:
	src/game/TargetedMovementGenerator.cpp
	win/VC71/shared.vcproj
2009-05-21 20:17:19 +04:00
Neo2003
fa03b3663a Mobs fleeing and getting assistance feature implementaion.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also rename ACTION_T_FLEE to ACTION_T_FLEE_FOR_ASSIST for clear use
2009-05-21 01:33:28 +04:00
VladimirMangos
f332c000d1 [7860] Implement creature event ai ACTION_T_CALL_FOR_HELP for explicit call for help in some script cases. 2009-05-20 22:15:41 +04:00
tomrus88
6734694a90 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-16 00:47:37 +04:00
VladimirMangos
8858aacfb0 [7829] Rename 3d (x,y,.. versions of IsWithinDist/IsWithinDist functions with adding 3d explict posfix to name for avoid wrong use. 2009-05-14 21:42:32 +04:00
VladimirMangos
788cdf9b3a [7826] Avoid use GetDistance* that used slow sqrt call where possible, other related speedups. 2009-05-14 18:51:13 +04:00
tomrus88
7e938af972 Updated to latest PTR client build 9868. 2009-05-05 10:41:22 +04:00
tomrus88
b980e9ac59 Updated to 3.1.2.9855 client build, fixed quests, some work on monster movement. Not tested. 2009-05-02 19:41:00 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
VladimirMangos
721e005b84 [7666] For heroic mode creature use AIName from normal mode version in same way as done for ScriptName.
Also at creature templates loading check that AIName/ScriptName not set for heroic mode creature versions.
2009-04-14 02:28:45 +04:00
VladimirMangos
bd56140537 [7658] Drop dead code. 2009-04-13 03:13:19 +04:00
arrai
5dd3ce31bc [7576] Fixed spell range check for spells with minimal distances 2009-03-28 22:27:39 +01:00
DasMy
6762744452 [7570] respect UNIT_FIELD_COMBATREACH for spell range check
Signed-off-by: arrai <array.of.intellect@gmail.com>
2009-03-28 16:16:46 +01:00