i think me n my buddy did it right

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

i think me n my buddy did it right

Postby royal » Sun Nov 07, 2010 2:37 am

Code: Select all
/*
 * Created by Dean/Xaves
 */
#region Used
using System;
using System.Collections;
using System.Reflection;
using System.Threading;
using DOL.AI.Brain;
using DOL.Database;
using DOL.Language;
using DOL.GS.PacketHandler;
using log4net;
using System.Collections.Generic;
#endregion

namespace DEAN
{

    public class BPRefund : Game.NPC
    {
        public override bool ReceiveItem(GameLiving source, InventoryItem item)
        {
            #region Refund
            GamePlayer player = source as GamePlayer;
            if (player == null || item == null) return true;
            if (WorldMgr.GetDistance(this, player) > WorldMgr.INTERACT_DISTANCE)
            {
                player.Out.SendMessage("You are too far away you must stand closer " + GetName(0, false) + ".", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return true;
            }
            if (!item.Name.Contains("null") && item.PoisonSpellID == 0)
            {
               
                long TotalBPAmount = BountyPointsValue;
                player.GainBountyPoints((long)Math.Round((double)(TotalBPAmount / ServerProperties.Properties.BP_RATE * item.Count)));
                player.Inventory.RemoveItem(item);
                return true;
            }
            #endregion
            return true;
        }
    }
}
royal
DOL Initiate
 
Posts: 21
Joined: Mon Nov 01, 2010 3:24 am

Re: i think me n my buddy did it right

Postby Graveen » Sun Nov 07, 2010 9:11 am

Royal, it's time to understand how to use the [ code=csharp] balisa ! :)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest