|
You last visited: Today at 09:22
Advertisement
OpenNos NoFunction items crash
Discussion on OpenNos NoFunction items crash within the Nostale forum part of the MMORPGs category.
10/18/2018, 17:26
|
#1
|
elite*gold: 0
Join Date: Jul 2017
Posts: 33
Received Thanks: 1
|
OpenNos NoFunction items crash
at System.Text.StringBuilder.AppendFormatHelper(IForm atProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0)
at OpenNos.GameObject.NoFunctionItem.Use(ClientSessio n session, ItemInstance& inv, Byte Option, String[] packetsplit) in D:\Opennos\OpenNos.GameObject\Item\NoFunctionItem. cs:line 138
at OpenNos.Handler.InventoryPacketHandler.UseItem(Use ItemPacket useItemPacket) in D:\Opennos\OpenNos.Handler\InventoryPacketHandler. cs:line 1749
at lambda_method(Closure , Object , Object )
at OpenNos.GameObject.ClientSession.TriggerHandler(St ring packetHeader, String packet, Boolean force, Boolean ignoreAuthority) in D:\Opennos\OpenNos.GameObject\Networking\ClientSes sion.cs:line 556
at OpenNos.GameObject.ClientSession.HandlePackets() in D:\Opennos\OpenNos.GameObject\Networking\ClientSes sion.cs:line 458
at OpenNos.GameObject.ClientSession.<.ctor>b__12_0(In t64 x) in D:\Opennos\OpenNos.GameObject\Networking\ClientSes sion.cs:line 87
at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
at System.Reactive.Linq.ObservableImpl.Timer.Periodic ._.Tick()
at System.Reactive.Linq.ObservableImpl.Timer.Periodic ._.<>c.<Run>b__4_0(_ this)
at System.Reactive.Concurrency.Scheduler.<>c__67`1.<S chedulePeriodic>b__67_0(ValueTuple`2 t)
at System.Reactive.Concurrency.DefaultScheduler.Perio dicallyScheduledWorkItem`1.<>c.<Tick>b__5_0(Period icallyScheduledWorkItem`1 closureWorkItem)
at System.Reactive.Concurrency.AsyncLock.<>c__5`1.<Wa it>b__5_0(Delegate actionObject, Object stateObject)
at System.Reactive.Concurrency.AsyncLock.Wait(Object state, Delegate delegate, Action`2 action)
at System.Reactive.Concurrency.AsyncLock.Wait[TState](TState state, Action`1 action)
at System.Reactive.Concurrency.DefaultScheduler.Perio dicallyScheduledWorkItem`1.Tick()
at System.Reactive.Concurrency.ConcurrencyAbstraction LayerImpl.PeriodicTimer.Tick(Object state)
at System.Reactive.Concurrency.ConcurrencyAbstraction LayerImpl.PeriodicTimer.<>c.<.ctor>b__2_0(Object _)
at System.Threading.TimerQueueTimer.CallCallbackInCon text(Object state)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireQueuedTimerComplet ion(Object state)
at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWa itCallback()]]></log4net:exception></log4net:event>
|
|
|
10/18/2018, 18:15
|
#2
|
elite*gold: 0
Join Date: Jul 2017
Posts: 397
Received Thanks: 60
|
show your code
|
|
|
10/18/2018, 22:02
|
#3
|
elite*gold: 0
Join Date: Apr 2018
Posts: 149
Received Thanks: 58
|
Add this to nofunction.cs
/*
* This file is part of the OpenNos Emulator Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
using OpenNos.Core;
using OpenNos.Data;
using OpenNos.GameObject.Networking;
namespace OpenNos.GameObject
{
public class NoFunctionItem : Item
{
#region Instantiation
public NoFunctionItem(ItemDTO item) : base(item)
{
}
#endregion
#region Methods
public override void Use(ClientSession session, ref ItemInstance inv, byte Option = 0, string[] packetsplit = null)
{
switch (Effect)
{
case 10:
{
switch (EffectValue)
{
case 1:
if (session.Character.Inventory.CountItem(1036) < 1 || session.Character.Inventory.CountItem(1013) < 1)
{
return;
}
session.Character.Inventory.RemoveItemAmount(1036) ;
session.Character.Inventory.RemoveItemAmount(1013) ;
if (ServerManager.RandomNumber() < 25)
{
switch (ServerManager.RandomNumber(0, 2))
{
case 0:
session.Character.GiftAdd(1015, 1);
break;
case 1:
session.Character.GiftAdd(1016, 1);
break;
}
}
break;
case 2:
if (session.Character.Inventory.CountItem(1038) < 1 || session.Character.Inventory.CountItem(1013) < 1)
{
return;
}
session.Character.Inventory.RemoveItemAmount(1038) ;
session.Character.Inventory.RemoveItemAmount(1013) ;
if (ServerManager.RandomNumber() < 25)
{
switch (ServerManager.RandomNumber(0, 4))
{
case 0:
session.Character.GiftAdd(1031, 1);
break;
case 1:
session.Character.GiftAdd(1032, 1);
break;
case 2:
session.Character.GiftAdd(1033, 1);
break;
case 3:
session.Character.GiftAdd(1034, 1);
break;
}
}
break;
case 3:
if (session.Character.Inventory.CountItem(1037) < 1 || session.Character.Inventory.CountItem(1013) < 1)
{
return;
}
session.Character.Inventory.RemoveItemAmount(1037) ;
session.Character.Inventory.RemoveItemAmount(1013) ;
if (ServerManager.RandomNumber() < 25)
{
switch (ServerManager.RandomNumber(0, 17))
{
case 0:
case 1:
case 2:
case 3:
case 4:
session.Character.GiftAdd(1017, 1);
break;
case 5:
case 6:
case 7:
case 8:
session.Character.GiftAdd(1018, 1);
break;
case 9:
case 10:
case 11:
session.Character.GiftAdd(1019, 1);
break;
case 12:
case 13:
session.Character.GiftAdd(1020, 1);
break;
case 14:
session.Character.GiftAdd(1021, 1);
break;
case 15:
session.Character.GiftAdd(1022, 1);
break;
case 16:
session.Character.GiftAdd(1023, 1);
break;
}
}
break;
}
session.Character.GiftAdd(1014, (byte)ServerManager.RandomNumber(5, 11));
}
break;
default:
Logger.Warn(string.Format(Language.Instance.GetMes sageFromKey("NO_HANDLER_ITEM"), GetType(), VNum, Effect, EffectValue));
break;
}
}
#endregion
}
}
|
|
|
 |
Similar Threads
|
OpenNos "The project 'OpenNos.Login' failed to build."
06/19/2019 - Nostale - 11 Replies
Hello! When I put in update-database in Visual Studio I get the 'The project 'OpenNos.Login' failed to build.' error. I already did what was on the troubleshoot before I put it in. I've been at this for hours and I can't figure it out. Can someone help me please?
|
[OpenNos] ¿How to select the project OpenNos.DAL.EF?
05/04/2018 - Nostale - 4 Replies
Hello, I have a problem with my visual studio 2017, it turns out that to be able to give the update-database command I must have the project OpenNos.DAL.EF But the thing is that in my visual studio there is no option to select the project ... I need help!:D:D
|
[opennos]The project 'OpenNos.Login' failed to build.
08/03/2017 - Nostale - 9 Replies
Hello I have a problem with the package manager console to run the update- database command to opennos soon as I executes the command, he said: The project ' opennos.login ' failed to build
What to do? I made the updates to Microsoft Visual Studio thank you ..
|
Crash. Crash. Crash. Help?
10/30/2009 - Dekaron - 10 Replies
Okay EPVPr's, I have a question for you.
Is anyone else having the 2moons/dekaron client crash on them as much as it is for me? I'll explain my full situation unlike alot of people on here(I'm sure most of you guy's know what i'm referring to :p)
Situation:
I start 2Moons, login.
Usually on char select i'll open CE 5.5 from my "Up To Date" .CT file. Other times it will be "in map" depends on the situation as you all know. With as little as only one script activated(or even all) which most...
|
All times are GMT +1. The time now is 09:27.
|
|