Commit Graph

45 Commits

Author SHA1 Message Date
linencloth 7708e2ea06 Core/Creature: Reset loot recipient group on respawn.
Fixes issue 4051.

--HG--
branch : trunk
2010-09-17 15:10:10 +02:00
linencloth d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
azazel a034ac9937 Scripts: enhance SCRIPT_COMMAND_TALK command to make Players talk (add 0x1 bit to datalong2 and command will expect Player instead of Creature for talking).
--HG--
branch : trunk
2010-09-16 13:28:16 +06:00
linencloth 9739bea487 Core/Loot: Reimplement the proper check for loot recipient to prevent rewarding loot without tagging the creature by the player.
Also fix the related skinning problem, and do not set the skinnable flag for creatures without any loot recipient.

--HG--
branch : trunk
2010-09-15 17:44:56 +02:00
linencloth 91d2c1d64c Core/Creature: Initialize the recipient group for creatures.
It fixes creatures appearing as tagged units, and may also prevent crashing which could happen by using the bad pointer.

--HG--
branch : trunk
2010-09-15 17:30:42 +02:00
Shauren a72fc44f9a Core/Loot: Reverted part of revision fe39cb058b75, fixes skinning loot
Core/Loot: Some logic fixes for group looting
Buildsystem/MSVC: Fixed compile warning
Config: Added missing description for Rate.Drop.Item.ReferencedAmount

Closes issue #4004.

--HG--
branch : trunk
2010-09-15 13:44:40 +02:00
linencloth ec5edaf6bf Core/Creature: Initialize the creature's default movement generator on respawn.
Fixes creatures which are moving by default, but not continuing it after respawning.

--HG--
branch : trunk
2010-09-15 06:23:25 +02:00
linencloth 356a263059 Core/Creature: Fix creature respawn time in unloaded/inactive grid cells.
Fixes issue 1865.

--HG--
branch : trunk
2010-09-15 06:22:54 +02:00
linencloth 6bdfc77b42 Core/Player: allow dead players to see dead creatures near their corpses
--HG--
branch : trunk
2010-09-14 02:57:53 +02:00
click a6efc4dad5 Core/Loothandling: Make sure "pet-only"-kills doesn't drop loot (when pet is killing a creature on its own without any assistance from player)
(Also fix unintended typo from r701f212a00)

--HG--
branch : trunk
2010-09-13 22:49:20 +02:00
Shauren 6d0a031a77 Core/Quests: Some cleanup in quest relation accessing
--HG--
branch : trunk
2010-09-13 13:18:27 +02:00
click bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
Spp 405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
Shocker 2748f86bdb Fix crash when using a pool template with an entry > 65535, fixes issue #3632
--HG--
branch : trunk
2010-08-26 06:49:31 +03:00
azazel 341e6303ef Core:
* add helping methods for manipulating unit's health and use it where applicable
* fix some conversion warnings and cleanup code (formatting, CRLF, tabs to spaces)

--HG--
branch : trunk
2010-08-26 01:20:57 +06:00
silinoron 8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
Spp 51d8333ccc Core: Fix more warnings
--HG--
branch : trunk
2010-08-23 15:11:06 +02:00
silinoron 5cbae843d5 Core/Game: fix all warnings related to converting doubles and floats.
--HG--
branch : trunk
2010-08-22 12:39:39 -07:00
click 670964803f Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG
--HG--
branch : trunk
2010-08-22 01:57:04 +02:00
Spp c3343638cb Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here"
- Some "unused variable"
- Some "enumeration value 'xxx' not handled in switch"

--HG--
branch : trunk
2010-08-21 20:08:47 +02:00
John Holiver 6e6d62def9 Core: Creature should aggro player when players aggro creature during SetInCombatWithZone (otherwise, creature will remain not in combat).
--HG--
branch : trunk
2010-08-21 02:15:19 -03:00
Machiavelli 994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
Machiavelli 87218eadcd * HIGHLY EXPERIMENTAL - USE AT OWN RISK *
Database Layer:
- Implement connection pooling: Instead of 1 delay thread per database, you can configure between 1 and 32 worker threads that have a seperate thread in the core and have a seperate connection to the MySQL server (based on raczman/Albator´s database layer for Trinitycore3)
- Implement a configurable thread bundle for synchroneous requests from seperate core threads (see worldserver.conf.dist for more info)
- Every mapupdate thread now has its seperate MySQL connection to the world and characters database
- Drop inconsistent PExecuteLog function - query logging will be implemented CONSISTENTLY later
- Drop current prepared statement interface - this will be done *properly* later
- You´ll need to update your worldserver.conf and authserver.conf
- You´re recommended to make a backup of your databases before using this.
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
etc.

--HG--
branch : trunk
2010-08-18 02:25:52 +02:00
click 1f80c7b3c0 Sourcefile sleanups -> tabs to spaces, remove whitespace - also update the cleanupscripts very slightly
--HG--
branch : trunk
2010-08-08 19:45:53 +02:00
azazel 590199d8e1 * Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project
* Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker.

--HG--
branch : trunk
rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp
rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
2010-08-08 22:54:58 +06:00
XTZGZoReX 9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +02:00
XTZGZoReX 909e332579 * Rename: BattleGround -> Battleground.
--HG--
branch : trunk
2010-08-08 04:37:24 +02:00
XTZGZoReX 946adf469c *** New core <-> script library interface - complete rewrite of the old one.
* Removed the misdesigned on_events script/hooks.
* Lots of related cleanups and assertions.
* The interface is now fully object-oriented.
** Scripts no longer use function pointers.
** Scripts no longer use the general-purpose Script struct for everything.
** Script types are split into separate classes which must be inherited depending on what functionality is desired.
* Several script types have been added to allow extending functionality in a code-only manner (some script types require
  assignment in the recently added ScriptName columns in the database, though).
** SpellHandlerScript: Wrapper around spell scripts (returns new SpellScript objects (`spell_script_names`.`ScriptName`)).
** ServerScript: Allows scripting events that occur in the network layer.
** WorldScript: Allows scripting certain world-global events.
** FormulaScript: Allows hooking and interfering with core formulas.
** *MapScript: Allows hooking different map types (including world, instance, and battleground maps (`instance_template`.`ScriptName`)).
** ItemScript: Allows scripting of items (like the old interface (`item_template`.`ScriptName`)).
** CreatureScript: Allows scripting of creatures/AI (like the old interface (`creature_template`.`ScriptName`)).
** GameObjectScript: Allows scripting of gameobjects (like the old interface (`gameobject_template`.`ScriptName`)).
** AreaTriggerScript: Allows scripting triggered area triggers (like the old interface (`areatrigger_scripts`.`ScriptName`)).
** OutdoorPvPScript: Script which should return OutdoorPvP objects for use by OutdoorPvPMgr (`outdoorpvp_template`.`ScriptName`).
** CommandScript: Allows extending the in-core command table.
** WeatherScript: Allows scripting of weather changes (`game_weather`.`ScriptName`).
** AuctionHouseScript: Allows scripting of auction events.
** ConditionScript: Allows scripting of conditions (`conditions`.`ScriptName`).
** DynamicObjectScript: Allows scripting of dynamicobjects.
** TransportScript: Allows scripting of transport events (`transports`.`ScriptName`).
* OutdoorPvP objects are now created through scripts. This effectively means that they'll need to be moved to scripts
  before the they're functional again.
* The whole idea with this new interface is to allow expanding core functionality without touching core code. If further
  hooks are needed to expand functionality of the core, let us know; we'll add them, if we agree that it is appropriate
  to do so.
*** NOTE: The scripts project will _not_ build before it has been adapted to the new interface.
*** Thanks to everyone who helped out with related preparations and suggestions!

--HG--
branch : trunk
2010-08-06 19:23:43 +02:00
QAston 6353e7dd8c *Update movement enums - thanks to Zor for info.
*Add functions for position data streaming.

--HG--
branch : trunk
2010-08-04 14:39:45 +02:00
Shauren 46c1a4640d Groups are now stored by low guid in map
Creatures and gameobjects also store looting group by low guid instead of full guid

--HG--
branch : trunk
2010-08-02 17:28:47 +02:00
QAston 48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
Liberate 4476247f10 Makes mechanicals immune to heals other than those specifically targeting mechanicals. had to bribe quite some Gnomes and Goblins to make this happen.
--HG--
branch : trunk
2010-07-28 01:26:18 +02:00
click e5b7f6ad01 Add option for search distance to getHeight() functions and make Creature::FallGround() use VMaps properly. (Fix by Lynx3d)
This finally prevents flying creatures from falling to infinity (basically instantly diappearing) in several instances, aswell
as prevent creatures from falling inside larger solid object around the world.

--HG--
branch : trunk
2010-07-27 17:29:33 +02:00
QAston c0f9ef6059 *Implement SPELL_EFFECT_CREATE_TAMED_PET(153).
--HG--
branch : trunk
2010-07-20 22:55:28 +02:00
Shauren 894a065203 Revert revisions 67325b1a0af0 and a0cba24b9060.
Made vendors ignore gold cost by default when extended cost is set, except when item has ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD flag

--HG--
branch : trunk
2010-07-15 10:12:51 +02:00
click 673c652ba6 change "IN_MILISECONDS" to proper english "IN_MILLISECONDS"
--HG--
branch : trunk
2010-07-12 00:30:17 +02:00
Brian d2f6ae6f77 * Fix creatures spawning with less than max health if curhealth field in
* creature is != maxhealth in creature_template and the creature is supposed
* to regenerate health.
* Patch courtesy of Visagalis
* Thanks for taking the time to fix this LONG outstanding bug

--HG--
branch : trunk
2010-06-28 06:42:01 -06:00
Machiavelli 26f4fae802 Fix bug that creatures which use FleeingMovementGenerator would not attack after respawning.
Bug was caused by improper react state

--HG--
branch : trunk
2010-06-27 03:47:18 +02:00
Brian 852a0c44a2 * Renamed PoolHandler to PoolMgr since the pool systems has nothing to do with
* the client/server protocol.

--HG--
branch : trunk
rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp
rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h
2010-06-25 03:50:19 -06:00
Machiavelli 0f7657b68c Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.

--HG--
branch : trunk
2010-06-25 00:18:01 +02:00
Machiavelli 95ddfbd9e2 Remove some redundant explicit NULL checks for pointers before ´delete´ or ´delete[]´ calls since this check is done implicitly when deleting.
Also fixes a memory leak in .reload creature_template command

--HG--
branch : trunk
2010-06-21 23:20:58 +02:00
John Holiver 5dff68e457 Allow to sell item for: money, extendedCost or money+extendedCost.
The new method (money+extende) can be used by using negative values on npc_vendor.ExtendedCost.
This one goes dedicated to ZxBiohazardZx.
Tnx also to VladimirMangos.

--HG--
branch : trunk
2010-06-09 19:38:15 -03:00
Brian 9b6669e5f3 * Remove more relative paths from includes
--HG--
branch : trunk
2010-06-08 15:50:23 -06:00
Brian b0e1605455 * Getting closer (at least for Linux :) )
--HG--
branch : trunk
2010-06-07 14:44:18 -06:00
Rat 75b80d9f5b rearranged core files
--HG--
branch : trunk
2010-06-05 23:40:08 +02:00