Merge pull request #612 from Abextm/kourend-library

Add kourend library plugin
This commit is contained in:
Adam
2018-02-20 18:52:17 -05:00
committed by GitHub
44 changed files with 1861 additions and 20 deletions

View File

@@ -103,6 +103,7 @@ public final class AnimationID
public static final int HERBLORE_POTIONMAKING = 363; //used for both herb and secondary
public static final int MAGIC_CHARGING_ORBS = 726;
public static final int BURYING_BONES = 827;
public static final int LOOKING_INTO = 832;
// NPC animations
public static final int TZTOK_JAD_MAGIC_ATTACK = 2656;

View File

@@ -279,8 +279,8 @@ public class Perspective
int baseX = client.getBaseX();
int baseY = client.getBaseY();
int x = (point.getX() - baseX) << LOCAL_COORD_BITS;
int y = (point.getY() - baseY) << LOCAL_COORD_BITS;
int x = ((point.getX() - baseX) << LOCAL_COORD_BITS) + (1 << LOCAL_COORD_BITS - 1) - 1;
int y = ((point.getY() - baseY) << LOCAL_COORD_BITS) + (1 << LOCAL_COORD_BITS - 1) - 1;
return new Point(x, y);
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2018 Abex
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.api;
import lombok.Value;
import net.runelite.api.Point;
@Value
public class Point3D
{
private final int X, Y, Z;
public Point toPoint()
{
return new Point(X, Y);
}
}

View File

@@ -57,7 +57,7 @@ public class WidgetID
public static final int BA_DEFENDER_GROUP_ID = 487;
public static final int BA_HEALER_GROUP_ID = 488;
public static final int LEVEL_UP_GROUP_ID = 233;
public static final int HUNTER_LEVEL_UP_GROUP_ID = 193;
public static final int DIALOG_SPRITE_GROUP_ID = 193;
public static final int QUEST_COMPLETED_GROUP_ID = 277;
public static final int CLUE_SCROLL_REWARD_GROUP_ID = 73;
public static final int BARROWS_REWARD_GROUP_ID = 155;
@@ -293,4 +293,10 @@ public class WidgetID
{
static final int VISIBLE_BOX = 4;
}
static class DialogSprite
{
static final int SPRITE = 0;
static final int TEXT = 1;
}
}

View File

@@ -120,6 +120,10 @@ public enum WidgetInfo
COMBAT_SPELL_ICON(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_ICON),
COMBAT_SPELL_TEXT(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_TEXT),
DIALOG_SPRITE(WidgetID.DIALOG_SPRITE_GROUP_ID, 0),
DIALOG_SPRITE_SPRITE(WidgetID.DIALOG_SPRITE_GROUP_ID, WidgetID.DialogSprite.SPRITE),
DIALOG_SPRITE_TEXT(WidgetID.DIALOG_SPRITE_GROUP_ID, WidgetID.DialogSprite.TEXT),
DIALOG_NPC_NAME(WidgetID.DIALOG_NPC_GROUP_ID, WidgetID.DialogNPC.NAME),
DIALOG_NPC_TEXT(WidgetID.DIALOG_NPC_GROUP_ID, WidgetID.DialogNPC.TEXT),
DIALOG_NPC_HEAD_MODEL(WidgetID.DIALOG_NPC_GROUP_ID, WidgetID.DialogNPC.HEAD_MODEL),
@@ -162,10 +166,6 @@ public enum WidgetInfo
LEVEL_UP_SKILL(WidgetID.LEVEL_UP_GROUP_ID, WidgetID.LevelUp.SKILL),
LEVEL_UP_LEVEL(WidgetID.LEVEL_UP_GROUP_ID, WidgetID.LevelUp.LEVEL),
HUNTER_LEVEL_UP(WidgetID.HUNTER_LEVEL_UP_GROUP_ID, 0),
HUNTER_LEVEL_UP_SKILL(WidgetID.HUNTER_LEVEL_UP_GROUP_ID, WidgetID.LevelUp.SKILL),
HUNTER_LEVEL_UP_LEVEL(WidgetID.HUNTER_LEVEL_UP_GROUP_ID, WidgetID.LevelUp.LEVEL),
QUEST_COMPLETED(WidgetID.QUEST_COMPLETED_GROUP_ID, 0),
QUEST_COMPLETED_NAME_TEXT(WidgetID.QUEST_COMPLETED_GROUP_ID, WidgetID.QuestCompleted.NAME_TEXT),