From 96f2b1d314dc89d16f05e5287bf7be1eb86b6b6c Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Mon, 10 Nov 2008 00:56:46 +0300 Subject: [PATCH] Load SummonProperties.dbc, data not used yet --- src/game/MovementHandler.cpp | 6 +++--- src/game/SharedDefines.h | 16 ++++++++++++++++ src/shared/Database/DBCStores.cpp | 2 ++ src/shared/Database/DBCStores.h | 1 + src/shared/Database/DBCStructure.h | 10 ++++++++++ src/shared/Database/DBCfmt.cpp | 1 + 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 0303a7dff..229aff452 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -298,7 +298,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) Player *target = GetPlayer(); //Players with Feather Fall or low fall time, or physical immunity (charges used) are ignored - if (movementInfo.fallTime > 1100 && !target->isDead() && !target->isGameMaster() && + if (movementInfo.fallTime > 1500 && !target->isDead() && !target->isGameMaster() && !target->HasAuraType(SPELL_AURA_HOVER) && !target->HasAuraType(SPELL_AURA_FEATHER_FALL) && !target->HasAuraType(SPELL_AURA_FLY) && !target->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL,true) ) { @@ -306,10 +306,10 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) int32 safe_fall = target->GetTotalAuraModifier(SPELL_AURA_SAFE_FALL); uint32 fall_time = (movementInfo.fallTime > (safe_fall*10)) ? movementInfo.fallTime - (safe_fall*10) : 0; - if(fall_time > 1100) //Prevent damage if fall time < 1100 + if(fall_time > 1500) //Prevent damage if fall time < 1500 { //Fall Damage calculation - float fallperc = float(fall_time)/1100; + float fallperc = float(fall_time)/1500; uint32 damage = (uint32)(((fallperc*fallperc -1) / 9 * target->GetMaxHealth())*sWorld.getRate(RATE_DAMAGE_FALL)); float height = movementInfo.z; diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 24042c31a..ca6c4b217 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2061,6 +2061,22 @@ enum SummonType SUMMON_TYPE_POSESSED2 = 428 }; +enum SummonType2 +{ + SUMMON_TYPE2_UNKNOWN = 0, + SUMMON_TYPE2_SUMMON = 1, + SUMMON_TYPE2_GUARDIAN = 2, + SUMMON_TYPE2_DEMON = 3, + SUMMON_TYPE2_TOTEM = 4, + SUMMON_TYPE2_CRITTER = 5, + SUMMON_TYPE2_GHOUL = 6, + SUMMON_TYPE2_BOMB = 7, + SUMMON_TYPE2_PHASING = 8, + SUMMON_TYPE2_SIEGE_VEH = 9, + SUMMON_TYPE2_DRAKE_VEH = 10, + SUMMON_TYPE2_LIGHTWELL = 11 +}; + enum ResponseCodes { RESPONSE_SUCCESS = 0x00, diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp index 60f9e21c4..f501c1f80 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/shared/Database/DBCStores.cpp @@ -109,6 +109,7 @@ DBCStorage sSpellRangeStore(SpellRangefmt); DBCStorage sSpellRuneCostStore(SpellRuneCostfmt); DBCStorage sSpellShapeshiftStore(SpellShapeshiftfmt); DBCStorage sStableSlotPricesStore(StableSlotPricesfmt); +DBCStorage sSummonPropertiesStore(SummonPropertiesfmt); DBCStorage sTalentStore(TalentEntryfmt); TalentSpellPosMap sTalentSpellPosMap; DBCStorage sTalentTabStore(TalentTabEntryfmt); @@ -318,6 +319,7 @@ void LoadDBCStores(std::string dataPath) LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRuneCostStore, dbcPath,"SpellRuneCost.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshiftForm.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc"); + LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTalentStore, dbcPath,"Talent.dbc"); // create talent spells set diff --git a/src/shared/Database/DBCStores.h b/src/shared/Database/DBCStores.h index 0e6664394..af8baa5eb 100644 --- a/src/shared/Database/DBCStores.h +++ b/src/shared/Database/DBCStores.h @@ -191,6 +191,7 @@ extern DBCStorage sSpellRuneCostStore; extern DBCStorage sSpellShapeshiftStore; extern DBCStorage sSpellStore; extern DBCStorage sStableSlotPricesStore; +extern DBCStorage sSummonPropertiesStore; extern DBCStorage sTalentStore; extern DBCStorage sTalentTabStore; extern DBCStorage sTaxiNodesStore; diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index 7937efdac..016b5570f 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -1234,6 +1234,16 @@ struct StableSlotPricesEntry uint32 Price; }; +struct SummonPropertiesEntry +{ + uint32 Id; + uint32 Unk1; + uint32 Unk2; + uint32 Type; + uint32 Slot; + uint32 Flags; +}; + struct TalentEntry { uint32 TalentID; // 0 diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp index aa2564ab8..b67c18bbe 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/shared/Database/DBCfmt.cpp @@ -77,6 +77,7 @@ const char SpellRangefmt[]="nfxfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char SpellRuneCostfmt[]="niiii"; const char SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxx"; const char StableSlotPricesfmt[] = "ni"; +const char SummonPropertiesfmt[] = "niiiii"; const char TalentEntryfmt[]="niiiiiiiixxxxixxixxxxxx"; const char TalentTabEntryfmt[]="nxxxxxxxxxxxxxxxxxxxiiix"; const char TaxiNodesEntryfmt[]="nifffxxxxxxxxxxxxxxxxxii";