Commit graph

134 commits

Author SHA1 Message Date
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
tomrus88
a57bf5a78b Applied coding style. 2009-05-29 19:23:28 +04:00
tomrus88
6821c24268 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-06 09:40:35 +04:00
arrai
fefe56e3c5 [7776] Completed implementation of CMSG_SPELLCLICK
For vehicles, you have to add the correct SPELL_AURA_CONTROL_VEHICLE spells to
npc_spellclick_spells, otherwise you won't be able to use them
2009-05-05 18:58:58 +02:00
tomrus88
b980e9ac59 Updated to 3.1.2.9855 client build, fixed quests, some work on monster movement. Not tested. 2009-05-02 19:41:00 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
VladimirMangos
278cd970f4 [7652] Fixed unexpected GM death at deep swim. 2009-04-12 02:36:19 +04:00
VladimirMangos
199c09640d [7648] Resolve problems with expected fall damage at near teleport.
Move near teleport landing code to WorldSession::HandleMoveTeleportAck.
This make Player::TeleportTo code working in same way for both far/near teleports.
Move mSemaphoreTeleport from WorldObject to Player and merge with DoNotMove (using 2 fields for far/near teleport flag).
Skip movement packets until landing confirmation for near teleport from client.
2009-04-11 11:06:30 +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
maikash
294e2c69a9 [7535] Fixed typo in transport boarding code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-24 18:41:30 +03:00
VladimirMangos
cc11ff40fe [7533] Redirect movement packet in proper way to controlled target.
* In creature case ignore fall/etc damage
* In player case apply fall damage/etc to controlled player, apply other movement effect to it also.
2009-03-24 14:06:39 +03:00
VladimirMangos
16ab4b6849 [7529] Hide some implementation details for fall damage calculation and breath timers. 2009-03-24 02:26:24 +03:00
VladimirMangos
73ac0bcc7f [7527] Remove redundent arg from Player::EnvironmentalDamage 2009-03-23 18:01:30 +03:00
VladimirMangos
e09435326f [7525] Prevent crashes at death controlled (including movement) creature. 2009-03-23 13:39:11 +03:00
VladimirMangos
722395be75 [7413] Fixed finally problems with node names localization in BattleGroundAB messages.
Also fix build at some platforms.
2009-03-08 14:39:53 +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
VladimirMangos
02dd431846 [7373] Implement expansion check at character loading (for homebind, transport and plain coordinates).
Also move fall damage calucaltion in new function.
2009-03-03 00:47:30 +03:00
Triply
a81d174288 [7353] Fixed problem with joining rated arena matches. Thanks to balrok for help.
Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 14:20:31 +01:00
Triply
3560d9de54 [7351] Fixed removing normal horde groups from queue.
Fixed Reflective shield - patch provided by Rastik. Thx

Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 11:08:57 +01:00