Commit graph

3568 commits

Author SHA1 Message Date
NoFantasy
a6360987de [10368] Use AI function DoCastSpellIfCan for eventAI ACTION_T_CAST
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-18 01:31:59 +02:00
NoFantasy
9c8533335b [10367] Making sure CreaturesAddon are re-loaded after creature evade
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-18 00:19:46 +02:00
VladimirMangos
fbf4c5b3b4 [10366] Add portable way for hash specialization adding.
Use it for ObjectGuid hash specialization
2010-08-18 01:13:42 +04:00
NoFantasy
821bb9fcc4 [10365] Implement ACTION_T_MOUNT_TO_ENTRY_OR_MODEL (43) for creature eventAI.
Read doc/EventAI.txt for details.
SQL query to update existing scripts are included (convert from using ACTION_T_SET_UNIT_FIELD, field 68)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-17 19:48:19 +02:00
Lynx3d
40f70138da [10364] Restore build with gcc and cleanup includes a bit. 2010-08-17 19:42:20 +02:00
VladimirMangos
5f44c4da21 [10363] More wide use ObjectGuid in way remove MAKE_NEW_GUID uses.
Also
* Fixed some amount wrong uses low guids as full player guids.
* Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid.
  In some cases need assign "0" guid, then use ObjectGuid() instead.
* Fixed .pdump commands work.
2010-08-17 08:22:28 +04:00
NoFantasy
db7db6382a [10362] Implement creature_movement_template
Template can be used for several cases:
* Unique creature that are already spawned in database (requires creature.MovementType=2 like guid based creature_movement)
* Summoned creature that has a pre-defined path (requires creature_template.MovementType=2)

Note that creature_template.MovementType=2 should be used with care, and must not be used for creatures that may be summoned in random locations in world.

Added additional startup checks for existing creature_movement-table

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-16 14:39:45 +02:00
VladimirMangos
77a116dbe1 [10361] Send proper error message at password check fail.
It specailly fix 1.x client case that not understande used for later clients 4-byte message.
2010-08-16 04:06:11 +04:00
VladimirMangos
4d3e26a4c0 [10360] Restore triggered auras cleanup at main aura expire after auraholders adding. 2010-08-15 08:05:47 +04:00
crackm
806ea9bbe7 [10359] Implement spell 45449.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-15 03:14:17 +04:00
NoFantasy
647f731e3b [10358] A small spoon of changes and cleanup for WaypointMovementGenerator
* Initialization to ensure destination is always set (prevent evade problem)
* Simplify how behavior for node is processed, incl fix MovementInform script call (based on idea/past code from Quriq14)
* Make sure last node is also processed correct (DB script for last node will now work as expected)

As usual if any problems occur, you can call our toll free customer support number.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-14 23:38:49 +02:00
VladimirMangos
9c07bb1314 [10357] PacketLog.* not used in core some time already so drop it. 2010-08-14 02:06:56 +04:00
Schmoozerd
3dd8c72a00 [10356] Drop unneeded groupFlag and rename it properly
(based on Schmoozerd's repo commit 1e8c842)

Also drop `achievement_criteria_requirement` data use at start timed achivement:
its will be checked at criteria update (and complete) case. So wrong criteria will
started maybe (timer set but always fail - progress not updated.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-14 00:14:47 +04:00
NoFantasy
c7761a6db9 [10355] Correctly clearUnitState at Interrupt of WaypointMovementGenerator for creature
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-13 12:31:38 +02:00
NoFantasy
5d6311da68 [10354] Use time constants instead of hard coded values for STOP_TIME_FOR_PLAYER
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-13 11:23:45 +02:00
VladimirMangos
7e70bba865 [10353] Avoid access to DB at view GM tickets by chat commands.
Also
* Show response text if added at view.
* Show tickets amount at console .ticket use instead unexpected no player error.
* Allow use ticket number in .ticket respond case.
* Some code cleanups.
2010-08-13 05:41:34 +04:00
Schmoozerd
12aa1bc606 [10352] Implement support explcitly started timed achievements.
* Player::StartTimedAchievementCriteria can be used for activate timer
  for specific explicitly starting timed achievement by timedRequirementId
  in script.

* for ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST this done in core.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 23:28:18 +04:00
dpedroia15
64fe2cf3ed [10351] For item 50351 and 50706 fixed work in case no offhand weapon.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 05:59:58 +04:00
Fred
ea93dd13cf [10350] Fixed some typos.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 05:32:18 +04:00
VladimirMangos
017d7c7160 [10349] Implement work item 50351 and 50706. 2010-08-12 04:02:26 +04:00
Lynx3d
fbf517e763 [10348] Add missing Player check in unapply part of [10345]
Yes copy&paste is evil...
2010-08-11 23:53:58 +02:00
VladimirMangos
b0d42a6f67 [10347] Fixed wrong ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION (46) check.
In result wrong check characters complete
exalted reputation achievements at create or any reputation change event
with negative reputation. Fix prevent new cases but not do anything with
already wrongly recieved ahcievements.

Also:
* Avoid use PROGRESS_SET at normal achievment criteria progress update
  becase achivement/counter in normal way can't decrease.
* At achievment criteria progress loading check that progress counter less
  or equal max counter value.
2010-08-12 00:14:19 +04:00
VladimirMangos
3c5da27442 [10346] Fixed crash in .send items
Also fixed some missed cases from prev. typo fix.
2010-08-11 22:58:39 +04:00
Lynx3d
29281d476a [10345] Fix passive spells that are active without shapeshift and certain shapeshift forms only.
Currently, 63411 is the only affected spell, but implementation is hopefully generic enough to cover future cases.
2010-08-11 19:42:20 +02:00
Saeba
29383e6b7b [10344] Fixed typo in LANG_COMMAND_ACHIEVEMENT_CRITERIA.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-11 21:15:55 +04:00
NoFantasy
76aa99627f [10343] Correct order of spell id's in dummy aura effect
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-11 17:43:16 +02:00
VladimirMangos
4c838a1c31 [10342] Cleanup achievement code and add new commands.
* .achievement - let see achievement state and list criteria with progress data.
                 It provide criteria ids/shift-links for other commands.
* .achievement add - let complete achivement (set all criteria progress to max) with related events.
* .achievement remove - let reset achievement  criteria progress and undo complete state for achievement.
                 Command also partly remove rewards (title part).
* .achievement criteria add - let increase criteria progress at specific amount or to complete state
* .achievement criteria remove - let reset/descrease criteria progress and undo criteria and related achivement complete state if need.
2010-08-11 07:49:46 +04:00
VladimirMangos
5c2fc55fe4 [10341] Fixed typo in .ticket code 2010-08-11 03:16:46 +04:00
VladimirMangos
8b99ac7298 [10340] Some fixes for recent chat code changes.
* Fixed crash at absent optional literal. Thanks to MysteriousSouL for reproting.
* Converted mode commands use new way parsing functions with fixing posible crash cases.
2010-08-11 02:14:10 +04:00
VladimirMangos
a202b33702 [10339] Restore lines ends in Player.cpp :/ 2010-08-10 23:37:14 +04:00
VladimirMangos
45cdc67f58 [10338] Create Map version for GetPlayer/GetUnit fucntions
* This let make map local way access for cases when player/all units
  expected to be at same map (for scripts cases for example).
  Ofc, still exist many places where code expect world wide player search.
  Spell casting for support far target cases, groups/guilds/chat/etc packets

* Function Unit::GetUnit depricated and will removed soon.
* Function GetCreatureOrPetOrVehicle renamed to less horriable GetAnyTypeCreature name.
2010-08-10 23:22:11 +04:00
Lynx3d
0aa9e5a133 [10337] Correctly handle auras with infinite duration in code added by [10335]... 2010-08-10 00:36:36 +02:00
VladimirMangos
085811fc06 [10336] Server side checks for casting non-combat spells in combat.
Interrupt casting non combat spell spell at neter to combat
and prevent it casting in combat (last checked by client
but better recheck at server for prevent cheating).
2010-08-10 02:01:08 +04:00
Lynx3d
7e251dd408 [10335] Make sure DynamicObjectUpdater::VisitHelper does not overwrite existing PersistentAreaAura and leave orphaned aura in m_modAuras. 2010-08-09 23:56:43 +02:00
VladimirMangos
344dff303e [10334] Update shift-link related functions for chat command parsing.
Also

* Better single | detection as non-link case (doubled by client)
* Commands .pdump now allow quoted filename (usefull if filename path include whitespaces)
2010-08-10 00:20:58 +04:00
VladimirMangos
e36a4a5d01 [10333] Traditional post-commit typo fix :( 2010-08-09 06:20:19 +04:00
VladimirMangos
779e40d5ff [10332] Save cast item guid for auras also.
This must fix another way duplicate aura adding to DB error.
It also prevent wrong stacking work for weapon equip bufs
in cases when its allowed for both wepoan indepndently apply.
2010-08-09 06:17:23 +04:00
VladimirMangos
59e672f1bc [10331] More basic chat command parsing functions and its uses.
* Commands .debug update and .modify bit removed as redundent
* Command .debug getvalue now can output values in float/int/hex/bitstring formats
* Command .debug setvalue now ca accept values in int/float/hex/bitstring formats
* Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask
  (in 3 modes: |= &= &=~ ) to value in update field
* Command .debug moditemvalue added similar .debug modvalue for item case.
* Command .npc set movetype now propertly update spawned in world creature state.
* Command .modify spell renamed to .debug spellmods and restored to working state.
* Commands .account password and .account set password now allow use quoted strings
  for passwords and then now possible set from chat/console passwords with white spaces.
* Many commands converted to new functions without modify functionality
  except better error detection in some cases at wrong command syntax use.

* Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
2010-08-09 03:52:11 +04:00
NoFantasy
fefd648d3e [10330] Add dummy aura effect of spell 10255 and dummy effect of 10254
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-08 23:40:33 +02:00
NoFantasy
b0a3ad5aa5 [10329] Improve target selection for spell_script_target creature targets
Fixes a problem where database has more than one entry for a spell and target is explicitly provided by script side.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-08 22:45:58 +02:00
VladimirMangos
1a1a541ecf [10328] Avoid explcit client max level use for selction bg/arena bracket.
This allow use brackets like 85-89 existed for some maps
if at server allowed levels > 80. Before like players placed
into bracket for level 80 always.
2010-08-08 01:53:00 +04:00
Lynx3d
a977c068f0 [10327] Implement reputation rates and aura effects for Spell::EffectReputation().
Also apply rates after percentage aura modifiers, so auras always
give expected percentage of final value independant of "hidden" rates.
2010-08-07 21:19:59 +02: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
edace1948e [10324] Implement new basic functions for chat command parsing.
* Now can be used as quotes any strings with symbols ' " [] around.
  For example can be used: .additem [Tourch] or .additem "Tourch".
  And in similar cases wher before [] or "" only canbe used in commands.

* New functions support propertly extraction shift-links as optional first args
* Also added more safe functions for extraction int32/uint32/float values.

For more wide use new functuons specialized extraction functions also need chnaged to same way work.
This is goal for future work at this part code.
2010-08-06 06:31:25 +04:00
VladimirMangos
373f607a44 [10323] Implement achivement view commands.
This is fist part for achievement related command set.
Edition commands will added in some later commits when ready.

Two command added:

* .lookup achievment $partname - show fit achievements
  (id, shiftlink, complete date for selected player).
  shiftlink included similar data as generated by client for achievement shift-link
  (complete state, complete date, marked completed criteria).

* .character achievements [$playername] - show completed achievements for selected player
2010-08-06 02:15:09 +04:00
VladimirMangos
0cc1fbe697 [10322] In chat command handlers use char* arg instead "const char*"
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.

Some other code style exist in related code.
2010-08-06 01:14:33 +04:00
VladimirMangos
17ecab0030 [10321] Share some code for faction related commands. 2010-08-05 01:19:12 +04:00
VladimirMangos
63bea3c422 [10320] Reserve mangos string ranges for old client specific strings. 2010-08-04 21:11:48 +04:00
VladimirMangos
bfb1cb9e67 [10319] Prevent double remove aura holder at stacking limit.
If aura holder have 2 or 3 auras with fit to aura type stacking limitation
code can attempt deleted old aura holder 2/3 times.
2010-08-04 19:00:41 +04:00