[DiscordArchive] So, going from a 2009 repack to my first freshly compiled 335 TC server a few weeks back I notice ta
[DiscordArchive] So, going from a 2009 repack to my first freshly compiled 335 TC server a few weeks back I notice ta
Archived author: Drikish • Posted: 2023-02-12T22:44:32.403000+00:00
Original source
Yeah the way you worded it made it sound like you were asking about DK's not working
Archived author: Goatrek • Posted: 2023-02-12T22:45:00.954000+00:00
Original source
fair enough
Archived author: Drikish • Posted: 2023-02-12T22:45:41.673000+00:00
Original source
```c++
uint32 Player::CalculateTalentsPoints() const
{
uint32 base_talent = GetLevel() < 10 ? 0 : GetLevel()-9;
if (GetClass() != CLASS_DEATH_KNIGHT || GetMapId() != 609)
return uint32(base_talent * sWorld->getRate(RATE_TALENT));
uint32 talentPointsForLevel = GetLevel() < 56 ? 0 : GetLevel() - 55;
talentPointsForLevel += m_questRewardTalentCount;
if (talentPointsForLevel > base_talent)
talentPointsForLevel = base_talent;
return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));
}
```
Archived author: Drikish • Posted: 2023-02-12T22:49:46.234000+00:00
Original source
<@200677690838220800> - Every single script in the core uses events to trigger abilities mainly, except for PlayerAI which uses 'VerifyAndPushSpellCast' to a Vector of 'potential spells'. Is this possible to replicate in CreatureAI?
I want spells pushed to a que so that they can be used like a player could when the CD is ready BUT abide by the GCD.
If an event triggers alongside another event for a spell then usually only one is triggered until the next cycle, meaning that spell that is unused just sits there basically ready but not used...
For the sake of context, i'm trying to learn by making an NPC mob that behaves like a player...
Archived author: Drikish • Posted: 2023-02-12T22:55:25.398000+00:00
Original source
I don't know enough about C++ but my plan was to have an array of spells available to cast, then cast one, change a variable 'canCast' to false, trigger an event 1.5s later or w/e that sets a variable back to say its ready to cast again and get next from array maybe?
In my head this makes sense to force it to wait 1.5s (GCD) between each spell and allow them to que up...
Archived author: Drikish • Posted: 2023-02-12T22:56:27.155000+00:00
Original source
Or is there a simpler way to do this
Archived author: Drikish • Posted: 2023-02-12T22:59:00.481000+00:00
Original source
The purpose of this btw is to prevent players from simply kiting a melee mob to avoid attacks
Archived author: Tea • Posted: 2023-02-12T23:03:34.612000+00:00
Original source
you would basically have to copy that code into a creatureai based script
Archived author: Tea • Posted: 2023-02-12T23:03:43.762000+00:00
Original source
not something supported out the box