Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 1715:
- {
- if ((caster->HasAura(12289) || caster->HasAura(12668))) //
- {
- QueryResult test = CharacterDatabase.PQuery("SELECT * FROM hamstring WHERE plrguid = '%u'", caster->GetGUIDLow());
- if (!test)
- CharacterDatabase.PExecute("INSERT INTO `hamstring` (`plrguid`) VALUES ('%u')", caster->GetGUIDLow());
- else
- CharacterDatabase.PExecute("UPDATE `hamstring` SET `stack` = (stack+1) WHERE plrguid = '%u'", caster->GetGUIDLow());
- }
- caster->ToPlayer()->AddSpellCooldown(23694, 0, uint32(time(NULL) + 0.1));
- sLog->outError(LOG_FILTER_SQL, "STACK +1 added ON caster ");
- case 23694:
- {
- QueryResult stackhack = CharacterDatabase.PQuery("SELECT stack FROM hamstring WHERE plrguid = '%u' AND stack >= 2", caster->GetGUIDLow());
- if (!stackhack) {
- sLog->outError(LOG_FILTER_SQL, "NOT FOUND ");
- return;
- }
- else
- // if (!caster->ToPlayer()->HasSpellCooldown(23694))
- {// If he already has hamstring
- sLog->outError(LOG_FILTER_SQL, "SPELL IS CASTED");
- caster->CastSpell(target, 23694, true);
- CharacterDatabase.PExecute("UPDATE `hamstring` SET `stack` = 0 WHERE plrguid = '%u'", caster->GetGUIDLow());
- if (caster->HasAura(12289)) // Improved Hamstring rank 1
- caster->ToPlayer()->AddSpellCooldown(23694, 0, uint32(time(NULL) + 60)); // Add 60 seconds cooldown
- if (caster->HasAura(12668)) // Improved Hamstring rank 2
- caster->ToPlayer()->AddSpellCooldown(23694, 0, uint32(time(NULL) + 30)); // Add 60 seconds cooldown
- }
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment