Commit graph

4954 commits

Author SHA1 Message Date
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
MaS0n
29ab336b27 [10318] Gender field in SMSG_WHO packet.
Also fix warning in class declaration forward

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-04 15:45:05 +04:00
lasyan3
ad7b628ebf [10317] Rogue's energy rate in mangos.conf
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-04 02:46:24 +04:00
Lynx3d
9648f4e1d9 [10316] Make gcc happy once more... 2010-08-03 23:39:15 +02:00
zergtmn
d31ce2e2a3 [10315] Make AuraHolder::IsDeleted() really work.
In fact it has been broken originally when added in Aura long before move it to AuraHolder.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-04 01:36:56 +04:00
VladimirMangos
685edfe7e2 [10314] Implement commands for work with areatriggers in game.
* all teleport commands support new areatrigger and areatriger-target shiftlinks
* .go trigger now let select areatrigger or areatrigger target as teleport point
* New commands:
  .trigger        - show detail info about areatrigger including all requirements
                    for teleport with shift-links to items/keys/quest
  .trigger active - show all currently activated by character areatriggers
  .trigger near   - show near areatriggers

* .lookup item now show [usable] postfix if item can be used/equipped by selected character.
2010-08-04 00:58:01 +04:00
VladimirMangos
835efe7f6a [10313] Drop now unused Aura::m_deleted.
Most functionality move to similar flag of AuraHolder.
2010-08-03 14:42:40 +04:00
zergtmn
131fb72006 [10312] Allow store in DB same spell auras from different casters.
This fix errors at auras save to DB for like cases.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-03 04:06:07 +04:00
VladimirMangos
a48fdd8620 [10311] Prevent lost sql update content at git_id -s use in some cases.
To devs: please update git_id binaries
2010-08-03 03:19:39 +04:00
NoFantasy
8aaf32798f [10310] Clarify argument in emote related functions, expecting emote id
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-03 01:01:45 +02:00
zergtmn
a6d0b61d45 [10309] Make AreaTriggerEntry passed in script call const.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-02 08:31:17 +02:00
VladimirMangos
1500be4079 [10308] Fixed mangos.sql after recent changes. 2010-08-02 04:05:29 +04:00
NoFantasy
c6f2f16e05 [10307] Rename two tables to prefix scripted_, making the tables have consistent names
Both tables (areatrigger / event_id) are used explicit to store ScriptName for script library use.
In addition rename to ScriptName in instance_template

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-01 23:10:37 +02:00
Vinolentus
0880454847 [10306] Restore spell boosts apply.
It has been broken in srange way at moving function to SpellAuraHolder :/
Must restore work many additional auras affects

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-01 19:20:04 +04:00
NoFantasy
493ae9c2f5 [10305] Add additional AddMenuItem function for GossipMenu
This version allows using id of some text from database instead of text itself, and will then simplify locales especially from script side.

Thanks to Vladimir who woke up to hundreds of questions and lines of weird test code, helping me out with all the stuff i didn't understand (which was about 75% of the changes done in here :P )

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-01 16:41:55 +02:00
VladimirMangos
c138fbe902 [10304] Use loop instead repeating code in models check. 2010-08-01 06:17:11 +04: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
2455450cc0 [10302] Add dummy aura effect of spell 31606
Note: it is expected that script side update player displayId at end of related taxi path. If not, player will be stuck with the model.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-01 02:10:22 +02:00
VladimirMangos
e082e29bcc [10301] Init guild create date at create in same value in memory and DB. 2010-07-31 23:01:37 +04:00
VladimirMangos
4f19017872 [10300] Fixed some strange GetAura arg values. 2010-07-31 21:46:24 +04: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
Lynx3d
28d1ac66c3 [10298] Clear tavern rest when leaving building and prevent forced unmount when in GM mode. 2010-07-31 09:54:43 +02:00
VladimirMangos
af50d03f16 [10297] Drop CMSG_SET_FACTION_CHEAT support.
No reported long time and now finaly broken by spillover rep changes.
2010-07-31 07:21:36 +04:00
NoFantasy
7bdf05901d [10296] Move ChooseDisplayId to Creature class for access from script side
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 21:08:58 +02:00
dpedroia15
181428e132 [10295] Add dummy effect of spell 24930
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 19:30:09 +02:00
NoFantasy
767032029f [10294] Add dummy aura effect of spell 47190 (part w/ buff(transform))
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 19:16:35 +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
Janu
99ac2d43a7 [10292] Fixed typo in mangosd.conf comment.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-30 20:23:48 +04:00
VladimirMangos
b1cbb1634d [10291] Use new fast/safe way for access aura in drink item spells.
Access useing aura->holder->some_effect_aura let have always pointer to exactly
expected aura from same cast if this need.
2010-07-30 19:42:30 +04:00
NoFantasy
ccd8f4f825 [10290] Simplify startup check for creature models
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 17:32:45 +02:00
NoFantasy
2ae0badf48 [10289] Adjust creature models system
This change will:
* make it easier to use cached data directly without any modifications
* correct issues regarding invisible models
* simplify certain aspects of model selection itself and make it somehow easier to control and maintain special cases.

Two new fields added to creature_model_info, to store modelid_alternative and modelid_other_team
* _alternative holds an alt. model, for cases where gender are the same, or is not male/female.
* _other_team is generally used for totem models, but may have future use.

This commit will possibly break a few things (visually) and will require DB projects to update their creature_template models data.
It is advised to use cache data as-is, and in addition fill creature_model_info for certain models, totems in particular, for expected appearance.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 16:40:17 +02:00
VladimirMangos
3099a99f9a [10288] Unsummon pet if pet direct control spell expire out of visibility range from owner. 2010-07-30 05:01:35 +04:00
VladimirMangos
ed737c55cd [10287] Fixed crash in result double deleting auras in some cases.
Pre-aura holder code always remove auras from diff lists before un-apply aura affect call.
Restore this way work for new aura holder code. This prevent different strange affects
when aura find by search when it already expected to be removed from target, including case when in
result som un-apply called code aura deleted 2 times.
2010-07-30 05:00:59 +04:00
zergtmn
119e97a1a1 [10286] Use unsigned type for creature_addon.guid
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-30 02:54:18 +04:00
VladimirMangos
696b8c06dc [10285] Use lazy computition for Guild::GetAccountsNumber 2010-07-29 22:31:40 +04:00
porteyoplait
3ca05f9d4d [10284] Fixed memory leaks at guild unload/disband
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also drop redundent m_PurchasedTabs field.
2010-07-29 21:56:10 +04:00
VladimirMangos
c6b52bf285 Clarify related table in error message for unknown mangos string entries 2010-07-29 16:08:35 +04:00