Jump to content

Langerz82

Bug Tester
  • Posts

    64
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

Bug Comments posted by Langerz82

  1. Implementation. Note - The speeds have to be adjusted in Database to match the Pet attack speeds:

    http://www.wow-petopia.com/classic/attackspeed.php

    diff --git a/src/game/Object/Pet.cpp b/src/game/Object/Pet.cpp
    index 7ec1822..37ac5d9 100644
    --- a/src/game/Object/Pet.cpp
    +++ b/src/game/Object/Pet.cpp
    @@ -1092,9 +1092,30 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
     
         SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(petlevel * 50));
     
    -    SetAttackTime(BASE_ATTACK, cinfo->MeleeBaseAttackTime);
    -    SetAttackTime(OFF_ATTACK, cinfo->MeleeBaseAttackTime);
    -    SetAttackTime(RANGED_ATTACK, cinfo->RangedBaseAttackTime);
    +	CreatureInfo const* creatureInfo = ObjectMgr::GetCreatureTemplate(creature_ID);
    +	if (creatureInfo)
    +	{
    +		if (creatureInfo->MeleeBaseAttackTime > 0)
    +			SetAttackTime(BASE_ATTACK, creatureInfo->MeleeBaseAttackTime);
    +		else
    +			SetAttackTime(BASE_ATTACK, BASE_ATTACK_TIME);
    +
    +		if (creatureInfo->MeleeBaseAttackTime > 0)
    +			SetAttackTime(OFF_ATTACK, creatureInfo->MeleeBaseAttackTime);
    +		else
    +			SetAttackTime(OFF_ATTACK, BASE_ATTACK_TIME);
    +
    +		if (creatureInfo->RangedBaseAttackTime > 0)
    +			SetAttackTime(RANGED_ATTACK, creatureInfo->RangedBaseAttackTime);
    +		else
    +			SetAttackTime(RANGED_ATTACK, BASE_ATTACK_TIME);
    +	}
    +	else
    +	{
    +		SetAttackTime(BASE_ATTACK, BASE_ATTACK_TIME);
    +		SetAttackTime(OFF_ATTACK, BASE_ATTACK_TIME);
    +		SetAttackTime(RANGED_ATTACK, BASE_ATTACK_TIME);
    +	}
     
         SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0);
     
    

     

  2. Ok the problem with randomizing respawn times with Plants and Mineral is this. They are treated as a GameObject Chest. If we were to apply some randomizing algorithm to respawn times we would first have to need to create:

    GAMEOBJECT_TYPE_PLANT

    GAMEOBJECT_TYPE_MINERAL

    So we can apply a randomization algorithm for those affected GameObjects only.

    The other option would be to add another spawntimesecs2 field in the GameObject DB and to random between the two values given the second one is set. However by doing this it would add a redundant data field to all the gameobjects that dont require randomized times.

    The third option is to just randomize the GAMEOBJECT_TYPE_CHESTS, but that will break fixed times on all chests.

     

     

     

  3. This is probably to do with the pet movement doing a vmaps check and seeing that there is nothing there because its a dynamic moving object it falls through. We need a flag of some sort indicating to the pet that there on a dynamic object and to ignore vmaps and just use the players z-axis.

×
×
  • 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