Commit graph

69 commits

Author SHA1 Message Date
zergtmn
ec6089bbd8 [10935] Move script calls to ScriptMgr
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
2010-12-29 21:48:06 +05:00
VladimirMangos
26370b8df7 [10933] Fixed crash at modified data from client at trainer spell learn. 2010-12-29 02:49:03 +03:00
zergtmn
2f4e7a9377 [10901] Allow vehicles to have gossip menu
In addition rename IsGameobject -> IsGameObject.
2010-12-21 15:14:52 +05:00
VladimirMangos
6c14f9fad3 [10876] Really fix crash in SendTrainerList :/ 2010-12-14 19:00:57 +03:00
VladimirMangos
c38c876b1d [10873] Fixed crash for case when trainer have only data in npc_trainer_template.
Good know base at report that this feature so quick start used actively ;)
2010-12-14 13:29:10 +03:00
VladimirMangos
1d8f222621 [10867] Implement templates for trainer spell data in npc_trainer_template.
New table let avoid duplication similar trainer spells for different trainers.
2010-12-13 16:39:53 +03:00
VladimirMangos
c6d3c5e0d6 [10810] More ObjectGuids specially in petition code.
Some uint64<->uin32 bugs fixed at read guids from DB in petition code.

Still exist 29 GUID_LOPART uses in code.
2010-12-02 05:17:00 +03:00
VladimirMangos
cc0655a402 [10782] Use Team enum types in all appropriate cases and catches bug in result fix.
* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
2010-11-25 01:11:17 +03:00
VladimirMangos
f9bcfa3a89 [10739] Cleanup pet remove code and some fixes.
* Merge Player::RemovePet and Pet::Remove function code to Pet::Unsummon
  This let be sure that in all cases all required steps doen. For example this fix
  creature's guardians propertly remove from guardians list.
* Add new pet save mode PET_SAVE_REAGENTS as replacement PET_SAVE_NOT_IN_SLOT+true-arg stable pair in old function args
  This will avoid use reagent save arg with wrong different save modes.
* Fixed recently added code with absent check for re-summon protector pet call.
2010-11-19 02:17:55 +03:00
VladimirMangos
851e15c70a [10635] Convert many opcode handlers to ObjectGuid use.
Also re-enabled anticheating check for bank window open
base at .bank command access rights.
2010-10-21 10:43:14 +04:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
VladimirMangos
dbe9c6f190 [10371] More wide use ObjectGuid in group code.
Also drop some unused functions.
And fix some uint32 -> uint6 guid assigns.
2010-08-18 13:43:55 +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
Ceris
d7b6840634 [10236] Implement SPELL_AURA_OPEN_STABLE (292).
(based on Wowka321's repo commit 213ceb0)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Rewrited partly.
2010-07-21 04:59:04 +04:00
VladimirMangos
e7093e3ebb [10235] Cleanup in pet stable handlers 2010-07-21 04:03:40 +04:00
SilverIce
e427ce80cc [10052] Camera System
(based on SilverIce's repo commit 4f2f4ab + next 3 more)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-14 07:23:03 +04:00
NoFantasy
b881c06104 [9938] Correct premature call of TalkedToCreature.
Only use TalkedToCreature when gossip does not have any following sub menu (and of course when the prepared npc options does not include any gossip)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-20 00:06:49 +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
tomrus88
b99f51a984 Fixed bug with professions in trainer list not being marked as known until trainer list re-opened. 2010-03-27 19:41:15 +03:00
tomrus88
dd3d5eec69 Updated to client build 11723. 2010-03-27 03:50:35 +03:00
VladimirMangos
2bf75e7a10 111 2010-03-13 16:12:13 +03:00
NoFantasy
dbe089b66d [9572] Add script calls for GameObject GossipHello and GossipSelect
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-11 15:35:13 +01:00
VladimirMangos
4a051e2443 [9496] HomeBind fixes.
* Use area id instead zone id for home bind zone info as expected.
  This will for example proper show capital name in area himebinding for capital; tavern.
* Clarify that player create zone in fact is area (subzone)
* Implement SPELL_EFFECT_BIND for normal homebinding.
  Also support spell target position mode used in 53823/53821 spells
* Add Spell::EffectEmpty for mark spell effects that used but not expect any code in handler.
  Example weapon spells that used just as known spell markers for client.

Original patch idea inspirit by Sadikum patch suggestion.
2010-03-01 13:08:52 +03:00
AlexDereka
4338c9105d [9324] Fix some gcc warnings 2010-02-08 02:27:34 +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
03c65f5a75 [8998] Allow pet guid to have gossip options like creature guid.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-16 11:12:09 +01:00
NoFantasy
f0e7f01a7b [8968] Implement gossip menu options for GameObject
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-11 11:08:27 +01:00
VladimirMangos
ed7d561597 [8963] Make bindpoint field private and add required functions for use. 2009-12-10 12:22:17 +03: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
NoFantasy
10ebadcadf [8871] Avoid use StopMoving when creature is already stopped.
Some additional code cleanup in related code.
2009-11-25 12:16:08 +01:00
balrok
6199396b69 [8821] removed some redundant player->SaveToDB calls
SaveToDB will already be called at "SpawnCorpseBones"
so no need to do this twice
2009-11-15 20:08:57 +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
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
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
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
arrai
a24f39a36f [8378] Use exceptions instead of explicit size checking for each packet
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
2009-08-16 23:50:22 +02:00
Ambal
9f938a9ed4 [8103] More wide use IsInWorld checks and delayed at teleport operations.
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-01 14:00:29 +04:00
VladimirMangos
5ac6b2f34b [7971] Implement support exotic pets limtations related to hunter telent 53270.
Note: before this commit hunters can tame exotic pets like any other.
      After patch like not propertly contriolled pets will auto-dismiss at loading
      if talent not learned.
2009-06-06 21:21:27 +04:00
yad02
469e8713b2 [7942] Fixed typo: proffesion->profession
Signed-off-by: hunuza <hunuza@gmail.com>
2009-06-02 12:27:45 +02:00
VladimirMangos
881cceff8c [7768] Add check to prevent set homebind to instance map. 2009-05-05 10:38:15 +04:00
VladimirMangos
8e2a664fad [7740] More correct flags in trainer list data for profession ranks.
Note: this is not fix problem with gren show recently learned non-first rank of primary profession.

Thanks to Seizerkiller for help in reseach.
2009-05-01 04:02:10 +04:00
VladimirMangos
f4adf83cd7 [7688] Move Get*IfCanInteractWith to Player including renamed IsGameObjectOfTypeInRange. 2009-04-19 22:54:40 +04:00
VladimirMangos
eb198f8239 [7645] Fixed problems wit temporary unsummoned pets and cleanup code.
* Save temporary unsummoned pet to current slot (instead non_in_slot mode) and
  prevent save as current pet summoned while temporay unsummon (arena)
* Prevent overwrite temporary summoned pet data
* At player loading set temporary unsummoned pet data instead pet loading
  if pet expected to be temporary unsummoned in current player state (loading in taxi flight/etc)
* Restore proper pet at arena leave and unsummon in arena summoned.
2009-04-11 08:46:48 +04:00
VladimirMangos
263bf2ab22 [7644] Fixed pet slot values using in pet save.
Problem exist from client version switch when stable slot amount changed.
In result this has been source problems with stable use (3-4 slots) and possible pet lost in some cases
or "not save state" for summoned pets.
Use enums to avoid repeating problem, use more safe value for not-in-slot save (for summoned pets)
Fixed data preparing for MSG_LIST_STABLED_PETS.
2009-04-10 09:02:04 +04:00
VladimirMangos
329fb3f9d1 [7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
This in some cases make some zones not explorable if it not have server side data in current maps
but not allow cheating with zone set from client.
2009-03-11 10:08:12 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
balrok
6c39db38f4 removed unneeded World.h includes
this is done by this script:
ack -c "World.h" | ack :1 | sed 's/:1//' | xargs grep -c sWorld | grep :0 | sed 's/:0//' | xargs sed -i '/#include "World.h"/d'
i didn't checked every change but gcc haven't complained
2009-03-08 01:26:52 +03:00
zhenya
22656b33e3 [7283] Use map for trainer spells for fast find data by spell id.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-15 22:49:12 +03:00