Advertisement
Guest User

Untitled

a guest
Sep 16th, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.91 KB | None | 0 0
  1. Index: arcemu-world/Unit.cpp
  2. ===================================================================
  3. --- arcemu-world/Unit.cpp   (revision 4568)
  4. +++ arcemu-world/Unit.cpp   (working copy)
  5. @@ -2694,6 +2694,8 @@
  6.         return;
  7.  
  8.     if( !IsPlayer() && IsVehicle() ){
  9. +       if(m_interruptRegen)
  10. +           return;
  11.         uint32 powertype = GetPowerType();
  12.         float wrate = sWorld.getRate( RATE_VEHICLES_POWER_REGEN );
  13.         float amount = wrate * 20.0f;
  14. @@ -6318,6 +6320,8 @@
  15.  {
  16.     if(!IsPlayer() || TO_PLAYER(this)->m_changingMaps)
  17.     {
  18. +       if(IsCreature())
  19. +           SetByteFlag( UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2 );
  20.         WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 13);
  21.         data << GetNewGUID();
  22.         data << uint32(2);
  23. @@ -6339,6 +6343,8 @@
  24.  {
  25.     if(!IsPlayer() || TO_PLAYER(this)->m_changingMaps)
  26.     {
  27. +       if(IsCreature())
  28. +           RemoveByteFlag( UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2 );
  29.         WorldPacket data(SMSG_MOVE_UNSET_CAN_FLY, 13);
  30.         data << GetNewGUID();
  31.         data << uint32(5);
  32. Index: arcemu-world/Vehicle.cpp
  33. ===================================================================
  34. --- arcemu-world/Vehicle.cpp    (revision 4568)
  35. +++ arcemu-world/Vehicle.cpp    (working copy)
  36. @@ -78,7 +78,8 @@
  37.     case POWER_TYPE_PYRITE:
  38.         owner->SetPowerType( POWER_TYPE_ENERGY );
  39.         owner->SetMaxPower( POWER_TYPE_ENERGY, 50 );
  40. -       owner->SetPower( POWER_TYPE_ENERGY, 50 );
  41. +       owner->SetPower( POWER_TYPE_ENERGY, 0 );
  42. +       owner->m_interruptRegen++; // Ulduar vehicles do not regen pyrite they gain it from pyrite containers.
  43.         break;
  44.     }
  45.  
  46. @@ -179,13 +180,6 @@
  47.        
  48.         if( c->GetScript() != NULL ){
  49.             c->GetScript()->OnEnterVehicle();
  50. -       }
  51. -   }
  52. -
  53. -   if( owner->IsCreature() ){
  54. -       Creature *c = static_cast< Creature* >( owner );
  55. -
  56. -       if( c->GetScript() != NULL ){
  57.             if( passengercount == 1 )
  58.                 c->GetScript()->OnFirstPassengerEntered( passenger );
  59.  
  60. @@ -253,7 +247,8 @@
  61.         static_cast< Player* >( passenger )->SetFarsightTarget( 0 );
  62.  
  63.     // if we are on a flying vehicle, add a parachute!
  64. -   if( owner->HasAuraWithName( SPELL_AURA_ENABLE_FLIGHT ) || owner->HasAuraWithName( SPELL_AURA_ENABLE_FLIGHT2 ) )
  65. +   if( owner->HasAuraWithName( SPELL_AURA_ENABLE_FLIGHT ) || owner->HasAuraWithName( SPELL_AURA_ENABLE_FLIGHT2 ) ||
  66. +       owner->HasAuraWithName(SPELL_AURA_ENABLE_FLIGHT_WITH_UNMOUNTED_SPEED))
  67.         passenger->CastSpell( passenger, 45472, false );
  68.  
  69.     // re-add spellclick flag if needed
  70. Index: scripts/src/SpellHandlers/PetAISpells.cpp
  71. ===================================================================
  72. --- scripts/src/SpellHandlers/PetAISpells.cpp   (revision 4568)
  73. +++ scripts/src/SpellHandlers/PetAISpells.cpp   (working copy)
  74. @@ -278,10 +278,6 @@
  75.     FrostBroodVanquisherAI( Creature *c ) : CreatureAIScript( c ){
  76.     }
  77.  
  78. -   void OnLoad(){
  79. -       _unit->SetByte( UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNK_2 );
  80. -   }
  81. -
  82.     void OnLastPassengerLeft( Unit *passenger ){
  83.         if( _unit->GetSummonedByGUID() == passenger->GetGUID() )
  84.             _unit->Despawn( 1 * 1000, 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement