Jump to content

tester20

Members
  • Posts

    34
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by tester20

  1. yo can fix that conflict with Git Extension program or Visual Studio
  2. is that true or false? Eye of Acherus would need Vehicle support to work...
  3. yes i found some more problems that any one can fix ----canon of Wintergrasp Siege not work ----Salvaged Siege doesnt have canon ----and of cource gameobject doesnt have damage system
  4. -------------------------------------------------------------unit.h------------------------------------------------------------- @@Line 1019@@ bool IsHostileToPlayers() const; bool IsFriendlyTo(Unit const* unit) const; + bool IsInRaidWith(Unit const* unit) const; + bool IsInPartyWith(Unit const* unit) const; make this
  5. its hand made fix ....i cant make .patch file, make this changes in Microsoft Visual Studio
  6. fix for spell's -------------------------------------------------------------unit.cpp------------------------------------------------------------- @@Line 8403@@ // common faction based case (CvC,PvC,CvP) return tester_faction->IsHostileTo(*target_faction); } +bool Unit::IsInPartyWith(Unit const *unit) const +{ + if(this == unit) + return true; + + const Unit *u1 = GetCharmerOrOwnerOrSelf(); + const Unit *u2 = unit->GetCharmerOrOwnerOrSelf(); + if(u1 == u2) + return true; + + if(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_PLAYER) + return ((Player*)u1)->IsInSameGroupWith((Player*)u2); + else + return false; +} +bool Unit::IsInRaidWith(Unit const *unit) const +{ + if(this == unit) + return true; + + const Unit *u1 = GetCharmerOrOwnerOrSelf(); + const Unit *u2 = unit->GetCharmerOrOwnerOrSelf(); + if(u1 == u2) + return true; + + if(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_PLAYER) + return ((Player*)u1)->IsInSameRaidWith((Player*)u2); + else + return false; } -------------------------------------------------------------unit.h------------------------------------------------------------- @@Line 1019@@ bool IsHostileToPlayers() const; bool IsFriendlyTo(Unit const* unit) const; + bool IsInRaidWith(Unit const* unit) const; + bool IsInPartyWith(Unit const* unit) const; @@Line 1243@@ Unit* GetCharmerOrOwner() const { return GetCharmerGUID() ? GetCharmer() : GetOwner(); } Unit* GetCharmOrPet() const { return GetCharmGUID() ? GetCharm() : (Unit*)GetPet(); } - Unit* GetCharmerOrOwnerOrSelf() - { - if(Unit* u = GetCharmerOrOwner()) - return u; - - return this; - } +Unit* GetCharmerOrOwnerOrSelf() const + { + if(Unit* u = GetCharmerOrOwner()) + return u; + + return (Unit*)this; + } -------------------------------------------------------------spell.cpp------------------------------------------------------------- @@line 5109@@SpellCastResult Spell::CheckPetCast(Unit* target) if(_target) //for target dead/target not valid { if(!_target->isAlive()) return SPELL_FAILED_BAD_TARGETS; + if(!IsValidSingleTargetSpell(_target)) + return SPELL_FAILED_BAD_TARGETS; - if(IsPositiveSpell(m_spellInfo->Id)) - { - if(m_caster->IsHostileTo(_target)) - return SPELL_FAILED_BAD_TARGETS; - } - else - { - bool duelvsplayertar = false; - for(int j = 0; j < 3; ++j) - { - //TARGET_DUELVSPLAYER is positive AND negative - duelvsplayertar |= (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DUELVSPLAYER); - } - if(m_caster->IsFriendlyTo(_target) && !duelvsplayertar)//some spells not work with this - { - return SPELL_FAILED_BAD_TARGETS; - } - } } //cooldown if(((Creature*)m_caster)->HasSpellCooldown(m_spellInfo->Id)) return SPELL_FAILED_NOT_READY; } sLog.outDebug("CheckPetCast_OK"); // NOTE : this is done twice, also in spell->prepare(&(spell->m_targets)); return CheckCast(true); } +bool Spell::IsValidSingleTargetEffect(Unit const* target, Targets type) const +{ + switch(type) + { + case TARGET_CHAIN_DAMAGE: + return !m_caster->IsFriendlyTo(target); + case TARGET_SINGLE_FRIEND: + case TARGET_AREAEFFECT_PARTY: + return m_caster->IsFriendlyTo(target); + case TARGET_SINGLE_PARTY: + return m_caster != target && m_caster->IsInPartyWith(target); + case TARGET_SINGLE_FRIEND_2: + return m_caster->IsInRaidWith(target); + } + return true; +} + +bool Spell::IsValidSingleTargetSpell(Unit const* target) const +{ + for(int i = 0; i < 3; ++i) + { + if(!IsValidSingleTargetEffect(target, Targets(m_spellInfo->EffectImplicitTargetA))) + return false; + // Need to check B? + //if(!IsValidSingleTargetEffect(m_spellInfo->EffectImplicitTargetB, target) + // return false; + } + return true; +} -------------------------------------------------------------spell.h------------------------------------------------------------- @@Line 347@@ SpellCastResult CheckCast(bool strict); SpellCastResult CheckPetCast(Unit* target); + bool IsValidSingleTargetEffect(Unit const* target, Targets type) const; + bool IsValidSingleTargetSpell(Unit const* target) const; Test it!
  7. some bags: ---POWER_ENERGY doesnt work with Salvaged Chopper spells ---after using spell with id 50896 if you come out(from vehicle) and come in then Client CRASHED:( ---this we have sometimes on switch seat WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE STORAGE_SIZE: 49 DB 62 05 BE 6D 50 F1 00 | 00 00 00 20 00 8E 56 EB 00 86 59 19 46 C4 54 82 | 44 76 FB A2 44 00 FC 2D 40 00 00 00 00 00 00 00 | 00 DB 62 05 BE 6D 50 F1 02 ERROR: Attempted to get in ByteBuffer (pos: 46 size: 49) value with size: 4 WorldSession::Update ByteBufferException occured while parsing a packet (opcode: 1179) from client 127.0.0.1, accountid=6. Skipped packet. Dumping error causing packet: STORAGE_SIZE: 49 DB 62 05 BE 6D 50 F1 00 | 00 00 00 20 00 8E 56 EB 00 86 59 19 46 C4 54 82 | 44 76 FB A2 44 00 FC 2D 40 00 00 00 00 00 00 00 | 00 DB 62 05 BE 6D 50 F1 02 after this you cant move(two times) ----cant use spells(ramm speels) 50652, 62308, 62345, 62522 +++addition on base from old patches: -- Salvaged Chopper REPLACE INTO npc_spellclick_spells VALUES (33062, 52196, 0, 0, 0, 0); REPLACE INTO creature_template_addon VALUES (33062, 0, 0, 0, 0, 0, 335, NULL, NULL); REPLACE INTO vehicle_data VALUES (335, 12, 62974, 62286, 62299, 64660, 0, 0, 0, 0, 0, 0, 0); REPLACE INTO vehicle_seat_data VALUES (3005, 1); -- Salvaged Demolisher REPLACE INTO npc_spellclick_spells VALUES (33109, 52196, 0, 0, 0, 0); REPLACE INTO creature_template_addon VALUES (33109, 0, 0, 0, 0, 0, 338, NULL, NULL); REPLACE INTO vehicle_data VALUES (338, 12, 62306, 62490, 62308, 62324, 0, 0, 0, 0, 0, 0, 0); REPLACE INTO vehicle_seat_data VALUES (3011, 1); -- Salvaged Siege Engine REPLACE INTO npc_spellclick_spells VALUES (33060, 52196, 0, 0, 0, 0); REPLACE INTO creature_template_addon VALUES (33060, 0, 0, 0, 0, 0, 336, NULL, NULL); REPLACE INTO vehicle_data VALUES (336, 12, 62345, 62522, 62346, 0, 0, 0, 0, 0, 0, 0, 0); REPLACE INTO vehicle_seat_data VALUES (3006, 1); ps sorry for my english
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use