Commit graph

205 commits

Author SHA1 Message Date
VladimirMangos
b0edd807d7 [10513] Clear grid *Check/*Searcher clases use
* Check class considered have all info select  object in world from suggested but grid walker list in some grid.
  This also meaning that Check must always have focus object around that (and in same phase) fit objects must be.
* Searcher only must ask Check and know how from all objects fiting to Check select result object(s).

For this reason and for better compatibility removed first arg (searcher) form all Searcher classes.
Instead expected used Check::GetFocusObject() object if need ( by always need check and simolify Check classes
phase checked in Search classes). This also restore source code compatibilty in related lines with prev.client
version branches code.

* While focus object adding fixed possible wrong phase object selection at stealth detection and at corpse searches.
2010-09-22 06:25:21 +04:00
VladimirMangos
acd0716297 [10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.

In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
2010-09-02 05:13:16 +04:00
cipherCOM
1ccf1ccd86 [10413] Add some missing class/struct forward declarations and includes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-27 23:55:57 +04:00
VladimirMangos
f3579fba64 [10406] Fixed work .learn and other spell commands with unlearned talent shift-link.
Unlearned talent have -1 as rank in shift-link, return instead first rank.
2010-08-24 19:13:11 +04:00
VladimirMangos
d8fb1a60ac [10403] Stricted name check at chat command data loading from 'command' table. 2010-08-23 16:29:22 +04:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
VladimirMangos
ddd0c4567b [10387] Fixed quote parsing after optional arg in chat commands.
This is restore work .guid commands for example.
2010-08-20 21:29:22 +04: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
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
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
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
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
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
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
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
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
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
porteyoplait
d631895e1c [10282] Fixed typo in function name
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Note: prev. commit of same author (Toinan67 is alt. nick name ;) )

Also added some more checks in ref. function.
2010-07-29 00:27:03 +04:00
NoFantasy
fb1e8c01ef [10270] Implement basic system for reputation spillover
* Database table needs data for each faction that should give spillover to other faction(s). One faction may give spillover to max 4 other spillover factions.
* The spillover rate is multiplied with the points after bonuses and reward rate is set, Rate is given as: 0.5 for 50% gain, -1.0 for 100% loss, etc
* It is possible to restrict spillover faction by rank. If player has a higher rank with the spillover faction given in database, no spillover will be given towards this faction

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-25 17:05:34 +02:00
porteyoplait
5951ebeacc [10257] Fixed typo in "alliance" in recent commit changes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-24 15:27:27 +04:00
VladimirMangos
9a6535963c [10256] New auction command with subcommands for look different auction stores from anywhere. 2010-07-24 14:29:38 +04:00
NoFantasy
61990de6dd [10252] Implement reputation_reward_rate for quests and creatures
* In addition, implement "flat" reputation for quests, where a value in RewRepValueN is given. Human diplomacy will not affect the total. The rate however will be applied, where a faction is defined with a rate for quests. Value in database are expected to be *100 of the actual value given (before rate are applied).
* New database storage can contain rates for quest/creature/spell reputation and will affect the base value given as reward. When for example the quest reward for a faction should receive 30% more reputation points, the rate can be set to 1.3.
* This will fix issues with certain quests that are using the expected RewRepValueId but where the outcome has been lower than expected.
* Note that if the rate is set to 0.0 it will disable reputation gain for the faction and type.
* Reputation rate for spells (spell effect) is not yet implemented

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-23 17:50:36 +02:00
VladimirMangos
50c2e8eca2 [10251] Clarify error message for one from redundent commamd data case. 2010-07-23 19:34:23 +04:00
VladimirMangos
40ec688b2c [10244] Implement .stable gm command for open pet stable anywhere.
Maybe command not so useful for stable case because spell can be learned,
but it example how can be packet allowed depndent from player possibility
when some functionality base at many packets recieved from client.
Same way possible can be used for auction anywhere, maybe some other cases.

Also it will very usefull for 2.x/1.x branches where no another way... ;)
2010-07-22 08:49:15 +04:00
VladimirMangos
62e0e020a0 [10243] Traditional crash fix :/ 2010-07-22 07:35:14 +04:00
VladimirMangos
a121f7a3e5 [10242] Rewrite internal work chat command system.
* Use single command search function with recursion and reuse it in now more simple
  and consistent for execute/help/loading
* Add intergiry checks for hardcoded part of commands list. Fix some cases base at it.
* Fixed diff small problems in past code:
  - in console single symbol commands rejected (without dot start)
  - .help not output propertly subcommands list for not found subcommand
  - some other...
2010-07-22 06:51:16 +04:00
schmoozerd
9379e3b81d [10125] Add pool/event ids to diff creature/gameobject list output commands.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-30 20:45:12 +04:00
schmoozerd
4e1c8a2ad6 [10107] Pool/event info in .npc info and .gobject target commands
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-26 18:56:22 +04:00
VladimirMangos
a504b4d200 [10106] More modes for .go commands
* Now '.go' command can be used with creature_entry/gameobject_entry shift links (output of .lookup creature/object commands)
* Now '.go object' command sipport id-mode and name part mode similar .go creature case: .go object id #gameobject_id or .go object $namepart.
* HandleGoHelper use in more commands also.
2010-06-26 17:26:00 +04:00
VladimirMangos
619f01e150 [10086] Implement use .go command with shiftlinks or player name.
* Now if for .go command provided no X Y Z args command will not teleport player to nowhere.
* Instead command allow used with player name and work as simplifed .goname
  (teleport to player _point_ in user instance binding, not to player instance)
* Also command can be used with diferent point coordinates provided shift-links:
  - player (result for example .lookup player account)
  - creature (result .list creature command)
  - gameobject (result .list object command)
  - tele (result .lookup tele)
  - taxinode (result .lookup taxinode)
2010-06-20 07:13:20 +04:00
ApoC
d967af6549 [10065] Some return values fixes.
Signed-off-by: ApoC <apoc@nymfe.net>
2010-06-15 18:14:21 +02:00
VladimirMangos
b6d7365ac9 [9924] Implement .server log filter and .server log level comamnds.
* .server log filter comamnd let temporary (until config reload or restart)
  set log filters state. Or look at filters state.
* .server log level renamed from .server set loglevel but now let look at log level also.
2010-05-18 12:03:02 +04:00
VladimirMangos
080727cbfa [9886] Implement new commands for account search
* .lookup account email, .lookup account ip, .lookup account name
* For new commands and for .lookup player versions use first arg as part of email/ip/name search
* Use similar output format for player/account lists.
2010-05-13 11:44:03 +04:00
hunuza
68abd76c97 [9844] Fix some whitespace errors.
Signed-off-by: hunuza <hunuza@gmail.com>
2010-05-07 12:25:12 +02:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
VladimirMangos
7ee25008d3 [9794] Implement ".account characters" command
Console/chat command output characters list for specific account.
2010-04-26 07:13:39 +04:00
DasBlub
492ce567d2 [9767] Add the posibility to keep deleted characters in the database for a while and also add related commands.
Added commands:
* .character deleted list [$guid|$name]
* .character deleted restore $guid|$name [$newname]
* .character deleted delete $guid|$name
* .character deleted old [$keepdays]

Command .character delete renamed to .character erase

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-20 22:12:50 +04:00
SilverIce
e3f3f3410a [9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-12 15:15:55 +04:00
VladimirMangos
6ef88699d1 [9710] Add gm possibilities reset talents for all specs.
* At login reset '.reset all talents' will reset all spec talents.
* New command '.reset specs' will reset its online/offline.
* Command '.reset talents' now not support offline player case.
2010-04-09 22:43:11 +04:00
VladimirMangos
034da8f6d4 [9656] Implement '.list talents' command.
Command show really know by selected player talent ranks,
including bugged cases like 2 rank same talent known and etc.
Also command claculated count of talents and total used talent
points cost of known talent ranks.

Can be helpful in bug debuging and cheating cases.
2010-04-02 06:38:27 +04:00
VladimirMangos
b658b25ff8 [9618] More use ObjectGuid in spell/etc code 2010-03-25 13:59:46 +03:00
VladimirMangos
93ad67fc9d [9547] Implement ObjectGuid wrapper for guid value
Only one example (mostly) case converted to use it.
Need lot work for finally switch to class obly use, so old low-level defines still exist also (while used).
But some unused low-level defines dropped.
2010-03-08 00:46:04 +03:00
VladimirMangos
6487c24f29 [9545] Rename ObjectDefines.h -> ObjectGuid.h
Also move unrelated generic defines to Common.h
2010-03-07 20:05:32 +03:00
VladimirMangos
7fdbe497e9 [9518] Implement account associated execute for RA commands
* Now at login by RA-connection RA-connection use account id/access level
  for commands execute. So at login with moderator access by RA-connection you
  can execute only moderator level commands. For administrator level accounts
  allowed execute only console level commands if new config option RA.Stricted = 0.
  For security reasons by default RA.Stricted = 1.
* RA-connection executed commands now logged for associalted account id
* Some own account related commands allowed execute in RA-connection

NOTE: config version updated because RA.Stricted = 1 not compatible with old
      way work and this can break tools thta use RA-access if it not disabled.
      Yuo will need update mangosd.conf.
2010-03-05 04:24:32 +03:00
arrai
e520d8409e [9466] Implemented SOAP in MaNGOS
- removed deprecated code from RASocket
- allow more than one login at a time on the RA console
- added gsoap library for handling SOAP requests
- removed deprecated mangos_string entry

Thanks to:
- Derex for reporting a bug which occured if more than 1024
    players were connected  [poll() vs select()]
- caeruleaus for adding windowsbuild support
- vladimir for suggesting a different thread starting order
- fdb_ for suggesting SOAP in the first place
2010-02-27 10:52:07 +01:00
Timawyn
d62336cec2 [9436] Correctly display the party leader's name in chat
Signed-off-by: Lightguard <Lightguard@tauri.hu>
2010-02-22 23:49:23 +01:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
NetSky
40ed0190fa [9372] Missing whitespace.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-14 11:00:20 +03:00