blob: e35729f0e473a84baa3b1bf324a1c3a96fc5d5c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
class cBehaviorItemReplacer;
#include "Behavior.h"
/** When right clicked while holding a_OriginalItem, a mob having this behavior replaces the original item
with a_NewItem. This is used for milking cows.
*/
class cBehaviorItemReplacer : public cBehavior
{
public:
cBehaviorItemReplacer(short a_OriginalItem, short a_NewItem);
void AttachToMonster(cMonster & a_Parent);
void OnRightClicked(cPlayer & a_Player) override;
private:
// Our parent
cMonster * m_Parent;
short m_OriginalItem; // Replace this item with NewItem
short m_NewItem;
};
|