本文整理汇总了C#中SagaDB.Actors.ActorPC类的典型用法代码示例。如果您正苦于以下问题:C# ActorPC类的具体用法?C# ActorPC怎么用?C# ActorPC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActorPC类属于SagaDB.Actors命名空间,在下文中一共展示了ActorPC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 355, 35501) == StepStatus.Active)
{
UpdateQuest(pc, 355, 35501, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 355);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 356, 35601) == StepStatus.Active)
{
UpdateQuest(pc, 356, 35601, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 356);
AddNavPoint(356, 35602, 13, 1025, -2093f, -17903f, 681f); //Gretchel
SendNavPoint(pc);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 369, 36902) == StepStatus.Active)
{
UpdateQuest(pc, 369, 36902, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 369);
QuestCompleted(pc, 369);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
}
示例2: CalcAtkPC
private static void CalcAtkPC(ref ActorPC pc)
{
WeaponInfo weapon=null;
Weapon activeweapon;
uint weapondmg = 0;
activeweapon = SagaDB.Items.WeaponFactory.GetActiveWeapon(pc);
if (activeweapon != null) weapon = WeaponFactory.GetWeaponInfo((byte)activeweapon.type, activeweapon.level);
if (weapon != null)
{
int min, max;
min = (int)weapon.minatk + pc.str + pc.BattleStatus.strbonus + pc.BattleStatus.atkminbonus;
max = (int)weapon.maxatk + ((pc.str + pc.BattleStatus.strbonus) * 2) + pc.BattleStatus.atkmaxbonus;
if (min > max) min = max;
weapondmg = (uint)Global.Random.Next(min, max);
}
else
{
int min, max;
min = pc.str + pc.BattleStatus.strbonus + pc.BattleStatus.atkminbonus;
max = (pc.str + pc.BattleStatus.strbonus) * 2 + pc.BattleStatus.atkmaxbonus;
if (min > max) min = max;
weapondmg = (uint)Global.Random.Next(min,max);
}
pc.BattleStatus.atk = (int)weapondmg + pc.BattleStatus.atkskill + pc.BattleStatus.atkbonus;
if (pc.BattleStatus.atk < 0) pc.BattleStatus.atk = 0;
}
示例3: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 356, 35602) == StepStatus.Active)
{
UpdateQuest(pc, 356, 35602, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 356);
AddNavPoint(356, 35603, 12, 1024, -8408f, -34514f, 6913f); //Pretan
SendNavPoint(pc);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 368, 36802) == StepStatus.Active && CountItem(pc, 4210) > 0)
{
UpdateQuest(pc, 368, 36802, StepStatus.Completed);
UpdateIcon(pc);
TakeItem(pc, 4210, 1);
RemoveNavPoint(pc, 368);
AddNavPoint(368, 36803, 13, 1021, -9408f, -6118f, -3949f); // Derek
SendNavPoint(pc);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 356, 35604) == StepStatus.Active)
{
UpdateQuest(pc, 356, 35604, StepStatus.Completed);
UpdateIcon(pc);
QuestCompleted(pc, 356);
NPCSpeech(pc, 3);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
}
示例4: OnQuest
public void OnQuest(ActorPC pc)
{
UpdateQuest(pc, 396, 39601, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 396);
NPCChat(pc, 3919);
}
示例5: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 177, 17703) == StepStatus.Active)
{
UpdateQuest(pc, 177, 17703, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 177);
QuestCompleted(pc, 177);
NPCSpeech(pc, 823);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
if (GetQuestStepStatus(pc, 178, 17801) == StepStatus.Active)
{
UpdateQuest(pc, 178, 17801, StepStatus.Completed);
UpdateIcon(pc);
NPCSpeech(pc, 823);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 178, 17803) == StepStatus.Active)
{
UpdateQuest(pc, 178, 17803, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 178);
AddNavPoint(178, 17804, 5, 1012, 13931.36f, 74893.79f, 5049.054f); //Monika
SendNavPoint(pc);
NPCSpeech(pc, 823);
NPCChat(pc, 0);
}
}
示例6: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 182, 18201) == StepStatus.Active)
{
UpdateQuest(pc, 182, 18201, StepStatus.Completed);
UpdateIcon(pc);
NPCSpeech(pc, 232);
NPCChat(pc, 0);
}
if (GetQuestStepStatus(pc, 182, 18203) == StepStatus.Active)
{
UpdateQuest(pc, 182, 18203, StepStatus.Completed);
RemoveNavPoint(pc, 182);
QuestCompleted(pc, 182);
NPCSpeech(pc, 232);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
if (GetQuestStepStatus(pc, 183, 18301) == StepStatus.Active)
{
UpdateQuest(pc, 183, 18301, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 183);
SendNavPoint(pc, 183, 1068, 22528f, -33632f, -4064f);
NPCSpeech(pc, 232);
NPCChat(pc, 0);
}
}
示例7: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 398, 39803) == StepStatus.Active)
{
if (CountItem(pc, 2666) >= 1)
{
TakeItem(pc, 2666, 1);
UpdateQuest(pc, 398, 39803, StepStatus.Completed);
QuestCompleted(pc, 398);
UpdateIcon(pc);
NPCSpeech(pc, 3936);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
}
if (GetQuestStepStatus(pc, 399, 39901) == StepStatus.Active)
{
UpdateQuest(pc, 399, 39901, StepStatus.Completed);
UpdateIcon(pc);
RemoveNavPoint(pc, 399);
SendNavPoint(pc, 399, 1148, 17425f, 10411f, 1951f);
GiveItem(pc, 9344, 1);
NPCSpeech(pc, 3939);
NPCChat(pc, 0);
}
}
示例8: EquiptLoseDurabilityOnDeath
public static void EquiptLoseDurabilityOnDeath(ActorPC pc)
{
LoseDura(pc, SagaDB.Items.EQUIP_SLOT.BODY, 0.1f);
LoseDura(pc, SagaDB.Items.EQUIP_SLOT.HANDS, 0.1f);
LoseDura(pc, SagaDB.Items.EQUIP_SLOT.PANTS, 0.1f);
LoseDura(pc, SagaDB.Items.EQUIP_SLOT.LEGS, 0.1f);
}
示例9: OnReward
public void OnReward(ActorPC pc, uint QID)
{
switch (QID)
{
case 399:
GiveExp(pc, 200, 40);
GiveZeny(pc, 6);
RemoveNavPoint(pc, 399);
RemoveQuest(pc, 399);
AddStep(400, 40001);
AddStep(400, 40002);
QuestStart(pc);
UpdateIcon(pc);
break;
case 400:
GiveExp(pc, 202, 75);
GiveZeny(pc, 10);
GiveItem(pc, 91, 1);
RemoveNavPoint(pc, 400);
RemoveQuest(pc, 400);
AddStep(401, 40101);
AddStep(401, 40102);
AddStep(401, 40103);
QuestStart(pc);
UpdateIcon(pc);
SendNavPoint(pc, 401, 1148, 17425f, 10411f, 1951f);
break;
}
}
示例10: StartEvent
public void StartEvent(ActorPC pc, uint Step)
{
Packets.Server.ScenarioEvent p = new SagaMap.Packets.Server.ScenarioEvent();
p.SetStep(Step);
p.SetActor(pc.id);
SendPacket(pc, p);
}
示例11: OnQuestConfirmed
public override void OnQuestConfirmed(ActorPC pc, uint QuestID)
{
if (IfGotQuest(pc, QuestID)) return;
switch (QuestID)
{
case 407:
AddStep(407, 40701);
AddStep(407, 40702);
QuestStart(pc);
break;
case 1:
AddStep(1,101);
AddStep(1,102);
QuestStart(pc);
break;
case 2:
AddStep(2, 201);
AddStep(2, 202);
QuestStart(pc);
break;
case 24:
AddStep(24, 2401);
AddStep(24, 2402);
QuestStart(pc);
break;
case 25:
AddStep(25, 2501);
AddStep(25, 2502);
QuestStart(pc);
SendNavPoint(pc, 25, 1002, 1460f, -13664f, -6472f);
break;
case 29:
AddStep(29, 2901);
AddStep(29, 2902);
QuestStart(pc);
break;
case 156:
AddStep(156, 15601);
AddStep(156, 15602);
SendNavPoint(pc, 156, 1003, 12484f, -15132f, -4779f);
QuestStart(pc);
break;
case 323:
AddStep(323, 32301);
AddStep(323, 32302);
AddStep(323, 32303);
QuestStart(pc);
SendNavPoint(pc, 323, 1000, -12092f, -6490f, -8284f);
break;
case 9:
AddStep(9, 901);
AddStep(9, 902);
AddStep(9, 903);
QuestStart(pc);
SendNavPoint(pc, 9, 1005, -1216f, 3328f, -10144f);
break;
}
SendQuestList(pc);
}
示例12: OnQuest
public void OnQuest(ActorPC pc)
{
if (GetQuestStepStatus(pc, 402, 40202) == StepStatus.Active)
{
if (CountItem(pc, 2630) >= 3)
{
TakeItem(pc, 2630, 3);
UpdateQuest(pc, 402, 40202, StepStatus.Completed);
QuestCompleted(pc, 402);
UpdateIcon(pc);
NPCSpeech(pc, 3954);
NPCChat(pc, 0);
SetReward(pc, new rewardfunc(OnReward));
}
}
if (GetQuestStepStatus(pc, 406, 40601) == StepStatus.Active)
{
UpdateQuest(pc, 406, 40601, StepStatus.Completed);
NPCSpeech(pc, 4557);
GiveItem(pc, 4245, 1);
NPCChat(pc, 0);
UpdateIcon(pc);
RemoveNavPoint(pc, 406);
}
}
示例13: Warp
public static void Warp( ActorPC pc, byte mapid )
{
ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)pc.e;
Map map;
if( !MapManager.Instance.GetMap( mapid, out map ) ) return;
float[] coord = map.GetRandomPos();
eh.C.map.SendActorToMap( pc, mapid, coord[0], coord[1], coord[2] );
}
示例14: SetCurrentScenario
public static void SetCurrentScenario(ActorPC pc,uint sceID, uint scenario)
{
Packets.Server.InitScenario p = new SagaMap.Packets.Server.InitScenario();
p.SetUnknown(sceID);
p.SetScenario(scenario);
pc.Scenario = scenario;
SendPacket(pc, p);
}
示例15: ScenarioStepComplete
public void ScenarioStepComplete(ActorPC pc, uint Step, uint NextStep)
{
Packets.Server.ScenarioStepComplete p = new SagaMap.Packets.Server.ScenarioStepComplete();
pc.Scenario = NextStep;
p.SetStep(Step);
p.SetNextStep(NextStep);
SendPacket(pc, p);
}