Commit graph

102 commits

Author SHA1 Message Date
VladimirMangos
e1d0c1cdba [9209] Finish synchonization walk mode for pets.
* Re-sync at follow mode switches
* Support sync for creature pets

Also
* Attempt fix build at *nix
* Drop unused unut state mask with typo in name.
2010-01-18 14:35:19 +03:00
VladimirMangos
2e9bf5ad6a [9197] More propertly update walk mode for player pets.
* Use AddMonsterMoveFlag instead SetMonsterMoveFlags for set walk-mode
* Apply walk/run mode to all copntrolled units (except totems).
* Synchronize walk/run mode at pet creating/loading.
2010-01-17 07:51:00 +03:00
NoFantasy
12096177e2 [9171] Update pet and minipet monster move flag at player toggle walk/run
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-13 14:52:59 +01: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
VladimirMangos
e8e5bbddea [9104] Avoid send reset warning to map/difficulty cases without fixed reset time. 2010-01-02 20:49:53 +03:00
VladimirMangos
2d7441b5a1 [8974] Increase z limit for at transport coordinates for bettr support big height lifts. 2009-12-12 05:41:01 +03:00
VladimirMangos
a2bb655501 [8965] Implement quit command for close RA connection.
World only in RA comandline.
2009-12-10 19:20:59 +03:00
VladimirMangos
ed7d561597 [8963] Make bindpoint field private and add required functions for use. 2009-12-10 12:22:17 +03:00
balrok
ba835f1d30 [8960] fix crash introduced with 8805
or actualy i didn't introduce a new crash there.. the old crash
just changed a bit..
after we force the player to logout without valid mapcoords the player wasn't in
world anymore and through that Getplayer()->GetMap()->RemoveFromWorld()
caused a crash..

i changed now the error handling inside farteleport there.. instead of forcing
a logout without saving, i just port him to his homebind
which will be much nicer

(minor cleanup with the other homebind teleportation.. we don't need to check
for the error there.. homebind realy should be a valid coord)
2009-12-09 22:57:28 +01:00
VladimirMangos
37ba6623bb [8828] Independent instance reset time for different difficulties.
* Store reset time for map/difficulty pairs.
* Use DBC data for reset time and max players instead `instance_template` fields (dropped)
  for each existed map/difficulty pair.
* Fix some "heroic" related checks in spells/etc.
2009-11-18 10:08:41 +03: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
balrok
eb94d78761 [8805] fix freeze with repeatingly calls at logout + HandleMoveWorldportAckOpcode
starts in WorldSession::logout inside while(isTeleportedFar)...

through coord won't get ever valid there - it will call
itself all the time
2009-11-11 15:27:23 +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
dc725ad6b8 [8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
2009-11-08 03:54:41 +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
VladimirMangos
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00
VladimirMangos
308439a335 [8601] Fixed some movement *_ACK packets structure after switch. 2009-10-08 16:02:28 +04:00
VladimirMangos
a9af7f2b1c Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties. 2009-10-06 02:12:02 +04:00
tomrus88
6f2b9a7e80 Merge commit 'origin/master' into 320 2009-09-14 16:32:59 +04:00
Ambal
cd8663972e [8494] Fixed typo in MovementHandler.cpp : GetPlayer()->Relocate() function was called twice.
Thanks to Wowka321 for hint.

Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-13 20:45:51 +03:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +04: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
tomrus88
fdc20af337 Some fixes. 2009-08-28 22:33:52 +04:00
tomrus88
2d65ce8b87 Merge commit 'origin/master' into 320 2009-08-28 17:26:09 +04:00
VladimirMangos
fdb2842f60 [8425] Implement SPELL_EFFECT_LEAP_BACK and spell 781
* Move CMSG_MOVE_KNOCK_BACK_ACK (player case) to Unit::KnockBackFrom
* Implement creature case, most at hack way currently :(
  Need information about expected server packet, and possible some disorientation movegen apply at short time.
* In adition of spell 781 implement related creature versions.

* Fixed warnings spawn at reading CMSG_MOVE_KNOCK_BACK_ACK, CMSG_MOVE_HOVER_ACK, CMSG_MOVE_WATER_WALK_ACK.
2009-08-27 05:27:45 +04:00
tomrus88
935c0a44c2 Merge commit 'origin/master' into 320 2009-08-23 18:57:07 +04:00
VladimirMangos
6ced2e979d [8403] Fixed cast spell opcode parsing for some cases with additional data. 2009-08-22 04:47:21 +04:00
tomrus88
fec1a1954c Merge commit 'origin/master' into 320
Conflicts:
	src/game/MovementHandler.cpp
2009-08-20 16:24:37 +04:00
tomrus88
3097dcda2b Removed useless code. 2009-08-20 16:18:34 +04:00
VladimirMangos
f45253ac8b [8393] Fixed format CMSG_FORCE_MOVE_UNROOT_ACK and CMSG_FORCE_MOVE_ROOT_ACK.
Also avoid packet tail warnings spam at rejected movement packets.
2009-08-20 00:15:34 +04:00
tomrus88
f553cf2887 Merge commit 'origin/master' into 320
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/DuelHandler.cpp
	src/game/ItemHandler.cpp
	src/game/Mail.cpp
	src/game/MiscHandler.cpp
	src/game/MovementHandler.cpp
	src/game/TaxiHandler.cpp
	src/game/WorldSession.h
	src/game/WorldSocket.cpp
2009-08-17 10:31:02 +04: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
tomrus88
1df1f7cff5 Fixed player movement.
Fixed multinode taxi.
Removed some unhandled opcode spam.
2009-08-09 18:08:14 +04:00
VladimirMangos
79c1324bed [8327] Fixed recieved packet size check for MSG_MOVE_TELEPORT_ACK. 2009-08-08 06:40:43 +04:00
tomrus88
e67d38648f Fixed teleport bug. 2009-08-08 02:08:40 +04:00
tomrus88
3de88aef12 Updated to 10116 client build. 2009-07-17 17:01:47 +04:00
tomrus88
1a47420fe8 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Map.cpp
	src/game/MapInstanced.cpp
	src/game/Player.cpp
	src/game/SpellEffects.cpp
	src/game/Totem.cpp
2009-07-15 09:40:13 +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
tomrus88
153410971d Merge commit 'origin/master' into 320
Conflicts:
	src/game/Player.cpp
2009-07-11 07:55:53 +04:00
Win32
03926619d9 [8151] Fixed some format warnings and typos.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

SOme changes rewrited with using [8150]
2009-07-09 01:09:12 +04:00
Ambal
2baccbebc3 [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-02 09:18:43 +04:00
VladimirMangos
48caaaffcf [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-07-02 09:18:24 +04: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
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
tomrus88
02bcc56919 Added placeholders for new battlegrounds, some other stuff. 2009-06-25 19:08:53 +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
tomrus88
25140ea3cc [8013] Fixed SMSG_RAID_INSTANCE_INFO opcode, some other fixes. 2009-06-14 19:24:56 +04:00
tomrus88
cae3f0a532 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
2009-05-31 12:16:25 +04:00
VladimirMangos
2a27a44e2a [7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
  I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
  Please always use UI64LIT(0x00001) instead less portable 0x00001LL
2009-05-30 22:44:20 +04:00