Changeset 203 for trunk/src/game

Show
Ignore:
Timestamp:
11/19/08 13:45:59 (17 years ago)
Author:
yumileroy
Message:

[svn] Send AttackStart? package when update visibility.
Update DoMeleeAttackIfReady? to support dual wield.
Show player modelid2 instead id3 of triggers. This should fix the bug that gameobject::castspell summon a human model.
Remove the correct flag to make creature attackable. This should fix the bug that Illidan and Magtheridon are unattackable.
Add NullCreatureAI for trinityscript.
Fix channeler's soul transfer.
Some update of black temple scripts.

Original author: megamage
Date: 2008-11-09 14:54:13-06:00

Location:
trunk/src/game
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/GameObject.cpp

    r146 r203  
    12831283        trigger->CastSpell(target, spell, true); 
    12841284    } 
    1285 } 
     1285    //trigger->setDeathState(JUST_DIED); 
     1286    //trigger->RemoveCorpse(); 
     1287} 
  • trunk/src/game/Object.cpp

    r178 r203  
    602602                    { 
    603603                        if(target->isGameMaster()) 
    604                             *data << cinfo->Modelid1; 
     604                        { 
     605                            if(cinfo->Modelid2) 
     606                                *data << cinfo->Modelid1; 
     607                            else 
     608                                *data << 17519; // world invisible trigger's model 
     609                        } 
    605610                        else 
    606                             *data << cinfo->Modelid3; 
     611                        { 
     612                            if(cinfo->Modelid2) 
     613                                *data << cinfo->Modelid2; 
     614                            else 
     615                                *data << 11686; // world invisible trigger's model 
     616                        } 
    607617                    } 
    608618                    else 
  • trunk/src/game/Player.cpp

    r200 r203  
    1640716407            // send data at target visibility change (adding to client) 
    1640816408            if((*i)!=this && (*i)->isType(TYPEMASK_UNIT)) 
     16409            { 
    1640916410                SendAuraDurationsForTarget(*i); 
     16411                //if(((Unit*)(*i))->isAlive()) //should be always alive 
     16412                { 
     16413                    if((*i)->GetTypeId()==TYPEID_UNIT) 
     16414                        ((Creature*)(*i))->SendMonsterMoveWithSpeedToCurrentDestination(this); 
     16415                    if(((Unit*)(*i))->getVictim()) 
     16416                        ((Unit*)(*i))->SendAttackStart(((Unit*)(*i))->getVictim()); 
     16417                } 
     16418            } 
    1641016419 
    1641116420            i = stealthedUnits.erase(i); 
     
    1738717396            // send data at target visibility change (adding to client) 
    1738817397            if(target!=this && target->isType(TYPEMASK_UNIT)) 
     17398            { 
    1738917399                SendAuraDurationsForTarget((Unit*)target); 
    17390  
    17391             if(target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->isAlive()) 
    17392                 ((Creature*)target)->SendMonsterMoveWithSpeedToCurrentDestination(this); 
     17400                if(((Unit*)target)->isAlive()) 
     17401                { 
     17402                    if(target->GetTypeId()==TYPEID_UNIT) 
     17403                        ((Creature*)target)->SendMonsterMoveWithSpeedToCurrentDestination(this); 
     17404                    if(((Unit*)target)->getVictim()) 
     17405                        ((Unit*)target)->SendAttackStart(((Unit*)target)->getVictim()); 
     17406                } 
     17407            } 
    1739317408        } 
    1739417409    } 
  • trunk/src/game/Spell.cpp

    r197 r203  
    10131013            // for delayed spells ignore negative spells (after duel end) for friendly targets 
    10141014            // TODO: this cause soul transfer bugged 
    1015             if(m_spellInfo->speed > 0.0f && !IsPositiveSpell(m_spellInfo->Id)) 
     1015            if(m_spellInfo->speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !IsPositiveSpell(m_spellInfo->Id)) 
    10161016            { 
    10171017                m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE); 
  • trunk/src/game/Unit.h

    r186 r203  
    943943        void DeMorph(); 
    944944 
     945        void SendAttackStart(Unit* pVictim);  
    945946        void SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); 
    946947        void SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SpellSchoolMask damageSchoolMask,uint32 AbsorbedDamage, uint32 Resist,bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false); 
     
    13531354    private: 
    13541355        void SendAttackStop(Unit* victim);                  // only from AttackStop(Unit*) 
    1355         void SendAttackStart(Unit* pVictim);                // only from Unit::AttackStart(Unit*) 
     1356        //void SendAttackStart(Unit* pVictim);                // only from Unit::AttackStart(Unit*) 
    13561357 
    13571358        void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, AuraTypeSet const& procAuraTypes, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage, SpellSchoolMask damageSchoolMask );