*Update to Mangos 7093.
--HG-- branch : trunk
This commit is contained in:
@@ -326,8 +326,8 @@ WHERE length(SUBSTRING_INDEX(data, ' ', 1592)) < length(data) and length(SUBSTRI
|
||||
UPDATE item_instance SET data = REPLACE(data,' ',' ');
|
||||
UPDATE item_instance SET data = CONCAT(TRIM(data),' ');
|
||||
UPDATE item_instance SET data= CONCAT(
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',30),' ',-30),' 0 0 0 ',
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',60),' ',-60+30),' 0 ')
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',54),' ',-54),' 0 0 0 ',
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',60),' ',-60+54),' 0 ')
|
||||
WHERE SUBSTRING_INDEX(data,' ',60) = data AND SUBSTRING_INDEX(data,' ',60-1) <> data;
|
||||
UPDATE item_instance SET data= CONCAT(
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',30),' ',-30),' 0 0 0 ',
|
||||
|
||||
@@ -4,8 +4,8 @@ UPDATE item_instance SET data = REPLACE(data,' ',' ');
|
||||
UPDATE item_instance SET data = CONCAT(TRIM(data),' ');
|
||||
|
||||
UPDATE item_instance SET data= CONCAT(
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',30),' ',-30),' 0 0 0 ',
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',60),' ',-60+30),' 0 ')
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',54),' ',-54),' 0 0 0 ',
|
||||
SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',60),' ',-60+54),' 0 ')
|
||||
WHERE SUBSTRING_INDEX(data,' ',60) = data AND SUBSTRING_INDEX(data,' ',60-1) <> data;
|
||||
|
||||
UPDATE item_instance SET data= CONCAT(
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ enum EnchantmentSlot
|
||||
SOCK_ENCHANTMENT_SLOT_2 = 3,
|
||||
SOCK_ENCHANTMENT_SLOT_3 = 4,
|
||||
BONUS_ENCHANTMENT_SLOT = 5,
|
||||
WOTLK_ENCHANTMENT_SLOT = 6,
|
||||
PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
|
||||
MAX_INSPECTED_ENCHANTMENT_SLOT = 7,
|
||||
|
||||
PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix
|
||||
|
||||
@@ -324,7 +324,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
|
||||
data << pProto->ItemId;
|
||||
data << pProto->Class;
|
||||
data << pProto->SubClass;
|
||||
data << pProto->Unk0; // new 2.0.3, not exist in wdb cache?
|
||||
data << int32(pProto->Unk0); // new 2.0.3, not exist in wdb cache?
|
||||
data << Name;
|
||||
data << uint8(0x00); //pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name...
|
||||
data << uint8(0x00); //pProto->Name3; // blizz not send name there, just uint8(0x00);
|
||||
@@ -420,7 +420,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
|
||||
data << pProto->PageMaterial;
|
||||
data << pProto->StartQuest;
|
||||
data << pProto->LockID;
|
||||
data << pProto->Material;
|
||||
data << int32(pProto->Material);
|
||||
data << pProto->Sheath;
|
||||
data << pProto->RandomProperty;
|
||||
data << pProto->RandomSuffix;
|
||||
|
||||
@@ -491,7 +491,7 @@ struct ItemPrototype
|
||||
uint32 ItemId;
|
||||
uint32 Class; // id from ItemClass.dbc
|
||||
uint32 SubClass; // id from ItemSubClass.dbc
|
||||
uint32 Unk0;
|
||||
int32 Unk0;
|
||||
char* Name1;
|
||||
uint32 DisplayInfoID; // id from ItemDisplayInfo.dbc
|
||||
uint32 Quality;
|
||||
@@ -537,7 +537,7 @@ struct ItemPrototype
|
||||
uint32 PageMaterial;
|
||||
uint32 StartQuest; // id from QuestCache.wdb
|
||||
uint32 LockID;
|
||||
uint32 Material; // id from Material.dbc
|
||||
int32 Material; // id from Material.dbc
|
||||
uint32 Sheath;
|
||||
uint32 RandomProperty; // id from ItemRandomProperties.dbc
|
||||
uint32 RandomSuffix; // id from ItemRandomSuffix.dbc
|
||||
|
||||
@@ -977,7 +977,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
|
||||
dest.resize(size);
|
||||
|
||||
uLongf destSize = size;
|
||||
if(compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
|
||||
if(size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
|
||||
{
|
||||
sLog.outDebug("RAD: Failed to compress account data");
|
||||
return;
|
||||
|
||||
+12
-4
@@ -1693,21 +1693,29 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
|
||||
if(dbcitem)
|
||||
{
|
||||
if(proto->Class != dbcitem->Class || proto->SubClass != dbcitem->SubClass)
|
||||
if(proto->Class != dbcitem->Class)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct ñlass %u, must be %u (still using DB value).",i,proto->Class,dbcitem->Class);
|
||||
// It safe let use Class from DB
|
||||
}
|
||||
/* disabled: have some strange wrong cases for Subclass values.
|
||||
for enable also uncomment Subclass field in ItemEntry structure and in Itemfmt[]
|
||||
if(proto->SubClass != dbcitem->SubClass)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct (Class: %u, Sub: %u) pair, must be (Class: %u, Sub: %u) (still using DB value).",i,proto->Class,proto->SubClass,dbcitem->Class,dbcitem->SubClass);
|
||||
// It safe let use Class/Subclass from DB
|
||||
// It safe let use Subclass from DB
|
||||
}
|
||||
*/
|
||||
|
||||
if(proto->Unk0 != dbcitem->Unk0)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %u Unk0, must be %u (still using DB value).",i,proto->Unk0,dbcitem->Unk0);
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %i Unk0, must be %i (still using DB value).",i,proto->Unk0,dbcitem->Unk0);
|
||||
// It safe let use Unk0 from DB
|
||||
}
|
||||
|
||||
if(proto->Material != dbcitem->Material)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %u material, must be %u (still using DB value).",i,proto->Material,dbcitem->Material);
|
||||
sLog.outErrorDb("Item (Entry: %u) not correct %i material, must be %i (still using DB value).",i,proto->Material,dbcitem->Material);
|
||||
// It safe let use Material from DB
|
||||
}
|
||||
|
||||
|
||||
+123
-30
@@ -352,7 +352,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this)
|
||||
m_regenTimer = 0;
|
||||
m_weaponChangeTimer = 0;
|
||||
m_breathTimer = 0;
|
||||
m_isunderwater = 0;
|
||||
m_isunderwater = UNDERWATER_NONE;
|
||||
m_isInWater = false;
|
||||
m_drunkTimer = 0;
|
||||
m_drunk = 0;
|
||||
@@ -930,14 +930,15 @@ void Player::EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 da
|
||||
|
||||
void Player::HandleDrowning()
|
||||
{
|
||||
if(!m_isunderwater)
|
||||
if(!(m_isunderwater&~UNDERWATER_INLAVA))
|
||||
return;
|
||||
|
||||
//if player is GM, have waterbreath, is dead or if breathing is disabled then return
|
||||
if(waterbreath || isGameMaster() || !isAlive() || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING))
|
||||
if(isGameMaster() || !isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING))
|
||||
{
|
||||
StopMirrorTimer(BREATH_TIMER);
|
||||
m_isunderwater = 0;
|
||||
// drop every flag _except_ LAVA - otherwise waterbreathing will prevent lava damage
|
||||
m_isunderwater &= UNDERWATER_INLAVA;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -947,22 +948,22 @@ void Player::HandleDrowning()
|
||||
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
|
||||
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
|
||||
|
||||
if ((m_isunderwater & 0x01) && !(m_isunderwater & 0x80) && isAlive())
|
||||
if ((m_isunderwater & UNDERWATER_INWATER) && !(m_isunderwater & UNDERWATER_INLAVA) && isAlive())
|
||||
{
|
||||
//single trigger timer
|
||||
if (!(m_isunderwater & 0x02))
|
||||
if (!(m_isunderwater & UNDERWATER_WATER_TRIGGER))
|
||||
{
|
||||
m_isunderwater|= 0x02;
|
||||
m_isunderwater|= UNDERWATER_WATER_TRIGGER;
|
||||
m_breathTimer = UnderWaterTime + 1000;
|
||||
}
|
||||
//single trigger "Breathbar"
|
||||
if ( m_breathTimer <= UnderWaterTime && !(m_isunderwater & 0x04))
|
||||
//single trigger "show Breathbar"
|
||||
if ( m_breathTimer <= UnderWaterTime && !(m_isunderwater & UNDERWATER_WATER_BREATHB))
|
||||
{
|
||||
m_isunderwater|= 0x04;
|
||||
m_isunderwater|= UNDERWATER_WATER_BREATHB;
|
||||
StartMirrorTimer(BREATH_TIMER, UnderWaterTime);
|
||||
}
|
||||
//continuous trigger drowning "Damage"
|
||||
if ((m_breathTimer == 0) && (m_isunderwater & 0x01))
|
||||
if ((m_breathTimer == 0) && (m_isunderwater & UNDERWATER_INWATER))
|
||||
{
|
||||
//TODO: Check this formula
|
||||
uint64 guid = GetGUID();
|
||||
@@ -973,33 +974,34 @@ void Player::HandleDrowning()
|
||||
}
|
||||
}
|
||||
//single trigger retract bar
|
||||
else if (!(m_isunderwater & 0x01) && !(m_isunderwater & 0x08) && (m_isunderwater & 0x02) && (m_breathTimer > 0) && isAlive())
|
||||
else if (!(m_isunderwater & UNDERWATER_INWATER) && (m_isunderwater & UNDERWATER_WATER_TRIGGER) && (m_breathTimer > 0) && isAlive())
|
||||
{
|
||||
m_isunderwater = 0x08;
|
||||
|
||||
uint32 BreathRegen = 10;
|
||||
// m_breathTimer will be reduced in ModifyMirrorTimer
|
||||
ModifyMirrorTimer(BREATH_TIMER, UnderWaterTime, m_breathTimer,BreathRegen);
|
||||
m_isunderwater = 0x10;
|
||||
m_isunderwater = UNDERWATER_WATER_BREATHB_RETRACTING;
|
||||
}
|
||||
//remove bar
|
||||
else if ((m_breathTimer < 50) && !(m_isunderwater & 0x01) && (m_isunderwater == 0x10))
|
||||
else if ((m_breathTimer < 50) && !(m_isunderwater & UNDERWATER_INWATER) && (m_isunderwater == UNDERWATER_WATER_BREATHB_RETRACTING))
|
||||
{
|
||||
StopMirrorTimer(BREATH_TIMER);
|
||||
m_isunderwater = 0;
|
||||
m_isunderwater = UNDERWATER_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void Player::HandleLava()
|
||||
{
|
||||
if ((m_isunderwater & 0x80) && isAlive())
|
||||
if ((m_isunderwater & UNDERWATER_INLAVA) && isAlive())
|
||||
{
|
||||
/*
|
||||
* arrai: how is this supposed to work? UNDERWATER_INLAVA is always set in this scope!
|
||||
// Single trigger Set BreathTimer
|
||||
if (!(m_isunderwater & 0x80))
|
||||
if (!(m_isunderwater & UNDERWATER_INLAVA))
|
||||
{
|
||||
m_isunderwater|= 0x04;
|
||||
m_isunderwater|= UNDERWATER_WATER_BREATHB;
|
||||
m_breathTimer = 1000;
|
||||
}
|
||||
|
||||
*/
|
||||
// Reset BreathTimer and still in the lava
|
||||
if (!m_breathTimer)
|
||||
{
|
||||
@@ -1013,10 +1015,10 @@ void Player::HandleLava()
|
||||
m_breathTimer = 1000;
|
||||
}
|
||||
}
|
||||
else if (m_deathState == DEAD) // Disable breath timer and reset underwater flags
|
||||
else if (!isAlive()) // Disable breath timer and reset underwater flags
|
||||
{
|
||||
m_breathTimer = 0;
|
||||
m_isunderwater = 0;
|
||||
m_isunderwater = UNDERWATER_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7125,6 +7127,92 @@ void Player::CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attTy
|
||||
}
|
||||
}
|
||||
|
||||
void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 cast_count, uint32 glyphIndex)
|
||||
{
|
||||
ItemPrototype const* proto = item->GetProto();
|
||||
// special learning case
|
||||
if(proto->Spells[0].SpellId==SPELL_ID_GENERIC_LEARN || proto->Spells[0].SpellId==SPELL_ID_GENERIC_LEARN_PET)
|
||||
{
|
||||
uint32 learn_spell_id = proto->Spells[0].SpellId;
|
||||
uint32 learning_spell_id = proto->Spells[1].SpellId;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(learn_spell_id);
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ",proto->ItemId, learn_spell_id);
|
||||
SendEquipError(EQUIP_ERR_NONE,item,NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, false);
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; //set count of casts
|
||||
spell->m_currentBasePoints[0] = learning_spell_id;
|
||||
spell->prepare(&targets);
|
||||
return;
|
||||
}
|
||||
|
||||
// use triggered flag only for items with many spell casts and for not first cast
|
||||
int count = 0;
|
||||
|
||||
// item spells casted at use
|
||||
for(int i = 0; i < 5; ++i)
|
||||
{
|
||||
_Spell const& spellData = proto->Spells[i];
|
||||
|
||||
// no spell
|
||||
if(!spellData.SpellId)
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if( spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE && spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring",proto->ItemId, spellData.SpellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, (count > 0));
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; // set count of casts
|
||||
spell->m_glyphIndex = glyphIndex; // glyph index
|
||||
spell->prepare(&targets);
|
||||
|
||||
++count;
|
||||
}
|
||||
|
||||
// Item enchantments spells casted at use
|
||||
for(int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
|
||||
{
|
||||
uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot));
|
||||
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
|
||||
if(!pEnchant) continue;
|
||||
for (int s=0;s<3;s++)
|
||||
{
|
||||
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_USE_SPELL)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pEnchant->spellid[s]);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog.outError("Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, (count > 0));
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; // set count of casts
|
||||
spell->m_glyphIndex = glyphIndex; // glyph index
|
||||
spell->prepare(&targets);
|
||||
|
||||
++count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::_RemoveAllItemMods()
|
||||
{
|
||||
sLog.outDebug("_RemoveAllItemMods start.");
|
||||
@@ -12206,6 +12294,9 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ITEM_ENCHANTMENT_TYPE_USE_SPELL:
|
||||
// processed in Player::CastItemUseSpell
|
||||
break;
|
||||
default:
|
||||
sLog.outError("Unknown item enchantment display type: %d",enchant_display_type);
|
||||
break;
|
||||
@@ -19407,18 +19498,20 @@ PartyResult Player::CanUninviteFromGroup() const
|
||||
void Player::UpdateUnderwaterState( Map* m, float x, float y, float z )
|
||||
{
|
||||
float water_z = m->GetWaterLevel(x,y);
|
||||
float height_z = m->GetHeight(x,y,z, false); // use .map base surface height
|
||||
float terrain_z = m->GetHeight(x,y,z, false); // use .map base surface height
|
||||
uint8 flag1 = m->GetTerrainType(x,y);
|
||||
|
||||
//!Underwater check, not in water if underground or above water level
|
||||
if (height_z <= INVALID_HEIGHT || z < (height_z-2) || z > (water_z - 2) )
|
||||
m_isunderwater &= 0x7A;
|
||||
//!Underwater check, not in water if underground or above water level - take UC royal quater for example
|
||||
if (terrain_z <= INVALID_HEIGHT || z < (terrain_z-2) || z > (water_z - 2) )
|
||||
m_isunderwater &= ~UNDERWATER_INWATER;
|
||||
else if ((z < (water_z - 2)) && (flag1 & 0x01))
|
||||
m_isunderwater |= 0x01;
|
||||
m_isunderwater |= UNDERWATER_INWATER;
|
||||
|
||||
//!in lava check, anywhere under lava level
|
||||
if ((height_z <= INVALID_HEIGHT || z < (height_z - 0)) && (flag1 == 0x00) && IsInWater())
|
||||
m_isunderwater |= 0x80;
|
||||
if ((terrain_z <= INVALID_HEIGHT || z < (terrain_z - 0)) && (flag1 == 0x00) && IsInWater())
|
||||
m_isunderwater |= UNDERWATER_INLAVA;
|
||||
else
|
||||
m_isunderwater &= ~UNDERWATER_INLAVA;
|
||||
}
|
||||
|
||||
void Player::SetCanParry( bool value )
|
||||
|
||||
@@ -48,6 +48,7 @@ class Pet;
|
||||
class PlayerMenu;
|
||||
class Transport;
|
||||
class UpdateMask;
|
||||
class SpellCastTargets;
|
||||
class PlayerSocial;
|
||||
class OutdoorPvP;
|
||||
class AchievementMgr;
|
||||
@@ -65,6 +66,17 @@ enum SpellModType
|
||||
SPELLMOD_PCT = 108 // SPELL_AURA_ADD_PCT_MODIFIER
|
||||
};
|
||||
|
||||
// 2^n values, Player::m_isunderwater is a bitmask. These are mangos internal values, they are never send to any client
|
||||
enum PlayerUnderwaterState
|
||||
{
|
||||
UNDERWATER_NONE = 0x00,
|
||||
UNDERWATER_INWATER = 0x01, // terrain type is water and player is afflicted by it
|
||||
UNDERWATER_WATER_TRIGGER = 0x02, // m_breathTimer has been initialized
|
||||
UNDERWATER_WATER_BREATHB = 0x04, // breathbar has been send to client
|
||||
UNDERWATER_WATER_BREATHB_RETRACTING = 0x10, // breathbar is currently refilling - the player is above water level
|
||||
UNDERWATER_INLAVA = 0x80 // terrain type is lava and player is afflicted by it
|
||||
};
|
||||
|
||||
enum PlayerSpellState
|
||||
{
|
||||
PLAYERSPELL_UNCHANGED = 0,
|
||||
@@ -1857,6 +1869,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
void ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply, bool form_change = false);
|
||||
void UpdateEquipSpellsAtFormChange();
|
||||
void CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attType);
|
||||
void CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 cast_count, uint32 glyphIndex);
|
||||
|
||||
void SendInitWorldStates(bool force = false, uint32 forceZoneId = 0);
|
||||
void SendUpdateWorldState(uint32 Field, uint32 Value);
|
||||
|
||||
+1
-1
@@ -1972,7 +1972,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
||||
void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura)
|
||||
{
|
||||
if(m_CastItem)
|
||||
m_castItemGUID = m_CastItem->GetGUID();
|
||||
|
||||
+1
-1
@@ -351,7 +351,7 @@ class Spell
|
||||
Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 originalCasterGUID = 0, Spell** triggeringContainer = NULL );
|
||||
~Spell();
|
||||
|
||||
void prepare(SpellCastTargets * targets, Aura* triggeredByAura = NULL);
|
||||
void prepare(SpellCastTargets const* targets, Aura* triggeredByAura = NULL);
|
||||
void cancel();
|
||||
void update(uint32 difftime);
|
||||
void cast(bool skipCheck = false);
|
||||
|
||||
+1
-13
@@ -2434,12 +2434,8 @@ void Aura::HandleAuraHover(bool apply, bool Real)
|
||||
|
||||
void Aura::HandleWaterBreathing(bool apply, bool Real)
|
||||
{
|
||||
if(apply)
|
||||
m_target->waterbreath = true;
|
||||
else if(m_target->GetAurasByType(SPELL_AURA_WATER_BREATHING).empty())
|
||||
if(!apply && !m_target->HasAuraType(SPELL_AURA_WATER_BREATHING))
|
||||
{
|
||||
m_target->waterbreath = false;
|
||||
|
||||
// update for enable timer in case not moving target
|
||||
if(m_target->GetTypeId()==TYPEID_PLAYER && m_target->IsInWorld())
|
||||
{
|
||||
@@ -3339,10 +3335,6 @@ void Aura::HandleModStealth(bool apply, bool Real)
|
||||
//m_target->SetVisibility(VISIBILITY_OFF);
|
||||
m_target->SetVisibility(VISIBILITY_GROUP_STEALTH);
|
||||
}
|
||||
|
||||
// for RACE_NIGHTELF stealth
|
||||
if(m_target->GetTypeId()==TYPEID_PLAYER && GetId()==20580)
|
||||
m_target->CastSpell(m_target, 21009, true, NULL, this);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3350,10 +3342,6 @@ void Aura::HandleModStealth(bool apply, bool Real)
|
||||
// only at real aura remove
|
||||
if(Real)
|
||||
{
|
||||
// for RACE_NIGHTELF stealth
|
||||
if(m_target->GetTypeId()==TYPEID_PLAYER && GetId()==20580)
|
||||
m_target->RemoveAurasDueToSpell(21009);
|
||||
|
||||
// if last SPELL_AURA_MOD_STEALTH and no GM invisibility
|
||||
if(!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH) && m_target->GetVisibility()!=VISIBILITY_OFF)
|
||||
{
|
||||
|
||||
+12
-10
@@ -827,12 +827,6 @@ void Spell::EffectDummy(uint32 i)
|
||||
m_caster->CastCustomSpell(unitTarget, 12721, &deepWoundsDotBasePoints0, NULL, NULL, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 12975: //Last Stand
|
||||
{
|
||||
int32 healthModSpellBasePoints0 = int32(m_caster->GetMaxHealth()*0.3);
|
||||
m_caster->CastCustomSpell(m_caster, 12976, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 13120: // net-o-matic
|
||||
{
|
||||
if(!unitTarget)
|
||||
@@ -1365,14 +1359,24 @@ void Spell::EffectDummy(uint32 i)
|
||||
m_caster->SetPower(POWER_RAGE,0);
|
||||
return;
|
||||
}
|
||||
if(m_spellInfo->Id==21977) //Warrior's Wrath
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
// Warrior's Wrath
|
||||
case 21977:
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
m_caster->CastSpell(unitTarget,21887,true); // spell mod
|
||||
return;
|
||||
}
|
||||
// Last Stand
|
||||
case 12975:
|
||||
{
|
||||
int32 healthModSpellBasePoints0 = int32(m_caster->GetMaxHealth()*0.3);
|
||||
m_caster->CastCustomSpell(m_caster, 12976, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
// Life Tap
|
||||
@@ -5178,8 +5182,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
SpellEntry const *judge = sSpellStore.LookupEntry(spellId2);
|
||||
if (!judge)
|
||||
continue;
|
||||
// found, remove seal
|
||||
m_caster->RemoveAurasDueToSpell(spellInfo->Id);
|
||||
break;
|
||||
}
|
||||
if (spellId1)
|
||||
|
||||
@@ -128,59 +128,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
if(!Script->ItemUse(pUser,pItem,targets))
|
||||
{
|
||||
// no script or script not process request by self
|
||||
|
||||
// special learning case
|
||||
if((pItem->GetProto()->Spells[0].SpellId==SPELL_ID_GENERIC_LEARN) || (pItem->GetProto()->Spells[0].SpellId==SPELL_ID_GENERIC_LEARN_PET))
|
||||
{
|
||||
uint32 learn_spell_id = pItem->GetProto()->Spells[0].SpellId;
|
||||
uint32 learning_spell_id = pItem->GetProto()->Spells[1].SpellId;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(learn_spell_id);
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("Item (Entry: %u) in have wrong spell id %u, ignoring ",proto->ItemId, learn_spell_id);
|
||||
pUser->SendEquipError(EQUIP_ERR_NONE,pItem,NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(pUser, spellInfo, false);
|
||||
spell->m_CastItem = pItem;
|
||||
spell->m_cast_count = cast_count; //set count of casts
|
||||
spell->m_currentBasePoints[0] = learning_spell_id;
|
||||
spell->prepare(&targets);
|
||||
return;
|
||||
}
|
||||
|
||||
// use triggered flag only for items with many spell casts and for not first cast
|
||||
int count = 0;
|
||||
|
||||
for(int i = 0; i < 5; ++i)
|
||||
{
|
||||
_Spell const& spellData = pItem->GetProto()->Spells[i];
|
||||
|
||||
// no spell
|
||||
if(!spellData.SpellId)
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if( spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE && spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("Item (Entry: %u) in have wrong spell id %u, ignoring ",proto->ItemId, spellData.SpellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(pUser, spellInfo, (count > 0));
|
||||
spell->m_CastItem = pItem;
|
||||
spell->m_cast_count = cast_count; // set count of casts
|
||||
spell->m_glyphIndex = glyphIndex; // glyph index
|
||||
spell->prepare(&targets);
|
||||
|
||||
++count;
|
||||
}
|
||||
pUser->CastItemUseSpell(pItem,targets,cast_count,glyphIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-15
@@ -108,7 +108,6 @@ Unit::Unit()
|
||||
//m_AurasCheck = 2000;
|
||||
//m_removeAuraTimer = 4;
|
||||
//tmpAura = NULL;
|
||||
waterbreath = false;
|
||||
|
||||
m_Visibility = VISIBILITY_ON;
|
||||
|
||||
@@ -1588,18 +1587,6 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
||||
CastSpell(pVictim, 1604, true);
|
||||
}
|
||||
|
||||
// update at damage Judgement aura duration that applied by attacker at victim
|
||||
if(damageInfo->damage)
|
||||
{
|
||||
AuraMap& vAuras = pVictim->GetAuras();
|
||||
for(AuraMap::iterator itr = vAuras.begin(); itr != vAuras.end(); ++itr)
|
||||
{
|
||||
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
|
||||
if( spellInfo->AttributesEx3 & 0x40000 && spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && ((*itr).second->GetCasterGUID() == GetGUID()))
|
||||
(*itr).second->RefreshAura();
|
||||
}
|
||||
}
|
||||
|
||||
// If not miss
|
||||
if (!(damageInfo->HitInfo & HITINFO_MISS))
|
||||
{
|
||||
@@ -5397,7 +5384,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
||||
basepoints0 = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000;
|
||||
break;
|
||||
}
|
||||
|
||||
// Sacred Shield
|
||||
if (dummySpell->SpellFamilyFlags&0x0008000000000000LL)
|
||||
{
|
||||
triggered_spell_id = 58597;
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
switch(dummySpell->Id)
|
||||
{
|
||||
// Judgement of Light
|
||||
@@ -7856,7 +7849,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
||||
}
|
||||
// Glyph of Shadowburn
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||
spellProto->SpellFamilyFlags & 0x0000000000000080 &&
|
||||
spellProto->SpellFamilyFlags & 0x0000000000000080LL &&
|
||||
pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
||||
{
|
||||
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
@@ -7864,6 +7857,14 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
||||
if((*i)->GetModifier()->m_miscvalue == 7917)
|
||||
crit_chance+=(*i)->GetModifier()->m_amount;
|
||||
}
|
||||
// Sacred Shield
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN &&
|
||||
spellProto->SpellFamilyFlags & 0x0000000040000000LL)
|
||||
{
|
||||
Aura *aura = pVictim->GetDummyAura(58597);
|
||||
if (aura && aura->GetCasterGUID() == GetGUID())
|
||||
crit_chance+=aura->GetModifier()->m_amount;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1262,7 +1262,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
// function for low level grid visibility checks in player/creature cases
|
||||
virtual bool IsVisibleInGridForPlayer(Player const* pl) const = 0;
|
||||
|
||||
bool waterbreath;
|
||||
AuraList & GetSingleCastAuras() { return m_scAuras; }
|
||||
AuraList const& GetSingleCastAuras() const { return m_scAuras; }
|
||||
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
|
||||
|
||||
@@ -257,7 +257,9 @@ enum ItemEnchantmentType
|
||||
ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL = 3,
|
||||
ITEM_ENCHANTMENT_TYPE_RESISTANCE = 4,
|
||||
ITEM_ENCHANTMENT_TYPE_STAT = 5,
|
||||
ITEM_ENCHANTMENT_TYPE_TOTEM = 6
|
||||
ITEM_ENCHANTMENT_TYPE_TOTEM = 6,
|
||||
ITEM_ENCHANTMENT_TYPE_USE_SPELL = 7,
|
||||
ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET = 8
|
||||
};
|
||||
|
||||
enum TotemCategoryType
|
||||
|
||||
@@ -814,14 +814,14 @@ struct GtRegenMPPerSptEntry
|
||||
|
||||
struct ItemEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint32 Class;
|
||||
uint32 SubClass;
|
||||
uint32 Unk0;
|
||||
uint32 Material;
|
||||
uint32 DisplayId;
|
||||
uint32 InventoryType;
|
||||
uint32 Sheath;
|
||||
uint32 ID; // 0
|
||||
uint32 Class; // 1
|
||||
//uint32 SubClass; // 2 some items have strnage subclasses
|
||||
int32 Unk0; // 3
|
||||
int32 Material; // 4
|
||||
uint32 DisplayId; // 5
|
||||
uint32 InventoryType; // 6
|
||||
uint32 Sheath; // 7
|
||||
};
|
||||
|
||||
struct ItemDisplayInfoEntry
|
||||
|
||||
@@ -53,7 +53,7 @@ const char GtOCTRegenHPfmt[]="f";
|
||||
//const char GtOCTRegenMPfmt[]="f";
|
||||
const char GtRegenHPPerSptfmt[]="f";
|
||||
const char GtRegenMPPerSptfmt[]="f";
|
||||
const char Itemfmt[]="niiiiiii";
|
||||
const char Itemfmt[]="nixiiiii";
|
||||
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
||||
//const char ItemCondExtCostsEntryfmt[]="xiii";
|
||||
const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7083"
|
||||
#define REVISION_NR "7090"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
||||
Reference in New Issue
Block a user