Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MartijnHols/MasteryEffectivenessC…
Browse files Browse the repository at this point in the history
…alculator
  • Loading branch information
MartijnHols committed Jun 2, 2017
2 parents d82e8dd + 22962cb commit 69bd753
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/CHANGELOG.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/Main/ReportSelecter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ class ReportSelecter extends Component {
<h2>Analyze report</h2>
</div>
<div className="panel-body">
<div className="alert alert-danger">
The Warcraft Logs API is currently down, please try again later.<br /><br />

<blockquote style={{ margin: 0 }}>
Experiencing an attack through the WCL Web API. For now I'm going to have to disable it completely until I can figure out how to harden it against the attack in the future.
</blockquote>
</div>

<strong>Enter your Warcraft Logs report code.</strong><br />
https://www.warcraftlogs.com/reports/<input
type="text"
Expand Down
6 changes: 6 additions & 0 deletions src/Parser/MistweaverMonk/CombatLogParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import SheilunsGift from './Modules/Features/SheilunsGift';
import RenewingMist from './Modules/Features/RenewingMist';
import AOEHealingTracker from './Modules/Features/AOEHealingTracker';
import EssenceFontMastery from './Modules/Features/EssenceFontMastery';
import ChiJi from './Modules/Features/ChiJi';

// Setup for Items
import Velens from './Modules/Items/Velens';
Expand Down Expand Up @@ -84,6 +85,7 @@ class CombatLogParser extends MainCombatLogParser {
renewingMist: RenewingMist,
aoeHealingTracker: AOEHealingTracker,
essenceFontMastery: EssenceFontMastery,
chiJi: ChiJi,

// Legendaries / Items:
drapeOfShame: DrapeOfShame,
Expand All @@ -99,6 +101,10 @@ class CombatLogParser extends MainCombatLogParser {
generateResults() {
const results = new ParseResults();

if(this.modules.chiJi.active) {
const chiJiHealing = this.modules.chiJi.finalChiJi;
this.totalHealing += chiJiHealing;
}
const fightDuration = this.fightDuration;
const fightEndTime = this.fight.end_time;
// const deadTimePercentage = this.modules.alwaysBeCasting.totalTimeWasted / fightDuration;
Expand Down
51 changes: 51 additions & 0 deletions src/Parser/MistweaverMonk/Modules/Features/ChiJi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import Module from 'Parser/Core/Module';
import SPELLS from 'common/SPELLS';

const debug = true

class ChiJi extends Module {

petID = null;
craneHeal = 0;
craneAbsorbedHeal = 0;
finalChiJi = 0;


on_initialized() {
if(!this.owner.error) {
this.active = this.owner.selectedCombatant.hasTalent(SPELLS.INVOKE_CHIJI_TALENT.id);
}
}

on_byPlayer_summon(event) {


if(event.ability.guid === SPELLS.INVOKE_CHIJI_TALENT.id) {
this.petID = event.targetID;
debug && console.log('Chi-Ji Summoned: ' + this.petID);
}
}

on_heal (event) {
// debug && console.log('SOurce ID: ' + event.sourceID + ' / / / Ability GUID: ' + event.ability.guid + ' === ' + SPELLS.CRANE_HEAL.id);
if(event.sourceID === this.petID && event.ability.guid === SPELLS.CRANE_HEAL.id) {
this.craneHeal += event.amount;
this.craneAbsorbedHeal += event.absorbed || 0;
// debug && console.log('Crane Heal?');
}
}

on_finished() {
this.finalChiJi = this.craneHeal + this.craneAbsorbedHeal;
if(debug) {
console.log('Chi-Ji ID: ' + this.petID);
console.log('Chi-Ji Healing: ' + this.craneHeal);
console.log('Chi-Ji Absobed Healing: ' + this.craneAbsorbedHeal);
}
}
}

export default ChiJi;


// 198664 - Chi-Ji Summon
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EssenceFontMastery extends Module {
let targetId = event.targetID
if(spellId === SPELLS.GUSTS_OF_MISTS.id) {
if(this.owner.combatants.players[targetId].hasBuff(SPELLS.ESSENCE_FONT_BUFF.id, event.timestamp, 0, 0) === true) {
console.log('Player ID: ' + event.targetID + ' Timestamp: ' + event.timestamp);
debug && console.log('Player ID: ' + event.targetID + ' Timestamp: ' + event.timestamp);
this.healEF++;
this.healingEF += event.amount;
this.absorbedhealingEF += (event.absorbed || 0);
Expand Down
2 changes: 1 addition & 1 deletion src/common/SPELLS_MONK.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
},
// Ch-Ji Heal
CRANE_HEAL: {
id: 213373,
id: 198756,
name: 'Crane Heal',
icon: 'inv_pet_cranegod',
},
Expand Down

0 comments on commit 69bd753

Please sign in to comment.